diff --git a/lib/scholar/manifold/tsne.ex b/lib/scholar/manifold/tsne.ex index 50245689..626ca990 100644 --- a/lib/scholar/manifold/tsne.ex +++ b/lib/scholar/manifold/tsne.ex @@ -1,6 +1,10 @@ defmodule Scholar.Manifold.TSNE do @moduledoc """ - TSNE (t-Distributed Stochastic Neighbor Embedding) is a nonlinear dimensionality reduction technique. + 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). ## Reference diff --git a/lib/scholar/neighbors/k_nearest_neighbors.ex b/lib/scholar/neighbors/k_nearest_neighbors.ex index 0223a3b6..6528e144 100644 --- a/lib/scholar/neighbors/k_nearest_neighbors.ex +++ b/lib/scholar/neighbors/k_nearest_neighbors.ex @@ -1,6 +1,9 @@ defmodule Scholar.Neighbors.KNearestNeighbors do @moduledoc """ - The K-Nearest Neighbors. It implements both classification and regression. + The K-Nearest Neighbors. + + It implements both classification and regression. The time complexity is + $O(N^2)$ for $N$ samples. """ import Nx.Defn import Scholar.Shared @@ -162,7 +165,7 @@ defmodule Scholar.Neighbors.KNearestNeighbors do ## Return Values - It returns a tensor with predicted class labels + It returns a tensor with predicted class labels. ## Examples @@ -210,7 +213,7 @@ defmodule Scholar.Neighbors.KNearestNeighbors do ## Return Values - It returns a tensor with probabilities of classes. They are arranged in lexicographic order. + It returns a tensor with probabilities of classes. They are arranged in lexicographic order. ## Examples