Commit 0264374
fix(kmeans): return NA for silhouette summary aggregates on degenerate input
When per-row silhouette is all-NA (fewer than 2 clusters or distinct points),
the per-cluster summary aggregates previously leaked NaN (avg/pct) and Inf
(min). Guard the all-NA case so avg/min/pct each return NA consistently.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 8ab44d2 commit 0264374
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
0 commit comments