-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Open
Labels
Description
Contributes to #11865.
Fitted Attributes
After the removal of multi_class
and any OvR-logic in LogisticRegressionCV
in #32073, there are a few fitted attributes that have now (or always had) a strange data format (I neglect l1_ratios in the following for ease of reading):
coefs_paths_
is a dictionary with class labels as keys and arrays of shape (n_folds, n_cs, n_features) or similar as values.
Ascoef_
is an array of shape (n_classes, n_features),coefs_paths_
should be an array of shape (n_folds, n_cs, n_classes, n_features), such thatcoefs_paths_[idx_fold, idx_cs, :, :]
gives comparable coefficients. Maybe the intercept should be separated asintercepts_paths_
.scores_
is a dictionary with class labels as keys and arrays of shape (n_folds, n_cs) or similar as values. All values are the same regardless of the key (class label). This is a relict from OvR.
A good value would be just an array of shape (n_folds, n_cs)C_
is an array of shape (n_classes)
As the different penalties for classes are gone with the removal of OvR,C_
should be a single float: the single best penalty parameter.l1_ratio_
same asC_
n_iter_
is an array of shape (1, n_folds, n_cs) or similar
The first dimension should be removed, i.e. shape (n_folds, n_cs)
Deprecation strategy
It is unclear to me how to accomplish the above. Options:
- Deprecate old attributes and introduce new ones with new names. (time = 2 releases)
- Same as 1. but then deprecate new ones and reintroduce the old names. (time = 4 releases)
- Deprecate old attributes and switch behavior in after the deprecation cycle (time = 2 releases)
- Another option?
Usually, we avoided deprecations options like 3.
@scikit-learn/core-devs recall for comments