# Questions tagged [distance]

Measure of distance between distributions or variables, such as Euclidean distance between points in n-space.

537 questions
Filter by
Sorted by
Tagged with
15 views

### How to use Gower's Distance with DBSCAN algorithm in Python

I have been researching about using DBSCAN with sklearn in python but it doesn't have Gower's distance metric built in. All the other implementations are in R in this community. I'm using a dataset ...
38 views

### Manhattan vs Euclidian Distance Measure [duplicate]

In which case we should pickup Manhattan distance and when we should use euclidian distance measure. To my understanding both are used for continues numeric data(not like cosine or others who works ...
17 views

### Can the ranks of summary statistics discriminate between (shapes of) multiple distributions? (intuition)

TL;DR Can we say the following statement, especially the first part of it? It feels intuitively true: (1) The ranks of summary statistics characterize the overall shape of distributions... (2) ...
39 views

### Understanding the R stats mahalanobis() function's Output

An acquaintance recommended I use the Mahalanobis distance on my data instead of Euclidean, Manhattan, etc. I tried using the mahalanobis() function in the R stats package on a data matrix with N ...
23 views

### Spatio-temporal cluster analysis : take accessibility into consideration

I'm new in clustering topic. I have a data set with column A : Date, B: Event (let say a number of cases of any disease) and col C and D : Lat and Long respectively. And column E, distance-time ...
55 views

### In k-means or kNN, we use euclidean distance to calculate the distance between nearest neighbours. Why not manhattan distance?

In k-means or kNN, we use euclidean distance to calculate the distance between nearest neighbours. Why not manhattan distance ?
14 views

### Determine outliers for robust Mahalanobis distance

I want to apply a robust mahal distance and found an implementation in scikit: https://scikit-learn.org/stable/auto_examples/covariance/plot_mahalanobis_distances.html but there is the number of ...
25 views

### How to find the list of nearest vectors if ony a vector is given?

I know there are many ways to compute similarity of two different non-zero vectors but is it possible to get a list of nearest vectors whose values are continous given a single continous vector. Lets ...
14 views

### Clustering block matrices

The question is about clustering (or finding the distance of) the submatrices of a matrix in the presence of block missings. Starting by the example in R. Let ...
27 views

### Understanding the kdist graph used to select DBSCAN epsilon parameter

I need to use DBSCAN for my research and am having trouble understanding the kdist graph used to select the epsilon parameter - specifically, I do not understand what is happening behind the scenes ...
25 views

### Maximum likelihood as minimizing the dissimilarity between the empirical distriution and the model distribution

I am reading Ian Goodfellow "Deep Learning" book. At page 128 it says One way to interpret maximum likelihood estimation is to view it as minimizing the dissimilarity between the empirical ...
7 views

### Measuring the variability of a distance measure vector

I have calculated the distance of data points according to the Maalanobis distance. Now I have a vector of distances that I am trying to measure its variability to identify the residuals. I was ...
15 views

### Distance metrics with missing data where the missing data are informative

I am attempting to cluster subgroups of substance abuser based on diagnostic status (nominal), age of onset (ordinal since it is binned in our set), etc. My question regards how to treat missing data ...
10 views

### Multiple correspondence analysis, definition of distance between two categories of the same question

From the text : Multiple Correspondents Analysis by Brigette LeRoux The data for this quesiton is: The definition of $f_k$ is $f_k = n_k/n$ where $n$ is the total number of individuals and $n_k$ ...
28 views

### Measuring variation explained in community matrix using both geographic distance and and environmental variables

So I have this dataset where I have species community data from a variety of sites. I’m trying to explain what are the factors that drive the variation in these data. For each site, I have a ...
42 views

### In VEGAN ADONIS, what does "method='bray' do when I pass in a distance matrix I already have (UNIFRAC)?

Suppose I have a distance matrix created by applying the weighted unifrac measure. For instance, using a phyloseq object: ...
25 views

### Correlation between two distances (distance matrixes)?

Premise: I have a dataset of elements for which I have a representation in 2 different spaces, a "latent" space and the original space (I can move between those with an Autoencoder neural network). I ...
24 views

### Mahalanobis distance - understanding the formula [duplicate]

I've read quite a few explanations on this topic, liking this one the most: https://mccormickml.com/2014/07/22/mahalanobis-distance/ But there is still one thing I don't understand. I understand ...
18 views

28 views

### Calculate Distance between two vectors and estimate goodness of fit to preestablished histogram shapes

I have a squared gene co-expression correlation matrix of many thousands of pairwise correlations among variables (10290^2 aprox). Each row/column represents a different gene and its pairwise ...
38 views

### Compare statistical distances of multiple distributions

I need a metric that not only gives me the statistical distance between two distributions, but that also is comparable to another distance between two completely different distributions, calculated ...
56 views

### Can Bhattacharyya coefficient (or distance) be used as an additive measure to compute a metric for performance?

As far as I understand, Bhattacharyya's measure(s) can be used to see similarity between two empirical distributions. Other ways to do so are nicely explained here: Similarity measure between multiple ...
21 views

3 views

### Comparing which histogram has overall low cost

Let's say there are two histograms which basically is constructed from array of numbers which is measured by, repeatedly performing a task by two different methods and individual numbers are time ...
912 views

### Why is Kullback-Leilbler divergence a better metric for measuring distance between two probability distributions than squared error? [duplicate]

I know that KL-divergence is a metric that is more suitable when we want to measure the distance between numbers which a probability form. However, I am still confused what is the benefit of using KL-...
116 views

### Relation Between Wasserstein Distance and Relative Entropy

Consider the Wasserstein metric of order one $W_1$ (aka the Earth Movers Distance). I would like to know whether it is possible to link $W_1$ and relative entropy and what this would mean intuitively. ...
10 views

### Distance correlation and a corresponding mapping

I have two long vectors, say X and Y (of equal length). I computed the Distance Correlation as implemented in Scipy and I got a ...
45 views

### Signature of a distribution - Earth Mover distance

I am studying the Earth Mover Distance from here, but I have some difficulty in fully understanding what is the signature of a distribution and how it matches with the last constraint of the Earth ...
71 views

### Total variation norm

I am reading Dwork, C., Hardt, M., Pitassi, T., Reingold, O., & Zemel, R. (2012, January). Fairness through awareness. In Proceedings of the 3rd innovations in theoretical computer science ...