resemble-ai / Resemblyzer

A python package to analyze and compare voices with deep learning
Apache License 2.0
2.79k stars 429 forks source link

Disable randomness in demos? #22

Open hagenw opened 4 years ago

hagenw commented 4 years ago

I'm not sure if it is a feature or a bug and what is the cause of the randomness appearing for some demos, e.g. here are two results from running:

python demo03_projection.py

demo03_projection1 demo03_projection2

And here from running:

python demo04_clustering.py

demo04_clustering1 demo04_clustering2

Would be nice if the demos would return always the same result.

hagenw commented 4 years ago

You can avoid the random behavior by passing a state to UMAP, e.g. random_state=42 to plot_projections. See also https://github.com/lmcinnes/umap/issues/27