10000 [issue #5089] Fixed warnings for DataDimensionalityWarning, decision_function and decision_function_shape. by hasancansaral · Pull Request #5277 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed
wants to merge 1 commit into from

Conversation

hasancansaral
Copy link

@amueller [issue #5089] Fixed warnings for DataDimensionalityWarning, decision_function and decision_function_shape.

@@ -38,6 +39,7 @@
iris.data = sparse.csr_matrix(iris.data)


@ignore_warnings
Copy link
Member

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'.

@hasancansaral
Copy link
Author

@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')
Copy link
Member

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.

@hasancansaral
Copy link
Author

@TomDLT Done, thanks.

@TomDLT
Copy link
Member
TomDLT commented Sep 16, 2015

As for the DataDimensionalityWarnings, I have suppressed all of them except for one, which I get when I run nosetest -v sklearn/neighbors but not when nosetests -v sklearn/neighbors/tests. Could you help me with that? Thanks.

The remaining DataDimensionalityWarning is in this doctest.
I don't know if a ignore_warning is a good idea in a doctest.

@hasancansaral
Copy link
Author

@TomDLT Yes, I have found it. The issue said removing warnings from the test suit, so I didn't touch to doctests.

@amueller amueller added this to the 0.17 milestone Sep 22, 2015
@amueller
Copy link
Member

You could change the parameters or the data so that there is no warning?

@vighneshbirodkar
Copy link
Contributor

@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 decision_function and some other warnings as well.

@amueller
Copy link
Member

merged via #5395

@amueller amueller closed this Oct 15, 2015
@hasancansaral hasancansaral deleted the deprecation-warnings branch January 16, 2016 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0