Skip to content

Commit

Permalink
Merge pull request #64 from brianhie/no_tsne
Browse files Browse the repository at this point in the history
Remove custom t-SNE implementation
  • Loading branch information
brianhie authored May 3, 2020
2 parents fdd1232 + 31a1ba0 commit 485b3a6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 894 deletions.
2 changes: 1 addition & 1 deletion scanorama/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .scanorama import *

__version__ = '1.5.2'
__version__ = '1.6'
10 changes: 5 additions & 5 deletions scanorama/scanorama.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import sys
import warnings

from .t_sne_approx import TSNEApprox
from .utils import plt, dispersion, reduce_dimensionality
from .utils import visualize_cluster, visualize_expr, visualize_dropout
from .utils import handle_zeros_in_scale
Expand Down Expand Up @@ -421,14 +420,15 @@ def visualize(assembled, labels, namespace, data_names,
n_iter=N_ITER, perplexity=PERPLEXITY, verbose=VERBOSE,
learn_rate=200., early_exag=12., embedding=None,
shuffle_ds=False, size=1, multicore_tsne=True,
image_suffix='.svg', viz_cluster=False, colors=None):
image_suffix='.svg', viz_cluster=False, colors=None,
random_state=None,):
# Fit t-SNE.
if embedding is None:
try:
from MulticoreTSNE import MulticoreTSNE
tsne = MulticoreTSNE(
n_iter=n_iter, perplexity=perplexity,
verbose=verbose, random_state=69,
verbose=verbose, random_state=random_state,
learning_rate=learn_rate,
early_exaggeration=early_exag,
n_jobs=40
Expand All @@ -437,9 +437,9 @@ def visualize(assembled, labels, namespace, data_names,
multicore_tsne = False

if not multicore_tsne:
tsne = TSNEApprox(
tsne = TSNE(
n_iter=n_iter, perplexity=perplexity,
verbose=verbose, random_state=69,
verbose=verbose, random_state=random_state,
learning_rate=learn_rate,
early_exaggeration=early_exag
)
Expand Down
Loading

0 comments on commit 485b3a6

Please sign in to comment.