-
-
Notifications
You must be signed in to change notification settings - Fork 26k
API Accept 'auto' option for 'dual' parameter in LinearSVC and LinearSVR #26093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates, I'm doing a git grep -A3 LinearSVC
to find instances we're missing, and there are some, eg.:
benchmarks/bench_mnist.py: Nystroem(gamma=0.015, n_components=1000), LinearSVC(C=100)
benchmarks/bench_mnist.py- ),
benchmarks/bench_mnist.py- "SampledRBF-SVM": make_pipeline(
benchmarks/bench_mnist.py: RBFSampler(gamma=0.015, n_components=1000), LinearSVC(C=100)
examples/miscellaneous/plot_kernel_approximation.py-nystroem_approx_svm = pipeline.Pipeline(
examples/miscellaneous/plot_kernel_approximation.py: [("feature_map", feature_map_nystroem), ("svm", svm.LinearSVC())]
examples/miscellaneous/plot_kernel_approximation.py-)
examples/miscellaneous/plot_kernel_approximation.py-
examples/model_selection/plot_grid_search_refit_callable.py: ("classify", LinearSVC(random_state=42, C=0.01)),
examples/model_selection/plot_grid_search_refit_callable.py- ]
examples/model_selection/plot_grid_search_refit_callable.py-)
examples/model_selection/plot_precision_recall.py:classifier = make_pipeline(StandardScaler(), LinearSVC(random_state=random_state))
examples/model_selection/plot_precision_recall.py-classifier.fit(X_train, y_train)
examples/model_selection/plot_precision_recall.py: make_pipeline(StandardScaler(), LinearSVC(random_state=random_state))
examples/preprocessing/plot_discretization_classification.py: make_pipeline(StandardScaler(), LinearSVC(random_state=0)),
...
I haven't checked them all, but I think there's more.
@scikit-learn/core-devs since this is something used so much, I wonder if we want to change the default. WDYT?
Yep, maybe it should be done without changing the default |
We previously did similar things for the |
True that I did not think about changing the examples and benchmark. |
Could you please send a commit with |
@adrinjalali will do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to give @scikit-learn/core-devs a few days to object here (if any), otherwise happy to merge in a few days.
Thanks for the awesome work @glevv
Fixes #24651
closes #24731
🤖 Generated by Copilot at cd87daa
Set
dual
to "auto" forLinearSVC
andLinearSVR
in some tests to avoid future warnings. This is a temporary fix for compatibility with the upcoming version of scikit-learn.