-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[issue #5089] Fixed warnings for DataDimensionalityWarning, decision_function and decision_function_shape. #5277
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
[issue #5089] Fixed warnings for DataDimensionalityWarning, decision_function and decision_function_shape. #5277
Conversation
@@ -38,6 +39,7 @@ | |||
iris.data = sparse.csr_matrix(iris.data) | |||
|
|||
|
|||
@ignore_warnings |
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.
the warning is silenced, but the test will fail in 0.18, when default decision_function_shape
will change to 'ovr'
.
I would rather add now decision_function_shape='ovo'
.
@TomDLT Done. |
@@ -81,8 +82,8 @@ def test_svc(): | |||
kernels = ["linear", "poly", "rbf", "sigmoid"] | |||
for dataset in datasets: | |||
for kernel in kernels: | |||
clf = svm.SVC(kernel=kernel, probability=True, random_state=0) | |||
sp_clf = svm.SVC(kernel=kernel, probability=True, random_state=0) | |||
clf = svm.SVC(kernel=kernel, probability=True, random_state=0, decision_function_shape='ovo') |
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.
please also add a new line for pep8 compliance.
…ecision_function_shape.
@TomDLT Done, thanks. |
The remaining |
@TomDLT Yes, I have found it. The issue said removing warnings from the test suit, so I didn't touch to doctests. |
You could change the parameters or the data so that there is no warning? |
@hasancansaral I am working on the #5297, if you are busy and don't mind, can I use some of your changes ? I am working on the |
merged via #5395 |
@amueller [issue #5089] Fixed warnings for DataDimensionalityWarning, decision_function and decision_function_shape.