[{"data":1,"prerenderedAt":1209},["ShallowReactive",2],{"$Tf1XNfaHeh":3},{"id":4,"title":5,"body":6,"description":172,"extension":1202,"meta":1203,"navigation":1204,"path":1205,"seo":1206,"stem":1207,"__hash__":1208},"content/modules/clustering/k-means/content.md","K-Means Clustering",{"type":7,"value":8,"toc":1132},"minimark",[9,13,18,22,25,29,32,54,58,66,71,109,113,116,127,131,134,138,141,155,159,162,173,176,180,183,189,192,198,202,205,209,212,216,219,230,235,255,258,269,273,276,280,283,289,292,296,299,302,306,315,319,322,328,333,353,356,360,363,369,373,399,405,431,435,438,449,453,456,465,469,483,486,490,501,504,508,511,522,526,529,533,542,545,549,552,556,559,563,566,570,573,577,581,584,604,607,611,614,625,629,632,643,647,650,661,665,668,679,683,686,692,706,712,715,719,723,726,746,750,753,773,777,780,800,804,808,811,853,856,860,863,867,870,874,877,881,884,888,891,895,898,902,905,908,922,925,939,942,945,959,963,966,980,983,986,997,1001,1004,1018,1022,1025,1039,1043,1046,1066,1069,1083,1087,1090,1128],[10,11,5],"h1",{"id":12},"k-means-clustering",[14,15,17],"h2",{"id":16},"introduction","Introduction",[19,20,21],"p",{},"K-Means is one of the most popular and widely-used unsupervised learning algorithms for clustering. Unlike supervised learning where we have labeled data, clustering algorithms discover hidden patterns and group similar data points together without any prior labels.",[19,23,24],{},"K-Means is elegant in its simplicity: it partitions data into k distinct clusters by iteratively assigning points to the nearest cluster center and updating those centers. Despite its simplicity, it's remarkably effective for many real-world applications.",[14,26,28],{"id":27},"what-youll-learn","What You'll Learn",[19,30,31],{},"By the end of this module, you will:",[33,34,35,39,42,45,48,51],"ul",{},[36,37,38],"li",{},"Understand how K-Means iteratively finds cluster centers",[36,40,41],{},"Learn why initialization matters (K-Means++ vs random)",[36,43,44],{},"Interpret clustering quality metrics (inertia, silhouette score)",[36,46,47],{},"Recognize the impact of choosing different values of k",[36,49,50],{},"Understand when K-Means works well and when it struggles",[36,52,53],{},"Visualize how clusters evolve during the algorithm's iterations",[14,55,57],{"id":56},"what-is-clustering","What is Clustering?",[19,59,60,61,65],{},"Clustering is the task of grouping similar items together. It's an ",[62,63,64],"strong",{},"unsupervised learning"," problem because we don't have labels telling us which group each item belongs to - the algorithm must discover the groups on its own.",[67,68,70],"h3",{"id":69},"real-world-examples","Real-World Examples",[33,72,73,79,85,91,97,103],{},[36,74,75,78],{},[62,76,77],{},"Customer Segmentation",": Group customers by purchasing behavior",[36,80,81,84],{},[62,82,83],{},"Image Compression",": Reduce colors by clustering similar pixels",[36,86,87,90],{},[62,88,89],{},"Document Organization",": Group similar documents or articles",[36,92,93,96],{},[62,94,95],{},"Anomaly Detection",": Identify outliers that don't fit any cluster",[36,98,99,102],{},[62,100,101],{},"Gene Expression Analysis",": Find groups of genes with similar behavior",[36,104,105,108],{},[62,106,107],{},"Market Research",": Identify distinct market segments",[14,110,112],{"id":111},"the-k-means-algorithm","The K-Means Algorithm",[19,114,115],{},"K-Means follows a simple iterative process:",[19,117,118,123],{},[119,120],"img",{"alt":121,"src":122},"K-Means Algorithm Visualization","https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/K-means_convergence.gif/400px-K-means_convergence.gif",[124,125,126],"em",{},"K-Means iteratively assigns points to clusters and updates centroids",[67,128,130],{"id":129},"step-1-choose-k","Step 1: Choose K",[19,132,133],{},"Decide how many clusters (k) you want to find. This is a hyperparameter you must specify before running the algorithm.",[67,135,137],{"id":136},"step-2-initialize-centroids","Step 2: Initialize Centroids",[19,139,140],{},"Choose k initial cluster centers (centroids). This can be done:",[33,142,143,149],{},[36,144,145,148],{},[62,146,147],{},"Randomly",": Pick k random data points as initial centroids",[36,150,151,154],{},[62,152,153],{},"K-Means++",": Use a smarter initialization (explained below)",[67,156,158],{"id":157},"step-3-assignment-step","Step 3: Assignment Step",[19,160,161],{},"Assign each data point to the nearest centroid. \"Nearest\" is typically measured using Euclidean distance:",[163,164,169],"pre",{"className":165,"code":167,"language":168},[166],"language-text","distance = √[(x₁ - c₁)² + (x₂ - c₂)² + ...]\n","text",[170,171,167],"code",{"__ignoreMap":172},"",[19,174,175],{},"Where (x₁, x₂, ...) is the data point and (c₁, c₂, ...) is the centroid.",[67,177,179],{"id":178},"step-4-update-step","Step 4: Update Step",[19,181,182],{},"Recalculate each centroid as the mean (average) of all points assigned to that cluster:",[163,184,187],{"className":185,"code":186,"language":168},[166],"new_centroid = mean of all points in cluster\n",[170,188,186],{"__ignoreMap":172},[19,190,191],{},"For example, if cluster 1 contains points (1,2), (2,3), and (3,4):",[163,193,196],{"className":194,"code":195,"language":168},[166],"new_centroid = ((1+2+3)/3, (2+3+4)/3) = (2, 3)\n",[170,197,195],{"__ignoreMap":172},[67,199,201],{"id":200},"step-5-check-convergence","Step 5: Check Convergence",[19,203,204],{},"Check if the centroids have stopped moving (or moved less than a small threshold). If yes, stop. If no, go back to Step 3.",[67,206,208],{"id":207},"step-6-repeat","Step 6: Repeat",[19,210,211],{},"Continue the assignment and update steps until convergence or until reaching the maximum number of iterations.",[14,213,215],{"id":214},"k-means-initialization","K-Means++ Initialization",[19,217,218],{},"Standard random initialization can lead to poor results because:",[33,220,221,224,227],{},[36,222,223],{},"Random centroids might all be close together",[36,225,226],{},"Some regions of data might not have any initial centroids",[36,228,229],{},"The algorithm might converge to a suboptimal solution",[19,231,232,234],{},[62,233,153],{}," solves this with a smarter initialization:",[236,237,238,241],"ol",{},[36,239,240],{},"Choose the first centroid randomly from the data points",[36,242,243,244],{},"For each remaining centroid:\n",[33,245,246,249,252],{},[36,247,248],{},"Calculate the distance from each point to its nearest existing centroid",[36,250,251],{},"Choose the next centroid with probability proportional to distance²",[36,253,254],{},"This favors points that are far from existing centroids",[19,256,257],{},"This spreads out the initial centroids, leading to:",[33,259,260,263,266],{},[36,261,262],{},"Faster convergence",[36,264,265],{},"Better final clustering",[36,267,268],{},"More consistent results",[14,270,272],{"id":271},"convergence","Convergence",[19,274,275],{},"The algorithm stops when one of these conditions is met:",[67,277,279],{"id":278},"centroid-stability","Centroid Stability",[19,281,282],{},"Centroids stop moving (or move less than a tolerance threshold):",[163,284,287],{"className":285,"code":286,"language":168},[166],"max_centroid_shift \u003C tolerance\n",[170,288,286],{"__ignoreMap":172},[19,290,291],{},"This means the clusters have stabilized and further iterations won't improve them.",[67,293,295],{"id":294},"maximum-iterations","Maximum Iterations",[19,297,298],{},"A maximum number of iterations is reached. This prevents the algorithm from running forever if it doesn't converge.",[19,300,301],{},"Typical values: 100-300 iterations",[14,303,305],{"id":304},"clustering-quality-metrics","Clustering Quality Metrics",[19,307,308,312],{},[119,309],{"alt":310,"src":311},"Silhouette Score Visualization","https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Silhouette-plot-orange.png/500px-Silhouette-plot-orange.png",[124,313,314],{},"Silhouette plot showing cluster quality and separation",[67,316,318],{"id":317},"inertia-within-cluster-sum-of-squares","Inertia (Within-Cluster Sum of Squares)",[19,320,321],{},"Inertia measures how tightly grouped the clusters are:",[163,323,326],{"className":324,"code":325,"language":168},[166],"Inertia = Σ (distance from each point to its centroid)²\n",[170,327,325],{"__ignoreMap":172},[19,329,330],{},[62,331,332],{},"Interpretation:",[33,334,335,341,347],{},[36,336,337,340],{},[62,338,339],{},"Lower is better",": Points are closer to their centroids",[36,342,343,346],{},[62,344,345],{},"Always decreases"," as k increases",[36,348,349,352],{},[62,350,351],{},"Not comparable"," across different datasets",[19,354,355],{},"Inertia alone isn't enough to evaluate clustering quality because it always improves with more clusters. With k = n (number of points), inertia would be 0!",[67,357,359],{"id":358},"silhouette-score","Silhouette Score",[19,361,362],{},"The silhouette score measures how similar each point is to its own cluster compared to other clusters:",[163,364,367],{"className":365,"code":366,"language":168},[166],"For each point:\n  a = mean distance to other points in same cluster\n  b = mean distance to points in nearest other cluster\n  silhouette = (b - a) / max(a, b)\n",[170,368,366],{"__ignoreMap":172},[19,370,371],{},[62,372,332],{},[33,374,375,381,387,393],{},[36,376,377,380],{},[62,378,379],{},"Range",": -1 to +1",[36,382,383,386],{},[62,384,385],{},"Close to +1",": Point is well-matched to its cluster and far from others",[36,388,389,392],{},[62,390,391],{},"Close to 0",": Point is on the border between clusters",[36,394,395,398],{},[62,396,397],{},"Negative",": Point might be in the wrong cluster",[19,400,401,404],{},[62,402,403],{},"Average silhouette score"," across all points indicates overall clustering quality:",[33,406,407,413,419,425],{},[36,408,409,412],{},[62,410,411],{},"0.7 to 1.0",": Strong structure",[36,414,415,418],{},[62,416,417],{},"0.5 to 0.7",": Reasonable structure",[36,420,421,424],{},[62,422,423],{},"0.25 to 0.5",": Weak structure",[36,426,427,430],{},[62,428,429],{},"Below 0.25",": No substantial structure",[67,432,434],{"id":433},"cluster-sizes","Cluster Sizes",[19,436,437],{},"The number of points in each cluster. Ideally, clusters should have reasonable sizes:",[33,439,440,443,446],{},[36,441,442],{},"Very small clusters might be outliers",[36,444,445],{},"One huge cluster and tiny others suggests poor clustering",[36,447,448],{},"Roughly balanced sizes often indicate good clustering (but not always!)",[14,450,452],{"id":451},"choosing-the-right-k","Choosing the Right K",[19,454,455],{},"Choosing k (the number of clusters) is one of the biggest challenges in K-Means. Here are some approaches:",[19,457,458,462],{},[119,459],{"alt":460,"src":461},"Elbow Method","https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/DataClustering_ElbowCriterion.JPG/500px-DataClustering_ElbowCriterion.JPG",[124,463,464],{},"The elbow method helps identify the optimal number of clusters",[67,466,468],{"id":467},"the-elbow-method","The Elbow Method",[236,470,471,474,477,480],{},[36,472,473],{},"Run K-Means for different values of k (e.g., 2 to 10)",[36,475,476],{},"Plot k vs inertia",[36,478,479],{},"Look for the \"elbow\" - where inertia stops decreasing rapidly",[36,481,482],{},"Choose the k at the elbow point",[19,484,485],{},"The elbow represents the point where adding more clusters doesn't significantly improve the clustering.",[67,487,489],{"id":488},"silhouette-analysis","Silhouette Analysis",[236,491,492,495,498],{},[36,493,494],{},"Run K-Means for different values of k",[36,496,497],{},"Calculate the average silhouette score for each k",[36,499,500],{},"Choose the k with the highest silhouette score",[19,502,503],{},"This approach considers both cluster cohesion and separation.",[67,505,507],{"id":506},"domain-knowledge","Domain Knowledge",[19,509,510],{},"Sometimes you know how many clusters make sense:",[33,512,513,516,519],{},[36,514,515],{},"Customer segments: 3-5 groups (budget, mid-range, premium, etc.)",[36,517,518],{},"Image compression: Based on desired compression ratio",[36,520,521],{},"Document topics: Based on known categories",[67,523,525],{"id":524},"gap-statistic","Gap Statistic",[19,527,528],{},"Compare the inertia of your clustering to that of random data. The optimal k maximizes the \"gap\" between your data's structure and random data.",[14,530,532],{"id":531},"when-k-means-works-well","When K-Means Works Well",[19,534,535,539],{},[119,536],{"alt":537,"src":538},"K-Means Cluster Shapes","https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/ClusterAnalysis_Mouse.svg/500px-ClusterAnalysis_Mouse.svg.png",[124,540,541],{},"K-Means works best with spherical, well-separated clusters",[19,543,544],{},"K-Means performs best when:",[67,546,548],{"id":547},"spherical-clusters","Spherical Clusters",[19,550,551],{},"Clusters are roughly circular/spherical in shape. K-Means assumes clusters are convex and isotropic (same variance in all directions).",[67,553,555],{"id":554},"similar-sizes","Similar Sizes",[19,557,558],{},"Clusters have similar numbers of points. K-Means tends to create equal-sized clusters even if the true clusters have different sizes.",[67,560,562],{"id":561},"well-separated","Well-Separated",[19,564,565],{},"Clusters are clearly separated with little overlap. K-Means struggles with overlapping clusters.",[67,567,569],{"id":568},"similar-density","Similar Density",[19,571,572],{},"Clusters have similar density (points per unit area). K-Means may split dense clusters or merge sparse ones.",[14,574,576],{"id":575},"limitations-and-challenges","Limitations and Challenges",[67,578,580],{"id":579},"non-spherical-shapes","Non-Spherical Shapes",[19,582,583],{},"K-Means fails on:",[33,585,586,592,598],{},[36,587,588,591],{},[62,589,590],{},"Elongated clusters",": Elliptical or stretched shapes",[36,593,594,597],{},[62,595,596],{},"Concentric circles",": Rings or nested structures",[36,599,600,603],{},[62,601,602],{},"Complex shapes",": Moons, spirals, or irregular patterns",[19,605,606],{},"For these, consider DBSCAN, hierarchical clustering, or spectral clustering.",[67,608,610],{"id":609},"sensitivity-to-initialization","Sensitivity to Initialization",[19,612,613],{},"Despite K-Means++, different initializations can lead to different results. Solutions:",[33,615,616,619,622],{},[36,617,618],{},"Run multiple times with different random seeds",[36,620,621],{},"Use K-Means++ initialization",[36,623,624],{},"Choose the run with the lowest inertia",[67,626,628],{"id":627},"sensitivity-to-outliers","Sensitivity to Outliers",[19,630,631],{},"Outliers can significantly affect centroid positions. Solutions:",[33,633,634,637,640],{},[36,635,636],{},"Remove outliers before clustering",[36,638,639],{},"Use more robust algorithms (K-Medoids, DBSCAN)",[36,641,642],{},"Use larger k to isolate outliers in their own clusters",[67,644,646],{"id":645},"must-specify-k","Must Specify K",[19,648,649],{},"You must choose k before running the algorithm. This requires:",[33,651,652,655,658],{},[36,653,654],{},"Domain knowledge",[36,656,657],{},"Trial and error with different k values",[36,659,660],{},"Using methods like the elbow method",[67,662,664],{"id":663},"assumes-equal-variance","Assumes Equal Variance",[19,666,667],{},"K-Means assumes all features have similar scales and variances. Solutions:",[33,669,670,673,676],{},[36,671,672],{},"Standardize features before clustering",[36,674,675],{},"Use weighted distance metrics",[36,677,678],{},"Consider other algorithms for features with very different scales",[14,680,682],{"id":681},"computational-complexity","Computational Complexity",[19,684,685],{},"K-Means is efficient:",[19,687,688,691],{},[62,689,690],{},"Time Complexity",": O(n × k × i × d)",[33,693,694,697,700,703],{},[36,695,696],{},"n = number of points",[36,698,699],{},"k = number of clusters",[36,701,702],{},"i = number of iterations",[36,704,705],{},"d = number of dimensions",[19,707,708,711],{},[62,709,710],{},"Space Complexity",": O(n × d + k × d)",[19,713,714],{},"This makes K-Means suitable for large datasets, especially compared to hierarchical clustering which is O(n³).",[14,716,718],{"id":717},"variants-of-k-means","Variants of K-Means",[67,720,722],{"id":721},"mini-batch-k-means","Mini-Batch K-Means",[19,724,725],{},"Uses random samples (mini-batches) instead of all data in each iteration:",[33,727,728,734,740],{},[36,729,730,733],{},[62,731,732],{},"Faster"," for large datasets",[36,735,736,739],{},[62,737,738],{},"Slightly less accurate"," but usually good enough",[36,741,742,745],{},[62,743,744],{},"More scalable"," to millions of points",[67,747,749],{"id":748},"k-medoids-pam","K-Medoids (PAM)",[19,751,752],{},"Uses actual data points as cluster centers instead of means:",[33,754,755,761,767],{},[36,756,757,760],{},[62,758,759],{},"More robust"," to outliers",[36,762,763,766],{},[62,764,765],{},"Works with"," any distance metric",[36,768,769,772],{},[62,770,771],{},"Slower"," than K-Means",[67,774,776],{"id":775},"fuzzy-c-means","Fuzzy C-Means",[19,778,779],{},"Allows points to belong to multiple clusters with different degrees:",[33,781,782,788,794],{},[36,783,784,787],{},[62,785,786],{},"Soft clustering"," instead of hard assignments",[36,789,790,793],{},[62,791,792],{},"Better for"," overlapping clusters",[36,795,796,799],{},[62,797,798],{},"More complex"," to interpret",[14,801,803],{"id":802},"tips-for-better-results","Tips for Better Results",[67,805,807],{"id":806},"_1-standardize-features","1. Standardize Features",[19,809,810],{},"Scale all features to similar ranges:",[163,812,816],{"className":813,"code":814,"language":815,"meta":172,"style":172},"language-python shiki shiki-themes github-light github-dark github-dark","# Standardization (z-score)\nx_scaled = (x - mean) / std_dev\n","python",[170,817,818,827],{"__ignoreMap":172},[819,820,823],"span",{"class":821,"line":822},"line",1,[819,824,826],{"class":825},"s4-Ip","# Standardization (z-score)\n",[819,828,830,834,838,841,844,847,850],{"class":821,"line":829},2,[819,831,833],{"class":832},"sT4rp","x_scaled ",[819,835,837],{"class":836},"sPXRo","=",[819,839,840],{"class":832}," (x ",[819,842,843],{"class":836},"-",[819,845,846],{"class":832}," mean) ",[819,848,849],{"class":836},"/",[819,851,852],{"class":832}," std_dev\n",[19,854,855],{},"This prevents features with large values from dominating the distance calculation.",[67,857,859],{"id":858},"_2-remove-outliers","2. Remove Outliers",[19,861,862],{},"Identify and remove extreme outliers before clustering, as they can distort cluster centers.",[67,864,866],{"id":865},"_3-try-multiple-k-values","3. Try Multiple K Values",[19,868,869],{},"Don't settle on the first k you try. Experiment with different values and use the elbow method or silhouette analysis.",[67,871,873],{"id":872},"_4-run-multiple-times","4. Run Multiple Times",[19,875,876],{},"Run K-Means several times with different random seeds and choose the best result (lowest inertia).",[67,878,880],{"id":879},"_5-use-k-means","5. Use K-Means++",[19,882,883],{},"Always use K-Means++ initialization instead of random initialization for more consistent results.",[67,885,887],{"id":886},"_6-visualize-results","6. Visualize Results",[19,889,890],{},"Plot your clusters (in 2D or 3D) to visually inspect if they make sense. Use dimensionality reduction (PCA, t-SNE) for high-dimensional data.",[67,892,894],{"id":893},"_7-validate-with-domain-knowledge","7. Validate with Domain Knowledge",[19,896,897],{},"Check if the discovered clusters align with your understanding of the data. Clustering is exploratory - the algorithm doesn't know what makes sense in your domain.",[14,899,901],{"id":900},"real-world-applications","Real-World Applications",[67,903,77],{"id":904},"customer-segmentation",[19,906,907],{},"Group customers by:",[33,909,910,913,916,919],{},[36,911,912],{},"Purchase history",[36,914,915],{},"Demographics",[36,917,918],{},"Browsing behavior",[36,920,921],{},"Engagement patterns",[19,923,924],{},"Use clusters to:",[33,926,927,930,933,936],{},[36,928,929],{},"Personalize marketing",[36,931,932],{},"Recommend products",[36,934,935],{},"Optimize pricing",[36,937,938],{},"Improve retention",[67,940,83],{"id":941},"image-compression",[19,943,944],{},"Reduce the number of colors in an image:",[236,946,947,950,953,956],{},[36,948,949],{},"Treat each pixel as a point in RGB space",[36,951,952],{},"Cluster pixels into k colors",[36,954,955],{},"Replace each pixel with its cluster center color",[36,957,958],{},"Achieve compression by storing only k colors + assignments",[67,960,962],{"id":961},"document-clustering","Document Clustering",[19,964,965],{},"Group similar documents:",[33,967,968,971,974,977],{},[36,969,970],{},"News articles by topic",[36,972,973],{},"Research papers by field",[36,975,976],{},"Customer reviews by sentiment",[36,978,979],{},"Emails by category",[67,981,95],{"id":982},"anomaly-detection",[19,984,985],{},"Identify unusual patterns:",[33,987,988,991,994],{},[36,989,990],{},"Points far from all centroids are anomalies",[36,992,993],{},"Very small clusters might represent unusual behavior",[36,995,996],{},"Useful for fraud detection, quality control, network security",[67,998,1000],{"id":999},"recommendation-systems","Recommendation Systems",[19,1002,1003],{},"Find similar users or items:",[33,1005,1006,1009,1012,1015],{},[36,1007,1008],{},"Cluster users by preferences",[36,1010,1011],{},"Recommend items popular in the user's cluster",[36,1013,1014],{},"Cluster items by features",[36,1016,1017],{},"Suggest similar items from the same cluster",[67,1019,1021],{"id":1020},"genomics","Genomics",[19,1023,1024],{},"Analyze gene expression data:",[33,1026,1027,1030,1033,1036],{},[36,1028,1029],{},"Cluster genes with similar expression patterns",[36,1031,1032],{},"Identify gene functions",[36,1034,1035],{},"Discover disease subtypes",[36,1037,1038],{},"Understand biological processes",[14,1040,1042],{"id":1041},"summary","Summary",[19,1044,1045],{},"K-Means clustering is a powerful yet simple algorithm that:",[33,1047,1048,1051,1054,1057,1060,1063],{},[36,1049,1050],{},"Groups similar data points into k clusters",[36,1052,1053],{},"Uses iterative assignment and update steps",[36,1055,1056],{},"Works best with spherical, well-separated clusters",[36,1058,1059],{},"Requires choosing k beforehand",[36,1061,1062],{},"Benefits greatly from K-Means++ initialization",[36,1064,1065],{},"Is fast and scalable to large datasets",[19,1067,1068],{},"Understanding K-Means provides a foundation for:",[33,1070,1071,1074,1077,1080],{},[36,1072,1073],{},"Other clustering algorithms",[36,1075,1076],{},"Unsupervised learning concepts",[36,1078,1079],{},"Data exploration and pattern discovery",[36,1081,1082],{},"Feature engineering for supervised learning",[14,1084,1086],{"id":1085},"next-steps","Next Steps",[19,1088,1089],{},"After mastering K-Means, you can explore:",[33,1091,1092,1098,1104,1110,1116,1122],{},[36,1093,1094,1097],{},[62,1095,1096],{},"Hierarchical Clustering",": Build a tree of clusters",[36,1099,1100,1103],{},[62,1101,1102],{},"DBSCAN",": Density-based clustering for arbitrary shapes",[36,1105,1106,1109],{},[62,1107,1108],{},"Gaussian Mixture Models",": Probabilistic clustering",[36,1111,1112,1115],{},[62,1113,1114],{},"Spectral Clustering",": For complex cluster shapes",[36,1117,1118,1121],{},[62,1119,1120],{},"Dimensionality Reduction",": PCA, t-SNE for visualization",[36,1123,1124,1127],{},[62,1125,1126],{},"Cluster Validation",": Advanced metrics and techniques",[1129,1130,1131],"style",{},"html pre.shiki code .s4-Ip, html code.shiki .s4-Ip{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#6A737D}html pre.shiki code .sT4rp, html code.shiki .sT4rp{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#E1E4E8}html pre.shiki code .sPXRo, html code.shiki .sPXRo{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":172,"searchDepth":829,"depth":1133,"links":1134},3,[1135,1136,1137,1140,1148,1149,1153,1158,1164,1170,1177,1178,1183,1192,1200,1201],{"id":16,"depth":829,"text":17},{"id":27,"depth":829,"text":28},{"id":56,"depth":829,"text":57,"children":1138},[1139],{"id":69,"depth":1133,"text":70},{"id":111,"depth":829,"text":112,"children":1141},[1142,1143,1144,1145,1146,1147],{"id":129,"depth":1133,"text":130},{"id":136,"depth":1133,"text":137},{"id":157,"depth":1133,"text":158},{"id":178,"depth":1133,"text":179},{"id":200,"depth":1133,"text":201},{"id":207,"depth":1133,"text":208},{"id":214,"depth":829,"text":215},{"id":271,"depth":829,"text":272,"children":1150},[1151,1152],{"id":278,"depth":1133,"text":279},{"id":294,"depth":1133,"text":295},{"id":304,"depth":829,"text":305,"children":1154},[1155,1156,1157],{"id":317,"depth":1133,"text":318},{"id":358,"depth":1133,"text":359},{"id":433,"depth":1133,"text":434},{"id":451,"depth":829,"text":452,"children":1159},[1160,1161,1162,1163],{"id":467,"depth":1133,"text":468},{"id":488,"depth":1133,"text":489},{"id":506,"depth":1133,"text":507},{"id":524,"depth":1133,"text":525},{"id":531,"depth":829,"text":532,"children":1165},[1166,1167,1168,1169],{"id":547,"depth":1133,"text":548},{"id":554,"depth":1133,"text":555},{"id":561,"depth":1133,"text":562},{"id":568,"depth":1133,"text":569},{"id":575,"depth":829,"text":576,"children":1171},[1172,1173,1174,1175,1176],{"id":579,"depth":1133,"text":580},{"id":609,"depth":1133,"text":610},{"id":627,"depth":1133,"text":628},{"id":645,"depth":1133,"text":646},{"id":663,"depth":1133,"text":664},{"id":681,"depth":829,"text":682},{"id":717,"depth":829,"text":718,"children":1179},[1180,1181,1182],{"id":721,"depth":1133,"text":722},{"id":748,"depth":1133,"text":749},{"id":775,"depth":1133,"text":776},{"id":802,"depth":829,"text":803,"children":1184},[1185,1186,1187,1188,1189,1190,1191],{"id":806,"depth":1133,"text":807},{"id":858,"depth":1133,"text":859},{"id":865,"depth":1133,"text":866},{"id":872,"depth":1133,"text":873},{"id":879,"depth":1133,"text":880},{"id":886,"depth":1133,"text":887},{"id":893,"depth":1133,"text":894},{"id":900,"depth":829,"text":901,"children":1193},[1194,1195,1196,1197,1198,1199],{"id":904,"depth":1133,"text":77},{"id":941,"depth":1133,"text":83},{"id":961,"depth":1133,"text":962},{"id":982,"depth":1133,"text":95},{"id":999,"depth":1133,"text":1000},{"id":1020,"depth":1133,"text":1021},{"id":1041,"depth":829,"text":1042},{"id":1085,"depth":829,"text":1086},"md",{},true,"/modules/clustering/k-means/content",{"title":5,"description":172},"modules/clustering/k-means/content","P4oP2GhmH3DJ17VSzkiwGKfnRf0mTcHZhxN3h0QHhHA",1792223550767]