2. At first
• I am not a professional of machine learning .
• Please contact me if there is any problem in time how and programs.
• The purpose of this slide is want feedback .
3. K-means
First Step
• Give the numerical value of the random clustering in point
• The finger show that same color point is same clustering
4. Second Step
• Big Point is Each Center
• Average of each clustering points(x, y)
6. Fourth Step
• Continue Second Step and Third Step
until not moving center point or change value is low.
7. X-means
• K = 2 and continue parent’s variance of the center coordinates and each
cluster point < child’s variance of the center coordinates and each cluster
point
8. Compare Parent and 2 Children Center
Dispersion
Point1
Center
Distance1
Parent
If [Parent] > [Cluster Index=0] + [Cluster Index = 1]
(Center Distance Dispersion )
{
Same Processing
}
Else Register Clusters
Cluster Index=0
K=2
Kmenas
Cluster Index=1
K=2
Kmenas
K=2
Kmenas
9. How to calculate Center Distance Average
• Center Distance Average
var cPoints = ClusterPoints.Where(x => x.ClusterIndex == i);
foreach(var p in cPoints) {
var dist = Math.Sqrt(Math.Pow(CenterList[clusterIndex].X - p.Point.X,
2) + Math.Pow(CenterList[clusterIndex].Y - p.Point.Y, 2));
list.Add(dist); }
CenterDistAvg[clusterIndex] = list.Average();
10. How to calculate Center Distance Dispersion
var sum = 0.0;
foreach(var l in list)
{ sum += Math.Pow((l - CenterDistAvg[clusterIndex]),2); }
CenterDistDispersion[clusterIndex] = sum / (double)list.Count;