# Questions tagged [distance]

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

700 questions
Filter by
Sorted by
Tagged with
1 vote
8 views

### How to calculate the max possible earth mover distance between histograms, given the buckets?

I have two histograms and am able to calculate the EMD / Wasserstein metric between them using the algorithm described here. In order to better communicate the implication of this metric, I want to ...
20 views

### Interpreting distance based linear model

I have a dataset consisting of biological and environmental factors. My aim is to describe the physical factors influencing the invertebrate trophic composition in kelp holdfast, and compare whether ...
176 views

### Why do we not have a true upper limit for dissimilarity measure?

The similarity measure between two attributes always falls in the range of $[0,1]$, why is this not true in the case of dissimilarity where the value falls in the range of $[0, \infty)$? Can't the ...
17 views

### Euclidean distance between points in high dimensions

On Wikipedia there's a statement: When a measure such as a Euclidean distance is defined using many coordinates, there is little difference in the distances between different pairs of samples. Is ...
• 915
11 views

### Difference-in-differences with distance sensitive treatment effect

I want to use the difference-in-difference method to estimate the effect of treatment at multiple distances to the treatment location. I have a house price dataset from 2000 to 2020 and a public ...
16 views

### In DBSCAN, what happens if points have distance exactly equal to the Epsilon radius of a core point?

In DBSCAN the border points are points in the eps-neighborhood of a core point. But what if a point has distance exactly equal to Epsilon from a core point? Is it considered inside the eps radius, or ...
34 views

### How do I compare multivariate normal distributions and get a p-value?

I have sample-data for two multivariate normal distributions. From this sample-data, I can calculate each distribution’s parameters (means and standard deviations). How do I quantify the distance (or ...
46 views

### A random perturbation of a distance matrix

Let $A=(d_{ij})$ be a distance matrix, i.e., $d_{ii}=0$ for all $i$ $d_{ij}>0$ for all $i\neq j$ $d_{ij}=d_{ji}$ for all $i,j$ $d_{ij}+d_{jk}\geq d_{ik}$ for all $i,j,k$ How to find a random ...
• 321
12 views

### evaluation measure to assess expected value in sports betting

I'm wondering if there is a specialized evaluation measure for the expected value of bets in sports betting. For illustration, let's say we have this very specific scenario of a bet on an underdog ...
1 vote
33 views

### Expected value of inverse distance between two 3D normal distributions

Consider two independent trivariate normal random variables $X$ and $Y$. The means are non-zero and the off-diagonal elements of the covariance matrices are non-zero. $X$ and $Y$ does not follow the ...
• 216
8 views

### Penalize an attribute of points based on their distance from a line without use of any threshold

We have a set of points and a line. Each point in the set has a weight attribute that is an integer. How we could penalize this weight based on the distance of the point from the line without using ...
8 views

### What is a good dissimilarity on rooted ordered labeled trees with probabilities on the leaves?

Consider a rooted ordered labeled tree that is "binary" in that there are at most two children of any vertex and whose leaves are decorated with probabilities (the sum of the leaf ...
• 141
37 views

### How to choose a heatmap distance and clustering method (with ecological data)?

I'm interested in learning about the various methods for clustering heatmaps in the context of ecology (specifically single species counts, presence/absence, % coverage and continuous environmental ...
• 871
72 views

### Statistical difference between curves

I have 12 curves (three replicates for each treatment), see attached picture. X=days; Y=percentage. The experiment has 2 variables: A: 4 cases; B: 3 cases. I would like to know, if there is a method ...
34 views

• 534
37 views

### Is this Hellinger Distance expression correct?

Further to my previous post on the Hellinger Distance, there was one comment raised about there being different expressions of the Hellinger Distance. This has intrigued me. In the Encyclopedia of ...
• 67
64 views

• 2,152
102 views

### Comparing PCAs using the distances between the centroids of groups

For example, I have a data for N countries where quantitative values for men and women are given. I ran PCA separately for the data from each country. PC1 and PC2 explain most of the variance, so I ...
20 views

### Calculate distance between generated probability distribution/point and target distribution

In my current project I have a trained neural network (pytorch-based), which is used for classifying data into n labels. Based on my current experience this is done ...
• 101
1 vote
20 views

### Algorithm to find closest document containing a set of strings, or variations of them

I have one dataset (A) containing several fields (strings) per sample. One of these fields is a name, and the others are all alphanumeric identifiers. I have another dataset (B) which contains highly ...
• 375
33 views

### K-NN model with a maximum distance to be considered a neighbor

Is there some way to set a maximum distance from which a k-NN method will no longer classify an unknown sample? I am trying to build a k-NN method to classify some data. The method works good, however,...
• 1
17 views

### Transform Earth mover's distance/Wasserstein metric to percentance (0 to 1 or 0% to 100%) [duplicate]

Ok, I do some calculations between binned histograms via the use of Wasserstein metric and more specifically this python library.. https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats....
10 views

### What classification/stats method can I use to find which x,y,z coordinates most likely correspond to a 2nd set of coordinates

TLDR: I need to match two sets of x,y,z coordinates of differing lengths. Although they're sampled from the same source, they do not perfectly overlap. The yellow mesh has ~7000 rows, but the blue is ~...
• 173
58 views

### How to reduce the number of observations (rows) by keeping the most unique (less redundant) ones

Although not a very common usecase, I need to select a subset of observations that withhold the maximum of the total variance of the dataset. In other words, I would like to remove rows that are "...
29 views

### Hybrid correlation/MSE metric?

Apologies as this is probably a rather naive question I would like to compare two vectors and neither a correlation (e.g pearsons/spearmans) nor a distance metric (eg rmse) is quite right and ideally ...
• 201
13 views

1 vote
33 views

### similarity metric for two characteristics

I am trying to develop a way to compare items. Each item has the same two properties associated with it, say, $p_{1}$ and $p_{2}$. All I am given are these two measures for each item, each of which ...
3 views

### What metric is best fitted for comparing encodings?

I am trying to compare two distributions, that each correspond to different numerical encodings, e.g. compare fp32 encodings to various other encodings on a same set of values. However I do not know ...
50 views

### Cluster confidence scoring

I have a scenario where I am provided a list of clusters and pairwise distance only between items in same cluster. I need to rank these clusters based on some kind of relative score from this info. e....
23 views

### Generalize Kendall tau distance to ordered groups?

If we have two ordered lists, e.g., A=[1,2,3,4,5], B=[3,5,4,2,1], then we could use Kendall tau distance (which is 0.8) to ...
• 111
50 views

### Finding a Size Invariant Pattern in Noisy Data

I want to find similar patterns in my data, I assume that the patterns will be of different sizes both in time and in amplitude. The usual distance metrics will not work here, since the window size is ...
• 115
1 vote
205 views

### How to choose a fair gamma value when performing k-prototypes clustering?

In the k-prototypes clustering algorithm, the distance function consists of two dissimilarity components - one for the numerical elements of the observations, and one for their categorical elements. ...
• 11
32 views

### How to infer nearest neighbors using distance metrics

My team and I are trying to identify group of customers to target for an investment promotion exercise. We decided to use the control group (which already are a part of this investment exercise) and ...
• 101
1 vote
140 views

### What is the maximum number of dimensions in MDS?

If I have an arbitrary Euclidean distance matrix $D=(d_{ij}:i=1,\ldots,I; j=1,\ldots,I)$ and I want to reconstruct its elements (pairwise Euclidean distances) via classical Euclidean MDS. That is find ...
• 457
1 vote
I'm trying to find a distance metric that takes into account the correlation between vectors. That is, suppose we have matrix $M$ of dimensions $n \times k$, and we take the pairwise distance between ...