Custom Distance Metrics

Builds two-argument sklearn metric callables and scipy cdist/pdist precomputes (weighted Euclidean/cosine, Numba Manhattan factories) for DBSCAN, HDBSCAN, AgglomerativeClustering, and NearestNeighbors. Needed when Euclidean, cosine, or Jaccard discard sequence, graph, or mixed-type structure. Do not use Lloyd K-Means with a custom metric; do not run a slow Python pairwise on large n without JIT, vectorize, or a precomputed matrix.

Kayforkind 989b7b0 27.5 KB Updated

File contents

Kayforkind/skill-slice commit 989b7b0373

Frequently asked questions

npx skillmds@latest add kayforkind/custom-distance-metrics