JupyterWorkflow icon indicating copy to clipboard operation
JupyterWorkflow copied to clipboard

BUG : Cluster labels are switched when the analysis is rerun

Open rahulporuri opened this issue 7 years ago • 1 comments

In https://github.com/jakevdp/JupyterWorkflow/blob/master/UnsupervisedAnalysis.ipynb , correct me if i'm wrong but the cluster labels seem to be switched from the first time the analysis was run. The fact that the labels are switched can also be seen in the Analyzing outliers section of the notebook, where the results now show all weekdays instead of weekend like ride patters on weekdays.

Does the gmm assign the labels 0, 1 in the same way it did during the last run?

rahulporuri avatar Mar 28 '17 04:03 rahulporuri

GMM has an internal parameter random_state that can be used to make the results reproducible. I didn't do this in the video, but you can set it to a particular value if you wish for the results to be the same every time it's run.

jakevdp avatar Mar 28 '17 18:03 jakevdp