API add option dual="auto" for LinearSVC/LinearSVR - #24731
Conversation
dual="auto" for LinearSVC/LinearSVR
glemaitre
left a comment
There was a problem hiding this comment.
In addition, we will need some tests. Since we will run some deprecation, we need to be sure that we raise the proper warning regarding the change of the default in the future.
In addition, we need to check that "auto" does what we expect.
| and ``loss='hinge'`` is not supported. | ||
|
|
||
| dual : bool, default=True | ||
| dual : {"auto", False, True}, default= "auto" |
There was a problem hiding this comment.
I think that we still need to keep the default as-is and make a deprecation cycle to change the default in 1.4
| dual : {"auto", False, True}, default= "auto" | |
| dual : "auto" or bool, default=True |
| Sets dual = False when n_samples > n_features if dual is "auto" | ||
| and dual = True otherwise. |
There was a problem hiding this comment.
| Sets dual = False when n_samples > n_features if dual is "auto" | |
| and dual = True otherwise. | |
| `dual="auto"` is equivalent to `dual=False` when | |
| `n_samples > n_features` and `dual=True` otherwise. |
| optimization problem. | ||
| Sets dual = False when n_samples > n_features if dual is "auto" | ||
| and dual = True otherwise. | ||
|
|
There was a problem hiding this comment.
| .. versionchanged:: 1.4 | |
| The default value will change from `True` to `"auto"` in 1.4. |
| loss="squared_hinge", | ||
| *, | ||
| dual=True, | ||
| dual="auto", |
There was a problem hiding this comment.
For making the change for the future, you can check the following documentation: https://scikit-learn.org/dev/developers/contributing.html#change-the-default-value-of-a-parameter
| Sets dual = False when n_samples > n_features if dual is "auto" | ||
| and dual = True otherwise. |
There was a problem hiding this comment.
| Sets dual = False when n_samples > n_features if dual is "auto" | |
| and dual = True otherwise. | |
| `dual="auto"` is equivalent to `dual=False` when | |
| `n_samples > n_features` and `dual=True` otherwise. | |
| .. versionchanged:: 1.4 | |
| The default value will change from `True` to `"auto"` in 1.4. |
| (and therefore on the intercept) intercept_scaling has to be increased. | ||
|
|
||
| dual : bool, default=True | ||
| dual : {"auto", False, True}, default= "auto" |
There was a problem hiding this comment.
| dual : {"auto", False, True}, default= "auto" | |
| dual : "auto" or bool, default=True |
|
The CI tell us that we need to modify the We also need to acknowledge the change in the changelog by adding an entry in |
Reference Issues/PRs
In reference to issue #24651. The original issue is updated with the relevant benchmarks in the comments.
What does this implement/fix? Explain your changes.
Sets the default value to "auto" and selects if the problem needs to be solved in primal or dual.
Any other comments?