Commit History
-
[NOTICKET] cluster: surface an explicit k the fallback overrode (D-10)
When every candidate k collapsed to a single cluster, analyze_cluster fell back to _K_MIN and returned it as the chosen k -- so a caller's explicit k=5 silently became k=2, and the caveat even claimed that k "was given". Echo requested_k (None for auto) beside the resolved k; when they differ, a caveat explains the fallback fired, replacing the misleading "was given" line. Also marks PR-1 (D-4, D-6, D-7, D-10) done in the plan doc. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>5b7aa18
-
[NOTICKET] feat(tools): analyze_importance + analyze_cluster (unregistered) + CK7
Rifqi Hafizuddin +1: Claude Opus 5A8 and A10. Both files are INERT on purpose: not in _DISPATCH, not in either registry list. registry.py and invoker.py are the two files every tool addition touches, so they stay single-owner until Sofhia makes the call -- the DEFERRED mechanism means an unregistered tool costs nothing. analyze_importance -- rank what explains a target. Standardised coefficients, NOT permutation importance. For a linear model the coefficient IS the importance and comes free with the fit; permutation re-scores once per feature, which is the E4 latency tall pole, and buys nothing here. Ridge for a numeric target, Logistic for a categorical one, auto-detected. Leakage-safe: the scaler is fitted on the TRAIN split only, so no test statistic reaches the fit -- the thing R-3 and the survey literature both single out. analyze_cluster -- discover groups nobody named yet. KMeans with k chosen by silhouette over 2..8, every candidate score returned. Scatter plots two REAL columns rather than PC…9a29ca3