-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Improve pairwise_distances
docstring
#31176
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
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.
LGTM. Just a couple of nitpicks
sklearn/metrics/pairwise.py
Outdated
@@ -2285,26 +2285,31 @@ def pairwise_distances( | |||
): | |||
"""Compute the distance matrix from a vector array X and optional Y. | |||
|
|||
This method takes either a vector array or a distance matrix, and returns | |||
This method takes one or two vector arrays or a distance matrix, and returns |
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.
it's a function.
This method takes one or two vector arrays or a distance matrix, and returns | |
This function takes one or two vector arrays or a distance matrix, and returns |
let's update pairwise kernels as well
Thanks @jeremiedbb ! Changes made. Any thoughts on:
|
I find feature array more explicit. |
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. I let you decide if you want to uniformize vector/feature array :)
Thanks @jeremiedbb ! I've amended to "feature array" - there was one use case of "vector array" in |
Thanks |
Co-authored-by: Jérémie du Boisberranger <jeremie@probabl.ai>
Reference Issues/PRs
pairwise_distances
docstring to be consistent withpairwise_kernels
(which was updated in DOC Improvepairwise_kernel
docstring #31103)What does this implement/fix? Explain your changes.
Any other comments?
Also noticed that we use the term "vector array" in the docstring description, but later in the parameter description, we use the term "feature array" - should we be more consistent? Maybe some users will not quickly realise these mean the same thing.
cc @jeremiedbb @thomasjpfan who reviewed the previous RP