Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,14 @@ def compare_manifold_learning(methods, n_samples, n_neighbors, n_components, per
|
|
11 |
|
12 |
for method in methods:
|
13 |
manifold_method = {
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
"
|
18 |
"Isomap": manifold.Isomap(n_neighbors=n_neighbors, n_components=n_components, p=1),
|
19 |
-
"
|
20 |
"Spectral Embedding": manifold.SpectralEmbedding(n_components=n_components, n_neighbors=n_neighbors),
|
21 |
-
"
|
22 |
}[method]
|
23 |
S_transformed = manifold_method.fit_transform(S_points)
|
24 |
transformed_data.append(S_transformed)
|
@@ -41,14 +41,14 @@ def compare_manifold_learning(methods, n_samples, n_neighbors, n_components, per
|
|
41 |
return "plot.png"
|
42 |
|
43 |
method_options = [
|
44 |
-
"
|
45 |
-
"
|
46 |
-
"
|
47 |
-
"
|
48 |
"Isomap",
|
49 |
-
"
|
50 |
"Spectral Embedding",
|
51 |
-
"
|
52 |
]
|
53 |
|
54 |
inputs = [
|
|
|
11 |
|
12 |
for method in methods:
|
13 |
manifold_method = {
|
14 |
+
"Locally Linear Embeddings Standard": manifold.LocallyLinearEmbedding(method="standard", n_neighbors=n_neighbors, n_components=n_components, eigen_solver="auto", random_state=0),
|
15 |
+
"Locally Linear Embeddings LTSA": manifold.LocallyLinearEmbedding(method="ltsa", n_neighbors=n_neighbors, n_components=n_components, eigen_solver="auto", random_state=0),
|
16 |
+
"Locally Linear Embeddings Hessian": manifold.LocallyLinearEmbedding(method="hessian", n_neighbors=n_neighbors, n_components=n_components, eigen_solver="auto", random_state=0),
|
17 |
+
"Locally Linear Embeddings Modified": manifold.LocallyLinearEmbedding(method="modified", n_neighbors=n_neighbors, n_components=n_components, eigen_solver="auto", random_state=0),
|
18 |
"Isomap": manifold.Isomap(n_neighbors=n_neighbors, n_components=n_components, p=1),
|
19 |
+
"MultiDimensional Scaling": manifold.MDS(n_components=n_components, max_iter=50, n_init=4, random_state=0, normalized_stress=False),
|
20 |
"Spectral Embedding": manifold.SpectralEmbedding(n_components=n_components, n_neighbors=n_neighbors),
|
21 |
+
"T-distributed Stochastic Neighbor Embedding": manifold.TSNE(n_components=n_components, perplexity=perplexity, init="random", n_iter=250, random_state=0)
|
22 |
}[method]
|
23 |
S_transformed = manifold_method.fit_transform(S_points)
|
24 |
transformed_data.append(S_transformed)
|
|
|
41 |
return "plot.png"
|
42 |
|
43 |
method_options = [
|
44 |
+
"Locally Linear Embeddings Standard",
|
45 |
+
"Locally Linear Embeddings LTSA",
|
46 |
+
"Locally Linear Embeddings Hessian",
|
47 |
+
"Locally Linear Embeddings Modified",
|
48 |
"Isomap",
|
49 |
+
"MultiDimensional Scaling",
|
50 |
"Spectral Embedding",
|
51 |
+
"T-distributed Stochastic Neighbor Embedding"
|
52 |
]
|
53 |
|
54 |
inputs = [
|