Umap: Can I use custom distance as input for UMAP

Created on 24 Jan 2020  路  1Comment  路  Source: lmcinnes/umap

I have a nxn distance matrix for n objects. Can I directly use this as input rather than letting UMAP calculate the distance? The R package UMAP accepts a distance matrix but I cannot find corresponding setting in python version. Thank you for your help

Most helpful comment

Yes, you can.
Set metric='precomputed' and then pass the distance matrix to fit() and then transform() or fit_transform().

>All comments

Yes, you can.
Set metric='precomputed' and then pass the distance matrix to fit() and then transform() or fit_transform().

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dribnet picture dribnet  路  5Comments

kylemcdonald picture kylemcdonald  路  5Comments

davisidarta picture davisidarta  路  5Comments

iicky picture iicky  路  5Comments

MattConflitti picture MattConflitti  路  6Comments