You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was just wondering what is the default covariance matrix that is used when metric="mahalanobis". I see in the documentation that you could pass in any metric keywords via metric_kwds (I assume I would pass in the inverse by setting metric_kwds={"vinv": cov_inv}), but I can't seem to find in the documentation what is the default that is used if none is passed?
I see in pynndescent/distances.py, that the function to compute the malahonbis has default identity matrix, but I assume that isn't actually what is used if you don't specify vinv in pynndescent.NNDescent.
For a bit of context, for some points $y_{1}, y_{2}, ...$ I would like to approximate the minimum distances between them and some data $X_{1}, X_{2}, ...$ (i.e. for each $i$, compute the distance between $y_{i}$ and each point $X_{1}, X_{2}, ...$ and find the minimum). I want to use the malahonbis distance where I use the covariance matrix for the data $X$, and I have been doing this with:
Hi, I was just wondering what is the default covariance matrix that is used when
metric="mahalanobis"
. I see in the documentation that you could pass in any metric keywords viametric_kwds
(I assume I would pass in the inverse by settingmetric_kwds={"vinv": cov_inv}
), but I can't seem to find in the documentation what is the default that is used if none is passed?I see in pynndescent/distances.py, that the function to compute the malahonbis has default identity matrix, but I assume that isn't actually what is used if you don't specify
vinv
inpynndescent.NNDescent
.For a bit of context, for some points$y_{1}, y_{2}, ...$ I would like to approximate the minimum distances between them and some data $X_{1}, X_{2}, ...$ (i.e. for each $i$ , compute the distance between $y_{i}$ and each point $X_{1}, X_{2}, ...$ and find the minimum). I want to use the malahonbis distance where I use the covariance matrix for the data $X$ , and I have been doing this with:
I was just wondering if I should really be passing in the inverse covariance matrix I want to use like:
Any clarification on what the default
vinv
that is used would be greatly appreciated :)The text was updated successfully, but these errors were encountered: