Skip to content

Commit

Permalink
Clarify implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Nov 5, 2023
1 parent 3f5b6bd commit 6f2aa17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions lib/scholar/manifold/tsne.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ defmodule Scholar.Manifold.TSNE do
@moduledoc """
t-SNE (t-Distributed Stochastic Neighbor Embedding) is a nonlinear dimensionality reduction technique.
The time complexity is $O(N^2)$ for $N$ samples. There are known $O(N*\\log(N))$ implementations but
those use tree structures which are not available in Nx (as Nx algorithms are also designed to run on
the GPU).
This is an exact implementation of t-SNE and therefore it has time complexity is $O(N^2)$ for $N$ samples.
## Reference
Expand Down
4 changes: 2 additions & 2 deletions lib/scholar/neighbors/k_nearest_neighbors.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ defmodule Scholar.Neighbors.KNearestNeighbors do
@moduledoc """
The K-Nearest Neighbors.
It implements both classification and regression. The time complexity is
$O(N^2)$ for $N$ samples.
It implements both classification and regression. This implements the linear
version of kNN and therefore it has time complexity $O(N^2)$ for $N$ samples.
"""
import Nx.Defn
import Scholar.Shared
Expand Down

0 comments on commit 6f2aa17

Please sign in to comment.