shawntschwartz / eeb-c177-w20

lab section materials for eeb c177/c234 @ucla (winter 2020) 🐻
https://shawnschwartz.com/eeb-c177-w20/
Other
23 stars 1 forks source link

How to differentiate colors on a k-means cluster plot #58

Closed soniavsd closed 4 years ago

soniavsd commented 4 years ago

How could I tell which categories each color stood for on this graph? Screen Shot 2020-03-07 at 5 01 37 PM

shawntschwartz commented 4 years ago

@soniavsd the way that you can differentiate the colors is by printing out the y_pred labels variable side-by-side with the list of countries that match those points. If you separate all of the names of the country by their corresponding y_pred cluster number, you can get an idea as to which points are clustered together (and then infer reasons/possible explanations as to why those points may be clustered together).