Skip to content

Commit

Permalink
DOC update haversine distance formula (scikit-learn#26509)
Browse files Browse the repository at this point in the history
  • Loading branch information
rprkh committed Jun 15, 2023
1 parent 547058f commit b102391
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sklearn/metrics/pairwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,9 @@ def haversine_distances(X, Y=None):
in radians. The dimension of the data must be 2.
.. math::
D(x, y) = 2\\arcsin[\\sqrt{\\sin^2((x1 - y1) / 2)
+ \\cos(x1)\\cos(y1)\\sin^2((x2 - y2) / 2)}]
D(x, y) = 2\\arcsin[\\sqrt{\\sin^2((x_{lat} - y_{lat}) / 2)
+ \\cos(x_{lat})\\cos(y_{lat})\\
sin^2((x_{lon} - y_{lon}) / 2)}]
Parameters
----------
Expand Down

0 comments on commit b102391

Please sign in to comment.