Skip to content

Commit 0dbfc69

Browse files
derrickburnsclaude
andcommitted
feat(logging): add strategy selection logging to GeneralizedKMeans
Add detailed logging when GeneralizedKMeans selects assignment, update, and empty cluster handling strategies. This helps users understand which strategy was chosen (especially important for "auto" assignment mode) and aids troubleshooting performance issues. Log output example: ``` Strategy selection: assignment=AutoAssignment, update=GradMeanUDAFUpdate, emptyHandler=ReseedRandomHandler ``` This addresses ACTION_ITEMS Production Blockers B (assignment scalability) and I (API clarity & parameter semantics) by making strategy selection transparent to users. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 70784f4 commit 0dbfc69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/scala/com/massivedatascience/clusterer/ml/GeneralizedKMeans.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ class GeneralizedKMeans(override val uid: String)
127127
val convergence = new MovementConvergence()
128128
val validator = new StandardInputValidator()
129129

130+
logInfo(
131+
s"Strategy selection: assignment=${assigner.getClass.getSimpleName}, " +
132+
s"update=${updater.getClass.getSimpleName}, emptyHandler=${emptyHandler.getClass.getSimpleName}"
133+
)
134+
130135
// Create config
131136
val config = LloydsConfig(
132137
k = $(k),

0 commit comments

Comments
 (0)