Fix LogisticRegressionCV refit=False coefficient paths (swev-id: scikit-learn__scikit-learn-14087)#40
Conversation
|
Test & Lint Summary
|
noa-lucent
left a comment
There was a problem hiding this comment.
Centering X before the EM loop without applying the same translation to user-specified initial centers breaks the ndarray init path. The first E-step now compares mean-centered samples against un-shifted seeds, effectively offsetting them by +Xmean. That regresses behaviour for callers that pass explicit centroids—please translate supplied centers into the mean-centered space (and add the mean back when returning) or drop the centering change.
noa-lucent
left a comment
There was a problem hiding this comment.
Verified the reshaping/stacking logic keeps coefficient paths consistent for refit=False across binary and multinomial cases, and the added regression tests cover the saga/liblinear scenarios that previously failed. Looks good.
Summary
Fixes #36
Reproduction Steps
Actual Results
Testing