# Questions tagged [distance-functions]

Distance functions refer to functions used for quantifying the notion of distance between members of a set, or between objects.

345 questions
Filter by
Sorted by
Tagged with
25 views

### How to show that RMSE is more sensitive to outliers than the MAE?

I am reading this book where it states that for $\ell_p$ norms: The higher the norm index, the more it focuses on large values and neglects small ones. This is why the RMSE is more sensitive to ...
• 477
29 views

### What is the meaning of term "whiten" data in relation to Mahalanobis Distance?

I'm writing my thesis and I have trouble in understanding the paper: https://people.bu.edu/bkulis/pubs/ftml_metric_learning.pdf My major is not mathematics, but I can understand the basic so I hope ...
• 101
1 vote
48 views

### Why not use the $L^2$ norm as the difference between two probability distributions (as opposed to KL-Divergence and others) [closed]

So I was wondering why not just use: $$dist(p,q)=\bigg(\int_{x \in X} |p(x)-q(x)|^2 dx\bigg)^{1/2}$$ instead of the commonly used KL-Divergence, which isn't even a distance measure and therefore not ...
• 121
1 vote
55 views

### How to incorporate p-value information for pairwise distances into clustering?

Consider I have a $n \times n$ distance matrix I want to use for hierarchical clustering, where the distance metric I use ranges from 0-1. I also have a second $n \times n$ matrix that gives me the p-...
• 89
67 views

### Is this a known or valid divergence between two densities?

I am testing various metrics for learning a density estimate. Specifically, I have a sample of data from a distribution $p$, and am learning a function $f$ to estimate $p$ by minimizing a distance or ...
• 181
11 views

### How to compare results to a reference with multiple measurements

I have run a pilot test in the laboratory to see which method is best out of 5 different ones. I have reference numbers for a range of measurements to compare these against and then my results for the ...
29 views

### How to perform Hierarchical Clustering using centroid method and custom distance metric?

I would like to perform Agglomerative Hierarchical Clustering using the centroid method (defined on this page) and a custom distance metric, probably cosine similarity. In the Scipy docs it says you ...
131 views

### Closed form expression for the 2-Wasserstein distance between generalized Gaussian distributions

Essentially the title - is there a closed form expression for the 2-Wasserstein distance (aka Frechet distance, Earth Mover's distance) between two generalized Gaussian distributions? The regular ...
38 views

### Distance metric for sparse matrix with imbalanced data

I am trying to find similar movies in a dataset where each movie has zero to five genres. (I also have more dimensions but those are not relevant to the question.) For this I'm trying to use nearest ...
• 101
128 views

### Appropriate distance measure for comparing probability distributions

Suppose I want to compare some countries to see how similar they are with respect to the relative sizes of the industries in them. So I find data on the distribution of GDP across all industries for ...
158 views

### Is L1(a,b) <= L1(c, d) if and only if L2(a,b) <= L2(c, d)? L1 vs L2

I am doing machine learning and in one stage, I have to measure tensor vector differences to find the minimum distance. Lets say I have a set of linear tensors with dimension 100. I want to find a ...
• 131
135 views

• 2,286
1 vote
637 views

### Bhattacharya Distance for Sets of Vectors

I have two sets of vectors and want to find a differentiable measure that can help quantify/approximate the degree of separability of the two sets. This metric might correlate well with the ...
183 views

### Weighted metric for mixed binary (decomposed) data?

I have a large dataset with mixed type of data (example): Age Price Town Size Interests Small Middle Big Traveling Cooking TV 21 0 1 0 0 1 1 1 34 100 0 1 0 0 1 0 81 200 0 0 1 1 1 0 54 0 0 0 1 1 ...
1 vote
1k views

### k-means inertia

I use Minkoski distance to measure distance, like so: $$D(\vec{x}, \vec{y})=\left(\sum_{i=1}^n|x_i-y_i|^p\right)^\frac{1}{p}$$ I'm trying to locally optimize centroids by averaging the points that ...
• 111
91 views

### Metrics for assessing the quality of prior distributions

Clarification: My purpose is to compare different methods for selecting/creating priors (or perhaps I should refer to them as predictive distributions for a quantity of interest/parameter). I do not ...
• 33.5k
190 views

### How can one compute the "average" of a dataset of histograms that minimizes the mean Earth Mover's Distance between all data points and average?

It is my understanding that when the distance metric is euclidean distance, the mean of a dataset minimizes the average distance between all data points and the computed "mean". In the case ...
43 views

### Measuring the overlap between two probability distribution [duplicate]

I have many probability distributions, I need to compute the amount of overlap between two probability distributions. I don't know the type of distribution since it really depends on the data itself. ...
• 101
1 vote
70 views

### Modified distance functions for a cluster analysis

I'm developing some software to allow users to perform various kinds of clustering on some data using a pairwise distance matrix (k-medoids is the main method). I would like to allow the user to tune ...
1 vote
175 views

### Measure of distance between two survey responses

I've found some survey data where respondents answer 63 question by giving a response for each question between 0-10 (0 for strong disagreement, 10 for strong agreement). So I can view every ...
• 173
587 views

### High Dimensional Swiss Roll? (For Metric Learning/Dimensionality Reduction)

So I've just started a project which includes some metric learning, and came accross this swiss roll in 3D to 2D problem. Ideally, you should 'unroll' the roll. My question is, can this be extended ...
15 views

### Splitting method for time series

Say I have a website with a lot of pages and traffic. Some of them are more visited, some of them a less. My task is to split pages into two groups for the given time period, so that the total traffic ...
186 views

### How to Show Wasserstein Metric is Sum Invariant?

A paper I'm trying to understand states that that Wasserstein metric obeys certain properties, which I'd like to prove. This metric is defined for two random variables $U, V$ and $p \in (1, \infty)$ ...
• 1,047
38 views

### Measuring the amount of total influence between variables?

I have a group of people with a series of yes/no questuins about preferences in various topics. The thing is they could see each other answers and change theirs hence might be influenced by a common ...
• 183
339 views

### Do $k$-means, dbscan, and hierarchical clustering all rely on (pseudo)metrics?

I seems to me that the clustering methods $k$-means, dbscan, and hierarchical clustering all work on distance measures $d$ that are (pseudo)metrics, i.e., fulfill the following requirements:  d(x,x)=...
• 33
4k views

### Is Jaccard similarity/distance suitable for non-binary, quantitative data?

I have a dataset with each row a country and 10 columns with numerical features like GDP,Electrcity consumption, GNI etc. I am trying to use distance metrics to find similarity between the countries ...
• 43
I'm trying to simulate spatially autocorrelated data by creating a covariance matrix from a distance matrix and using said covariance matrix as the $\Sigma$ parameter of a multivariate normal. I have ...
The general intuition I have seen for KL divergence is that it computes the difference in expected length sampling from distribution $P$ with an optimal code for $P$ versus sampling from distribution \$...