March 2019
Intermediate to advanced
532 pages
13h 2m
English
In this example, we are going to cluster a set of 2D points using the k-means clustering algorithm. This set of 2D points can be seen as a collection of objects, which has been described using two features. This set of 2D points can be created and visualized with the k_means_clustering_data_visualization.py script.
The output of this script can be seen in the next screenshot:

This set of 2D points consists of 150 points, created in this way:
data = np.float32(np.vstack( (np.random.randint(0, 40, (50, 2)), np.random.randint(30, 70, (50, 2)), np.random.randint(60, 100, (50, 2)))))
This will represent the data ...
Read now
Unlock full access