In this article, we discuss about an example of K means clustering on sample random data by using open-cv library in python for data science.
We will visualize test data with multiple features using matplot-lib tool.
OUTPUT:
Now we will apply k means clustering algorithm to the above illustration and see how it behaves.
We should follow the below mentioned steps:
- First, we will set a test data.
- Then we will define the criteria and apply k means().
- Then we will separate the data.
- In the final stage, we will plot the data.
OUTPUT:
Applications:
- While identification of cancerous data.
- While the prediction of a student’s academic performance.
- The prediction of drug activity.
So, to learn more about it in python for data science, you can check this and this as well.
