@@ -126,38 +126,38 @@ cdef class DistanceMetric:
126126
127127 *Metrics intended for real-valued vector spaces:*
128128
129- ============== ==================== ======== ===========================
129+ ============== ==================== ======== ============================
130130 identifier class name args distance function
131- -------------- -------------------- -------- ---------------------------
131+ -------------- -------------------- -------- ----------------------------
132132 "euclidean" EuclideanDistance - sqrt(sum((x - y)^2))
133133 "manhattan" ManhattanDistance - sum(|x - y|)
134134 "chebyshev" ChebyshevDistance - sum(max(|x - y|))
135135 "minkowski" MinkowskiDistance p sum(|x - y|^p)^(1/p)
136136 "wminkowski" WMinkowskiDistance p, w sum(w * |x - y|^p)^(1/p)
137137 "seuclidean" SEuclideanDistance V sqrt(sum((x - y)^2 / V))
138138 "mahalanobis" MahalanobisDistance V or VI sqrt((x - y)' V^-1 (x - y))
139- ============== ==================== ======== ===========================
139+ ============== ==================== ======== ============================
140140
141141 *Metrics intended for two-dimensional vector spaces:*
142- =========== ================= =======================================
143- identifier class name distance function
144- ----------- ----------------- ----------------------------------------
145- "haversine" HaversineDistance 2 arcsin(sqrt(sin^2(0.5*dx)
142+ ============ ================== = =======================================
143+ identifier class name distance function
144+ ------------ - ----------------- ----------------------------------------
145+ "haversine" HaversineDistance 2 arcsin(sqrt(sin^2(0.5*dx)
146146 + cos(x1)cos(x2)sin^2(0.5*dy)))
147- =========== ================= ========================================
147+ ============ = ================= ========================================
148148
149149
150150 *Metrics intended for integer-valued vector spaces:* Though intended
151151 for integer-valued vectors, these are also valid metrics in the case of
152152 real-valued vectors.
153153
154- ============= ==================== ====================================
154+ ============= ==================== =====================================
155155 identifier class name distance function
156- ------------- -------------------- ------------------------------------
156+ ------------- -------------------- -------------------------------------
157157 "hamming" HammingDistance N_unequal(x, y) / N_tot
158158 "canberra" CanberraDistance sum(|x - y| / (|x| + |y|))
159159 "braycurtis" BrayCurtisDistance sum(|x - y|) / (sum(|x|) + sum(|y|))
160- ============= ==================== ====================================
160+ ============= ==================== =====================================
161161
162162 *Metrics intended for boolean-valued vector spaces:* Any nonzero entry
163163 is evaluated to "True". In the listings below, the following
@@ -171,26 +171,26 @@ cdef class DistanceMetric:
171171 - NNEQ : number of non-equal dimensions, NNEQ = NTF + NFT
172172 - NNZ : number of nonzero dimensions, NNZ = NTF + NFT + NTT
173173
174- ============= ====================== =================================
175- identifier class name distance function
176- ------------- ---------------------- ---------------------------------
177- "jaccard" JaccardDistance NNEQ / NNZ
178- "maching" MatchingDistance NNEQ / N
179- "dice" DiceDistance NNEQ / (NTT + NNZ)
180- "kulsinski" KulsinskiDistance (NNEQ + N - NTT) / (NNEQ + N)
181- "rogerstanimoto" RogersTanimotoDistance 2 * NNEQ / (N + NNEQ)
182- "russellrao" RussellRaoDistance NNZ / N
183- "sokalmichener" SokalMichenerDistance 2 * NNEQ / (N + NNEQ)
184- "sokalsneath" SokalSneathDistance NNEQ / (NNEQ + 0.5 * NTT)
185- ================ ====================== =================================
174+ ================= = ====================== =================================
175+ identifier class name distance function
176+ ----------------- - ---------------------- ---------------------------------
177+ "jaccard" JaccardDistance NNEQ / NNZ
178+ "maching" MatchingDistance NNEQ / N
179+ "dice" DiceDistance NNEQ / (NTT + NNZ)
180+ "kulsinski" KulsinskiDistance (NNEQ + N - NTT) / (NNEQ + N)
181+ "rogerstanimoto" RogersTanimotoDistance 2 * NNEQ / (N + NNEQ)
182+ "russellrao" RussellRaoDistance NNZ / N
183+ "sokalmichener" SokalMichenerDistance 2 * NNEQ / (N + NNEQ)
184+ "sokalsneath" SokalSneathDistance NNEQ / (NNEQ + 0.5 * NTT)
185+ ================= = ====================== =================================
186186
187187 *User-defined distance:*
188188
189- ========== ============== =======
190- identifier class name args
191- ---------- -------------- -------
192- "pyfunc" PyFuncDistance func
193- ========== ============== =======
189+ =========== = ============== =======
190+ identifier class name args
191+ ----------- - -------------- -------
192+ "pyfunc" PyFuncDistance func
193+ =========== = ============== =======
194194
195195 Here ``func`` is a function which takes two one-dimensional numpy
196196 arrays, and returns a distance. Note that in order to be used within
0 commit comments