From 102b2fae4e5ce6397f6f754db71022bf8861e030 Mon Sep 17 00:00:00 2001 From: Nick Crews Date: Sun, 7 Jul 2024 17:25:29 -0800 Subject: [PATCH] docs: mention "precomputed" metric as a parameter Inspired by https://github.com/lmcinnes/umap/issues/61 --- doc/parameters.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/parameters.rst b/doc/parameters.rst index 4fc60ca2..23d4c78a 100644 --- a/doc/parameters.rst +++ b/doc/parameters.rst @@ -341,6 +341,13 @@ of metrics, including: - sokalsneath - yule +**Precomputed** + +All of the above metrics assume your input data is "raw" in some N-dimensional space. +Sometimes, you have already calculated the pairwise distances between points, +and your input data is a distance/similarity matrix. +In this case, you can do something like ``UMAP(metric='precomputed').fit_transform()``. + Any of which can be specified by setting ``metric=''``; for example to use cosine distance as the metric you would use ``metric='cosine'``.