davisidarta / topometry

Systematically learn and evaluate manifolds from high-dimensional data
https://topometry.readthedocs.io/en/latest/
MIT License
93 stars 4 forks source link

ValueError Raised During TSNE Projection #19

Open droully opened 1 month ago

droully commented 1 month ago

When attempting to perform a projection using TSNE with the following code, a ValueError is encountered:

tg = tp.TopOGraph(n_eigs=15, n_jobs=-1, verbosity=3)
tg.fit(X)
tg.transform(X)
tg.project(projection_method='t-SNE')

ValueError: The parameter init="pca" cannot be used with metric="precomputed".

This error arises due to a change in scikit-learn version 1.2, where the default value for the init parameter in TSNE was updated from "random" to "pca". Explicitly setting the init parameter to "random" should fix this.