-
-
Notifications
You must be signed in to change notification settings - Fork 26k
DOC remove FutureWarnings in plot_manifold_sphere example #24941
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
DOC remove FutureWarnings in plot_manifold_sphere example #24941
Conversation
Related to scikit-learn#24876 What does this implement/fix? Explain your changes. Fix FutureWarning in manifold/plot_manifold_sphere.html /home/runner/work/scikit-learn/scikit-learn/sklearn/manifold/_mds.py:299: FutureWarning: The default value of `normalized_stress` will change to `'auto'` in version 1.4. To suppress this warning, manually set the value of `normalized_stress`. by explicit passing normalized_stress="auto"
@@ -111,7 +111,7 @@ | |||
|
|||
# Perform Multi-dimensional scaling. | |||
t0 = time() | |||
mds = manifold.MDS(2, max_iter=100, n_init=1) | |||
mds = manifold.MDS(2, max_iter=100, n_init=1,normalized_stress="auto",) |
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.
mds = manifold.MDS(2, max_iter=100, n_init=1,normalized_stress="auto",) | |
mds = manifold.MDS(2, max_iter=100, n_init=1, normalized_stress="auto") |
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.
This should remove the linting error reported by the CIs
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.
Thanks!!
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.
This should remove the linting error reported by the CIs
I committed the change but linting test still failed
I just merged |
@@ -1,93 +0,0 @@ | |||
""" |
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.
You should not remove this example :)
Can you revert this change.
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.
I have made new pull request for this example #24960
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.
I saw but you should not remove this file. Currently, it is tagged as deleted from your side in your git
history. You need to add the original file back.
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.
done
Co-authored-by: Guillaume Lemaitre <[email protected]>
This reverts commit b096a47. made a mistake sorry
def binomial_deviance(y, raw_predictions): | ||
return -2 * np.mean((y * raw_predictions) - np.logaddexp(0, raw_predictions)) | ||
|
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 revert this change
@@ -76,7 +79,7 @@ | |||
|
|||
for i, y_pred in enumerate(clf.staged_decision_function(X_test)): | |||
# clf.loss_ assumes that y_test[i] in {0, 1} | |||
test_deviance[i] = clf.loss_(y_test, y_pred) | |||
test_deviance[i] = binomial_deviance(y_test, y_pred.ravel()) |
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.
and this one
LGTM. Merging. Thanks @Reddragonemperor58 |
Thanks to you for the support and help☺ |
Related to #24876
What does this implement/fix? Explain your changes.
Fix FutureWarning in manifold/plot_manifold_sphere.html
/home/runner/work/scikit-learn/scikit-learn/sklearn/manifold/_mds.py:299: FutureWarning:
The default value of
normalized_stress
will change to'auto'
in version 1.4. To suppress this warning, manually set the value ofnormalized_stress
.by explicit passing normalized_stress="auto"
Any other comments?