手肘法 WCSS 降幅

🤖 Elbow Method WCSS Drop Analyzer

Enter within-cluster sum of squares for several values of k and find the elbow where adding clusters stops paying off.

📐 计算公式 / 原理
降幅 = (WCSS(k) − WCSS(k+1)) / WCSS(k) × 100%;比率 = WCSS(k+1) / WCSS(k)
手肘法看簇内平方和随 K 增大而下降的边际收益:降幅突然变小的拐点即"手肘"。它依赖人眼判读,簇形状不均时拐点不明显,可辅以轮廓系数或 Calinski-Harabasz 指数交叉验证。

📐 计算公式与说明

簇内平方和与肘部判读(本页代码口径):WCSS(k)=Σ‖xᵢ−μ_k‖²,即各样本到其所属簇中心 μ_k 的欧氏距离平方之和,k 增大 WCSS 递减。校验:输入非有限数或首项 WCSS 为 0 作分母时,提示「部分结果无定义(分母为 0 或输入为空),请检查输入」。判据:肘部法看递减拐点——相邻 k 的降幅骤然收窄、后项与前项之比趋近 1 之处即推荐簇数,判读留给用户目测(页面不代判)。

降幅明显减缓处常选为最佳 k。

📚 深度解析:手肘法 WCSS 降幅

💡 常见使用场景

选 k
k=2→WCSS=500, k=3→300(降200), k=4→220(降80), k=5→190(降30)。降幅在 k=3→4 明显放缓,手肘点约 k=3~4,选 k=4 既紧致又不冗余。

❓ 常见问题(FAQ)

手肘法一定准吗?
不一定。数据无清晰簇结构时拐点模糊,需配合轮廓系数、Gap Statistic 或业务含义;手肘法只是启发式起点。
WCSS 一直降要不要一直加 k?
不必。k 接近样本数时 WCSS→0 但失去聚类意义;目标是'信息增益'与'简洁性'平衡,拐点之后边际收益迅速变小。

Formula & Standard References

Item Formula / Note Source / Standard
Definition the elbow method picks k at the bend of the within-cluster sum of squares curve Hartigan & Wong 1979, JASA
WCSS formula WCSS sums squared distances from each point to its cluster centroid MacQueen 1967, Berkeley Symposium
Selection rule past the elbow marginal gain in fit diminishes so the largest-gain k is chosen Lloyd 1982, IEEE Trans. IT