Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote FITSNE from experimental #4361

Merged
merged 3 commits into from
Nov 18, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions python/cuml/manifold/t_sne.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ class TSNE(Base,
0.8. (Barnes-Hut only.)
learning_rate_method : str 'adaptive', 'none' or None (default 'adaptive')
Either adaptive or None. 'adaptive' tunes the learning rate, early
exaggeration and perplexity automatically based on input size.
exaggeration, perplexity and n_neighbors automatically based on
input size.
n_neighbors : int (default 90)
The number of datapoints you want to use in the
attractive forces. Smaller values are better for preserving
Expand Down Expand Up @@ -339,6 +340,9 @@ class TSNE(Base,
raise ValueError("post_momentum = {} should be more than "
"pre_momentum = {}".format(post_momentum,
pre_momentum))
if method == "barnes_hut":
warnings.warn("Starting from version 22.02, the default method "
lowener marked this conversation as resolved.
Show resolved Hide resolved
"of TSNE will be 'fft'.")

self.n_components = n_components
self.perplexity = perplexity
Expand Down Expand Up @@ -482,11 +486,6 @@ class TSNE(Base,
if self.method == 'barnes_hut':
algo = TSNE_ALGORITHM.BARNES_HUT
elif self.method == 'fft':
warnings.warn("Method 'fft' is experimental and may be " +
"unstable. If you find this implementation is not" +
" behaving as intended, please consider using one" +
" of the other methods, such as 'barnes_hut' or" +
" 'exact'")
algo = TSNE_ALGORITHM.FFT
elif self.method == 'exact':
algo = TSNE_ALGORITHM.EXACT
Expand Down Expand Up @@ -529,8 +528,7 @@ class TSNE(Base,
free(params)

self._kl_divergence_ = kl_divergence
if self.verbose:
print("[t-SNE] KL divergence: {}".format(kl_divergence))
logger.debug("[t-SNE] KL divergence: {}".format(kl_divergence))
return self

@generate_docstring(convert_dtype_cast='np.float32',
Expand Down