Skip to content

Commit 33396b1

Browse files
committed
Merge pull request scikit-learn#6611 from maniteja123/chebyshev_doc
[MRG] DOC: Correct some errors in chebyshev distance
2 parents 6e43d6e + b454293 commit 33396b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/neighbors/dist_metrics.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ cdef class DistanceMetric:
130130
-------------- -------------------- -------- -------------------------------
131131
"euclidean" EuclideanDistance - ``sqrt(sum((x - y)^2))``
132132
"manhattan" ManhattanDistance - ``sum(|x - y|)``
133-
"chebyshev" ChebyshevDistance - ``sum(max(|x - y|))``
133+
"chebyshev" ChebyshevDistance - ``max(|x - y|)``
134134
"minkowski" MinkowskiDistance p ``sum(|x - y|^p)^(1/p)``
135135
"wminkowski" WMinkowskiDistance p, w ``sum(w * |x - y|^p)^(1/p)``
136136
"seuclidean" SEuclideanDistance V ``sqrt(sum((x - y)^2 / V))``
@@ -499,7 +499,7 @@ cdef class ManhattanDistance(DistanceMetric):
499499

500500
#------------------------------------------------------------
501501
# Chebyshev Distance
502-
# d = max_i(abs(x_i), abs(y_i))
502+
# d = max_i(abs(x_i - y_i))
503503
cdef class ChebyshevDistance(DistanceMetric):
504504
"""Chebyshev/Infinity Distance
505505

0 commit comments

Comments
 (0)