When to use dual=False in LinearSVC? the document looks confusing
See original GitHub issueThe default value for dual
is True
, which should correspond to the case where n_samples > n_features
(usual case). But the document also says Prefer dual=False when n_samples > n_features.
, which looks really confusing to me.
So, which case we should use dual=False
?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
sklearn.svm.LinearSVC — scikit-learn 1.2.0 documentation
Implementation of Support Vector Machine classifier using libsvm: the kernel can be non-linear but its SMO algorithm does not scale to large number...
Read more >What does the "dual" parameter in sklearn.svm.LinearSVC ...
The mirror has two faces. If one looks into the mirror from one side, they would see meadows full of beautiful rainbow ponies...
Read more >Meaning of `penalty` and `loss` in LinearSVC - Stack Overflow
According to the doc, here's the considered primal optimization ... loss='hinge' , dual=False is not supported as specified in here (it is ...
Read more >Another Twitter sentiment analysis with Python - Part 5 (Tfidf ...
TFIDF is another way to convert textual data to numeric orm, and is short for Term Frequency-Inverse Document Frequency.
Read more >Classification Example with Linear SVC in Python
Next, we'll define the classifier by using the LinearSVC class. ... we'll check the accuracy level by using the confusion matrix function.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think for most of the datasets,
n_samples > n_features
is the usual case. Then why not to setdual=False
as the default setting?Thanks @gkevinyen5418. That makes a lot of sense to me. I will change to use
dual=False
in my case wheren_samples > n_features
and close this issue.