diff --git a/app/web/main.py b/app/web/main.py index 322d1a8..6f745ca 100644 --- a/app/web/main.py +++ b/app/web/main.py @@ -210,6 +210,67 @@ REDUCERS: Dict[str, Dict[str, Any]] = { ("rotation", "str", "", ["", "varimax", "quartimax"], "Empty = None."), ], }, + "sklearn.decomposition.KernelPCA": { + "pkg": "sklearn", + "label": "KernelPCA", + "blurb": "Non-linear PCA via the kernel trick. Deterministic; kernel choice shapes the output.", + "key": [ + ("n_components", "int", 2, None, "Locked."), + ("kernel", "str", "rbf", ["linear", "poly", "rbf", "sigmoid", "cosine"], None), + ("random_state", "int", 42, None, None), + ], + "advanced": [ + ("gamma", "str_or_float", "", None, "Empty = 1/n_features."), + ("degree", "int", 3, None, None), + ("coef0", "float", 1.0, None, None), + ("alpha", "float", 1.0, None, None), + ], + }, + "sklearn.manifold.Isomap": { + "pkg": "sklearn", + "label": "Isomap", + "blurb": "Geodesic-distance manifold learning via shortest paths on a k-NN graph.", + "key": [ + ("n_components", "int", 2, None, "Locked."), + ("n_neighbors", "int", 5, None, None), + ], + "advanced": [ + ("metric", "str", "minkowski", None, None), + ("p", "int", 2, None, "Minkowski power (1 = manhattan, 2 = euclidean)."), + ("path_method", "str", "auto", ["auto", "FW", "D"], "Floyd-Warshall / Dijkstra / auto."), + ("neighbors_algorithm", "str", "auto", ["auto", "ball_tree", "kd_tree", "brute"], None), + ], + }, + "sklearn.manifold.MDS": { + "pkg": "sklearn", + "label": "MDS", + "blurb": "Multidimensional scaling. Preserves pairwise distances; O(n²) memory.", + "key": [ + ("n_components", "int", 2, None, "Locked."), + ("n_init", "int", 4, None, None), + ("random_state", "int", 42, None, None), + ], + "advanced": [ + ("max_iter", "int", 300, None, None), + ("metric_mds", "bool", True, None, "Metric (True) vs non-metric MDS."), + ("metric", "str", "euclidean", None, None), + ("eps", "float", 1e-6, None, "Convergence tolerance."), + ], + }, + "sklearn.manifold.SpectralEmbedding": { + "pkg": "sklearn", + "label": "SpectralEmbedding", + "blurb": "Laplacian eigenmaps on an affinity graph. What UMAP uses for initialisation.", + "key": [ + ("n_components", "int", 2, None, "Locked."), + ("affinity", "str", "nearest_neighbors", ["nearest_neighbors", "rbf"], None), + ("random_state", "int", 42, None, None), + ], + "advanced": [ + ("n_neighbors", "int_or_null", "", None, "For affinity=nearest_neighbors. Empty = n/10."), + ("gamma", "str_or_float", "", None, "For affinity=rbf. Empty = 1/n_features."), + ], + }, "sklearn.manifold.TSNE": { "pkg": "sklearn", "label": "t-SNE", @@ -295,6 +356,16 @@ REDUCERS: Dict[str, Dict[str, Any]] = { ("weight_adj", "float", 500.0, None, None), ], }, + "sklearn.random_projection.GaussianRandomProjection": { + "pkg": "sklearn", + "label": "GaussianRandomProjection", + "blurb": "Johnson-Lindenstrauss baseline. Cheap, distance-preserving in expectation, structure-agnostic.", + "key": [ + ("n_components", "int", 2, None, "Locked."), + ("random_state", "int", 42, None, None), + ], + "advanced": [], + }, }