- Artificial Intelligence By Example
- Denis Rothman
- 58字
- 2021-06-25 21:33:38
4 – Defining the result labels
The initial unlabeled data can now be classified into cluster labels as shown in the following code:
#IV.Defining the Result labels
labels = kmeans.labels_
colors = ['blue','red','green','black','yellow','brown','orange']
Colors can be used for semantic purposes beyond nice display labels. A color for each top customer or leading product can be assigned, for example.