Here & # 39; Z & # 39; — it is an array of size 100 and values in the range 0 to 255. Now the shape of & # 39; z & # 39; per column vector. It will be more useful when more than one function is present. Then change the data to type np.float32.
Now apply the k-Means clustering algorithm to the same example as in the test data above and see its behavior.
1) First, we need to install the test data.
2) Define the criteria and apply kmeans ().
3) Now split the data.
4) Finally, fill in the data.
This example is intended to illustrate where k-means creates intuitively possible clusters.
1) Identification of cancer data.
2) Predicting student progress.
3) Prediction of drug activity.