MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / __init__

Method __init__

mla/tsne.py:22–41  ·  view source on GitHub ↗

A t-Distributed Stochastic Neighbor Embedding implementation. Parameters ---------- max_iter : int, default 200 perplexity : float, default 30.0 n_components : int, default 2

(
        self, n_components=2, perplexity=30.0, max_iter=200, learning_rate=500
    )

Source from the content-addressed store, hash-verified

20 y_required = False
21
22 def __init__(
23 self, n_components=2, perplexity=30.0, max_iter=200, learning_rate=500
24 ):
25 """A t-Distributed Stochastic Neighbor Embedding implementation.
26
27 Parameters
28 ----------
29 max_iter : int, default 200
30 perplexity : float, default 30.0
31 n_components : int, default 2
32 """
33 self.max_iter = max_iter
34 self.perplexity = perplexity
35 self.n_components = n_components
36 self.initial_momentum = 0.5
37 self.final_momentum = 0.8
38 self.min_gain = 0.01
39 self.lr = learning_rate
40 self.tol = 1e-5
41 self.perplexity_tries = 50
42
43 def fit_transform(self, X, y=None):
44 self._setup_input(X, y)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected