Commit 2cbd3f6
feat: Add RobustKMeans, tests for new components, and bug fixes
New Features:
- RobustKMeans estimator with trim, noise_cluster, and m_estimator modes
for outlier-resistant clustering with outlier score output
- Comprehensive test suites for previously untested components
Test Suites Added (108 new tests, 716 total):
- OutlierDetectionSuite: 16 tests for distance-based/trimmed detection
- SparseBregmanKernelSuite: 28 tests for sparse SE, KL, L1, Spherical kernels
- ConstraintsSuite: 30 tests for must-link/cannot-link constraints
- ConstrainedKMeansSuite: 17 tests for semi-supervised clustering
- RobustKMeansSuite: 17 tests for robust clustering with persistence
- ExtendedPersistenceSuite: 5 tests for new model persistence
Bug Fixes:
- SparseSEKernel.divergenceSparse missing 0.5 factor
- AgglomerativeBregmanModel persistence serializing IntParam instead of value
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent d5c40d6 commit 2cbd3f6
File tree
30 files changed
+7183
-439
lines changed- src
- main/scala/com/massivedatascience/clusterer/ml
- df
- kernels
- test/scala/com/massivedatascience/clusterer/ml
- df
- kernels
30 files changed
+7183
-439
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
16 | 28 | | |
17 | 29 | | |
18 | 30 | | |
19 | 31 | | |
| 32 | + | |
| 33 | + | |
20 | 34 | | |
21 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
22 | 49 | | |
23 | 50 | | |
24 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
44 | 43 | | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments