JupyterWorkflow
JupyterWorkflow copied to clipboard
BUG : Cluster labels are switched when the analysis is rerun
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?
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.