biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis

Home Page:https://orangedatamining.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The 'degree' parameter of SVC must be an int in the range [0, inf). Got 2.5 instead

1324493354ZHOU opened this issue · comments

What's wrong?

How can we reproduce the problem?

What's your environment?

  • Operating system:
  • Orange version:
  • How you installed Orange:

What's wrong?
InvalidParameterError: The 'degree' parameter of SVC must be an int in the range [0, inf). Got 2.5 instead.
How can we reproduce the problem?
Occurs when using SVM classification
What's your environment?
conda
Operating system:win10
Orange version:[Orange 3.37.0 for Windows]
How you installed Orange:Download and install from the official website

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.

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?
I get: "The 'degree' parameter of SVC must be an int in the range [0, inf). Got 3.0 instead"

image

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.

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.

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.

@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!!!