[PYTHON] DeepRunning ~ Level 4.6 ~

Level4. Machine learning course (theory and practice)

alt What is a deep learning course that can be crushed in the field in 3 months

4-6. k-means method

4-6-1. What is k-means?

● Unsupervised learning ● It is a clustering method. ● Classify the given data into $ k $ clusters.

[Clustering] Grouping things with similar characteristics.

4-6-2. K-means algorithm

(1) Set the initial value for each cluster center. ⇒ $ k $ needs to be decided in advance. The center of the cluster is randomly selected.

(2) For each data point, calculate the distance from each cluster center and Assign the closest cluster. ⇒ Allocate the cluster closest to the center. Then, all the data is calculated and gradually separated.

(3) Calculate the average vector (center) of each cluster. ⇒ Update the center in each cluster.

④ Repeat the processes of ② and ③ until they converge. ⇒ It is a flow of k-means that can be grouped.

4-6-3. How to determine the initial value of the k-means method

● How to determine the initial value is important. ● Use "k-means ++" to select the next center away from the first center. ⇒ It will take some time, but the result will be better.

4-6-4. Hands-on

k-means0001.png k-means0002.png k-means0003.png k-means0004.png k-means0005.png k-means0006.png

4-6-5. Consideration

k-means is easy to understand even if you follow the code, and it is easy to understand as a method in the first place. Whether it's visualized or explained to others, it's immediately recognized. How the amount of calculation will increase, how much it will affect the number of clusters, etc. In the future, I would like to understand it well during the analysis.

Recommended Posts

DeepRunning ~ Level 6 ~
DeepRunning ~ Level4.4.2 ~
DeepRunning ~ Level 4.6 ~
DeepRunning ~ Level4.3.1 ~
DeepRunning ~ Level 3.2 ~
DeepRunning ~ Level3.3 ~
DeepRunning ~ Level4.3.2 ~
DeepRunning ~ Level7 ~
DeepRunning ~ Level4.5 ~
DeepRunning ~ Level2, Level3.1 ~
DeepRunning ~ Level4.4.1 ~
DeepRunning ~ Level 1 ~
DeepRunning ~ Level 4.7 ~
DeepRunning ~ Level5 ~