Skip to content

Commit b102391

Browse files
authored
DOC update haversine distance formula (scikit-learn#26509)
1 parent 547058f commit b102391

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/metrics/pairwise.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,9 @@ def haversine_distances(X, Y=None):
919919
in radians. The dimension of the data must be 2.
920920
921921
.. math::
922-
D(x, y) = 2\\arcsin[\\sqrt{\\sin^2((x1 - y1) / 2)
923-
+ \\cos(x1)\\cos(y1)\\sin^2((x2 - y2) / 2)}]
922+
D(x, y) = 2\\arcsin[\\sqrt{\\sin^2((x_{lat} - y_{lat}) / 2)
923+
+ \\cos(x_{lat})\\cos(y_{lat})\\
924+
sin^2((x_{lon} - y_{lon}) / 2)}]
924925
925926
Parameters
926927
----------

0 commit comments

Comments
 (0)