Pca Analysis, K Means, Traffic Data, Data Science, Machine Learning.
columns=['PC1', 'PC2', 'PC3']).reset_index() # Turn the labels from integers to strings, # such that it can be treated as discrete numbers in the plot. cluster_df['label'] = kmeans.labels_ cluster_df['label'] = cluster_df['label'].astype(str) fig = px.scatter_3d(cluster_df, x='PC1', y='PC2',