-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MAINT Deprecate matching
as metric
#26264
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
MAINT Deprecate matching
as metric
#26264
Conversation
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.
Thank you, @magnusbarata for this PR!
Can you add deprecation notes for this metric on relevant user documentation similar to #25417?
To be explicit, I am thinking of this kind of note:
scikit-learn/sklearn/cluster/_optics.py
Lines 94 to 95 in f0d6a9c
.. note:: | |
`'kulsinski'` is deprecated from SciPy 1.9 and will removed in SciPy 1.11. |
@jjerphan Thankyou for your review! I have 2 questions:
|
Hi, then I think we should remove |
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.
https://github.com/scipy/scipy/blob/c1ed5ece8ffbf05356a22a8106affcd11bd3aee0/scipy/spatial/distance.py#L1831
Looking at this line in Scipy, it seems they still allowed matching as a synonym for hamming. If that the case, instead of completely removing matching, should I proceed with only removing matching as a boolean metric?
I mean something like this.
Are you sure we should remove |
To me, we must be inline with SciPy's deprecation cycles. Hence if SciPy hasn't deprecated |
I see. Thank you for clarifying that. SciPy hasn't deprecated
I have added the deprecation notes. |
matching
as metricmatching
as metric
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.
LGTM. Thank you, @magnusbarata.
Change wordings for documentation Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
@jjerphan Thank you for your approval, I have applied your suggestions as well. 👍 |
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.
Thank you for the PR @magnusbarata !
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Hi @thomasjpfan, thank you for your review. I have added your suggestion. |
…a/scikit-learn into deprecate_matching_as_metric
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.
LGTM
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Reference Issues/PRs
Fixes #25532.
What does this implement/fix? Explain your changes.
Deprecate
matching
as a metric to be consistent withscipy.spatial.distance
.Deprecation is done similar to #25417.