Skip to content

Commit

Permalink
Minor docfixes for the inferred perplexity.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 14, 2024
1 parent 17295fc commit 5196f09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions include/qdtsne/Options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ struct Options {
* Higher perplexities will focus on global structure, at the cost of increased runtime and decreased local resolution.
*
* This option affects all `initialize()` methods except if precomputed neighbor search results are supplied _and_ `Options::infer_perplexity = true`.
* In such cases, the perplexity is inferred from the number of neighbors per point in the supplied search results.
* In such cases, the perplexity is inferred from the number of neighbors in the supplied search results.
*/
double perplexity = 30;

/**
* Whether to infer the perplexity in `initialize()` methods that accept a `NeighborList` object.
* In such cases, the value in `Options::perplexity` is ignored.
* The perplexity is instead defined from the `NeighborList` as the number of nearest neighbors per point divided by 3.
* The perplexity is instead defined from the `NeighborList` as the number of nearest neighbors for the first point divided by 3.
* (It is assumed that all points have the same number of neighbors.)
*/
bool infer_perplexity = true;

Expand Down
2 changes: 1 addition & 1 deletion include/qdtsne/initialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Status<num_dim_, Index_, Float_> initialize(NeighborList<Index_, Float_> nn, Flo
* @param neighbors List of indices and distances to nearest neighbors for each observation.
* Each observation should have the same number of neighbors, sorted by increasing distance, which should not include itself.
* @param options Further options.
* If `Options::infer_perplexity = true`, the perplexity is determined from `nn` and the value in `Options::perplexity` is ignored.
* If `Options::infer_perplexity = true`, the perplexity is determined from `neighbors` and the value in `Options::perplexity` is ignored.
*
* @return A `Status` object representing an initial state of the t-SNE algorithm.
*/
Expand Down

0 comments on commit 5196f09

Please sign in to comment.