-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
The 'degree' parameter of SVC must be an int in the range [0, inf). Got 2.5 instead #6853
Comments
What's wrong? |
So what is the solution to this? I have the same problem... |
I confirm the bug. My scikit-learn (for reference) is 1.3.2. The problem is not only that the parameter can be 2.5 as in the original error report - scikit-learn complains as soon as it is a float, even if it is 2.0. |
Where is this degree parameter set? |
It is an internal parameter ("d") only relevant to the "Polynomial" kernel, but it seems to be always passed and that check about argument type complains even if it is not used. It is a bug that has to be fixed in code. |
I see. It did not make sense in the linear SVM as it is the degree of the polynomial in the polynomial kernel... But still I get it in the linear SVM node... |
While fixing this bug I found a workaround for other types of SVMs. If you are using non-polynomial SVM (or polynomial with a default degree of 3), reset widget settings (Options -> Reset Widget Settings and then start a new workflow). The SVM widget will work correctly until you change the degree. |
Does not work for me. Still I cannot train any SVM models despite the fact that the problem is with the SVM-Polynomial. |
@PerryGogas, for the workaround to work you have to clear settings and then NOT used saved workflows. You will have to make a new workflow. |
Ohhh I see many thanks!!! |
What's wrong?
How can we reproduce the problem?
What's your environment?
The text was updated successfully, but these errors were encountered: