Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MAINT Parameters validation for sklearn.metrics.pairwise.paired_euclidean_distances #26073

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions 7 sklearn/metrics/pairwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,17 +1025,20 @@ def cosine_distances(X, Y=None):


# Paired distances
@validate_params(
{"X": ["array-like", "sparse matrix"], "Y": ["array-like", "sparse matrix"]}
)
def paired_euclidean_distances(X, Y):
"""Compute the paired euclidean distances between X and Y.

Read more in the :ref:`User Guide <metrics>`.

Parameters
----------
X : array-like of shape (n_samples, n_features)
X : {array-like, sparse matrix} of shape (n_samples, n_features)
Input array/matrix X.

Y : array-like of shape (n_samples, n_features)
Y : {array-like, sparse matrix} of shape (n_samples, n_features)
Input array/matrix Y.

Returns
Expand Down
1 change: 1 addition & 0 deletions 1 sklearn/tests/test_public_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def _check_function_param_validation(
"sklearn.metrics.pairwise.haversine_distances",
"sklearn.metrics.pairwise.laplacian_kernel",
"sklearn.metrics.pairwise.linear_kernel",
"sklearn.metrics.pairwise.paired_euclidean_distances",
"sklearn.metrics.precision_recall_curve",
"sklearn.metrics.precision_recall_fscore_support",
"sklearn.metrics.precision_score",
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.