Questions tagged [distance]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Metrics to assess the difference between two distributions [closed]

I'd like to assess the difference between two distributions and am a bit overwhelmed by the potential amount of metrics (see result of my preliminary search below). Is there a book / review paper ...
0 votes
0 answers
8 views

Panel data clustering - how to assess the distance between individuals when the data are multivariate and longitudinal?

I have an (unbalanced) panel dataset with 20 countries, 57 years, and 8 variables, and I would like to cluster the countries according to their dynamic trend in these variables (whether using kmeans ...
last_resource's user avatar
0 votes
0 answers
16 views

Which dissimilarity index to use with categorical ecological data [duplicate]

I am currently working on data representing the abundance of microorganisms in a categorical way, like 0 = no organisms; 1 = 1-5 organisms; 2 = 6-10 and so on (5 being the highest number). And i am ...
user avatar
3 votes
1 answer
90 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 ...
user32038's user avatar
2 votes
1 answer
38 views

cartesian distance (2-norm) between paired sampled datasets

I have uniformly sampled datasets from two acquisition circuits: an old model which has become difficult (and expensive) to procure parts to continue manufacturing, and a new version using modern ...
Ben Voigt's user avatar
  • 200
0 votes
0 answers
14 views

Are there any research papers which show why Wasserstein distance is better than Jensen-Shannon/KL_div/Bhattacharya distance for specific use cases?

I am trying to find reliable research work which show why displacement based metrics such as Wasserstein distance is a better suited metric than Jensen-Shannon distance in specific use cases and for ...
user17420392's user avatar
1 vote
1 answer
44 views

Gaussian Mixture Model with Minkowski distance

Gaussian Mixture Models assume Mahalanobis distance (essentially L2). Is it possible to use Lp distance in a GMM? Intuitively, in 1-space, distance is clear. In 2-space, the relation between the two ...
olivarb's user avatar
  • 111
0 votes
0 answers
8 views

Approaches to analyse microbiome of closely related individuals

I am currently analysing the gut microbiome of 36 birds under a controlled living environment and diet. Some of them have a particular disease, therefore I'd like to analyse whether the microbiome ...
Blossom's user avatar
0 votes
0 answers
28 views

What would be the most appropriate distance metric for percentage/ratio data?

I have a matrix where each row is an observation (i), each column is a feature (j), and each value is the ratio the feature j is complete in observation i. That is, the values are floats that range ...
O.rka's user avatar
  • 1,442
0 votes
0 answers
38 views

Quantitative Methods for Evaluating Differences Between Two Distributions

I am working with a substantial dataset in which I need to compare the distributions of certain common features across different categories. The challenge I face is that due to the imprecision in ...
Song Nyanko's user avatar
3 votes
1 answer
152 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 ...
AliM's user avatar
  • 109
0 votes
0 answers
14 views

Distance between two distributions with uncertainty / measurement error

I have two empirical distributions $X$ and $Y$, both with the same number of samples (a few thousand). $X$ are true values, they are accurate (i.e. no uncertainty). Values of $Y$, on the other hand, ...
qalis's user avatar
  • 229
5 votes
2 answers
134 views

Bounding the distance of empirical average from its expected value

Suppose we have three sequences of random variables, $(Y_n)_n$, $(W_n)_n$, and $(X_n)_n$ such that: If $Y_n=a$, then $X_n=b$. If $X_n=b$, then $W_n=c$. That is $$ 1_{[Y_n=a]}\leq 1_{[X_n=b]}\leq 1_{[...
TEX's user avatar
  • 716
0 votes
0 answers
13 views

Approximating a bivariate distribution with another distribution, which method to use?

Let $X \sim F(;\theta)$ and $Y \sim G(;\eta)$ be two independent continuous random variables. The greek symbols represent the parameters of those distributions. I can easily sample from these ...
Coolio's user avatar
  • 1
0 votes
0 answers
94 views

How can to visualize/plot correlation matrix as a distance matrix of points in space?

It seems to me that the various options for visualizing the correlation matrix in R are quite unintuitive for laymen. They focus on the graphical representation of the correlation matrix as different ...
kwadratens's user avatar
0 votes
0 answers
65 views

Closed form formula for distance of multinomial sample from underlying distribution

Suppose that I have a probability vector $p$ e.g. of size 10, and that I draw a multinomial sample of size $n$ from $p$. Does there exist a closed form formula to compute the expected total variation ...
Caldym's user avatar
  • 1
0 votes
1 answer
45 views

How to compare two multivariate distribution (of distances) to zero in terms of mean and variance in R?

We have N 3D coordinates estimated with two methods and want to compare them with a reference set of N 3D coordinates which is the ground truth, so in notations: ...
michael's user avatar
  • 303
0 votes
0 answers
13 views

Criteria for a Distance Metric to be Compatible with K-means Clustering

Referring to this post, it's mentioned that K-means clustering doesn't inherently rely on the pairwise distances between data points, and not every distance metric is suitable for k-means clustering. ...
Peyman's user avatar
  • 299
1 vote
1 answer
87 views

Normalizing Euclidean distance by the length of the vectors [closed]

Suppose I have 4 vectors, the first 2 vectors are of length 4 and the last 2 vectors are of length 400. all values in the vectors range from 0.5 to 0.6. The Euclidean distance between the last 2 ...
user17420392's user avatar
-1 votes
1 answer
50 views

Apply divergences between two "relative frequency distributions", instead of between two "probability distributions"

Introduction. Recalling that: The frequency is the number of observations of a specific outcome. The relative frequency is a proportion of all observations (frequency / total observations). A "...
Ommo's user avatar
  • 168
0 votes
1 answer
145 views

Statistical test or distance metric for comparing different distributions?

I want to compare the distributions of two different groups to determine if they are statistically different. Here is an example: ...
ALESSANDRO GNUTTI's user avatar
0 votes
0 answers
7 views

Distance metric to compare statistical features extracted from 400 time series for time series clustering

I would like to cluster 400 car rental demand time series (small positive valued) based on the following 7 statistical features: entropy, number of mean crossings, 95th percentile, root mean squared, ...
Jose_Peeterson's user avatar
8 votes
3 answers
2k views

How can this counterintiutive result with the Mahalanobis distance be explained?

I encountered a strange issue when performing Mahalanobis distance matching. Let's say I have one treated unit with the following values on two variables: $T:(17, 4)$. I have two control units with ...
Noah's user avatar
  • 31.5k
1 vote
1 answer
95 views

Relations between the energy distance and MMD

I was wondering if there's any relation between the two metrics. Both measure the distance between distributions (or samples of them). And they seem quite similar. The energy distance can be ...
Maverick Meerkat's user avatar
0 votes
0 answers
61 views

Hausdorff and IoU are stopped changing while dice metric is decreasing

I am facing a problem in Hausdorff and IoU, where they stop learning when reaching a specific value! While the loss and dice metric keeps changing. surface_distance also has a problem since it is ...
AMAS AL's user avatar
  • 33
2 votes
1 answer
61 views

Minimizing a distance metric where all dimensions are small

I'm minimizing distances between two 6 dimensional vectors. I have been using manhattan distance so far and it works ok but my problem would benefit from discriminating between the following two cases ...
arep0's user avatar
  • 23
0 votes
0 answers
33 views

How to quantify the dissimilarity across different types of variables?

I have two dataframes with the same columns but with varying sample sizes. I want to compare corresponding columns for homogeneity (i.e., do they come from the same distribution?). There are different ...
Glue's user avatar
  • 443
1 vote
1 answer
51 views

Upper bound on Kolmogorov-Smirnov distance after some transformation $h$

Problem setup: Suppose $X_1, \ldots, X_n$ is an i.i.d. sample from $F_X$ (CDF), and $Y_1, \ldots, Y_n$ is another i.i.d. sample from $F_Y$ (also CDF). In addition, $h(z_1, \ldots, z_n)$ is a real-...
Ethan's user avatar
  • 33
0 votes
0 answers
72 views

How to choose the order of distributions in KL divergence

While building ML model I'm facing a covariate shift detection, so I need to compare old labelled data and new unlabelled data. I'm planning to use KL divergence to quantify the distances between ...
Glue's user avatar
  • 443
1 vote
0 answers
197 views

Jensen-Shannon Distance between two normal distributions defined only by the respective means and standard deviations

I am seeking an expression of the Jensen-Shannon Distance (JSD) between two normal distributions that only uses the respective means and standard deviations. The continuous version of the JSD (in ...
Mari153's user avatar
  • 849
0 votes
2 answers
132 views

How to measure the similarity of frequency of categorical data

Sorry if this is a really simple question but I'm new to this and wondered if there's an easy way to do what I'm picturing. Imagine I've got a bunch of people and I'm asking them what they've eaten in ...
travelsandbooks's user avatar
0 votes
0 answers
44 views

Compare similarity or difference of two distributions by the ratio of moments

I'm looking for a measure that measure the similarity of two distributions in the following forms: $$ S = \frac{a \mu_1 + b \sigma_1}{a \mu_2 + b \sigma_2}. $$ The above formula I proposed is not ...
Wynn's user avatar
  • 1
0 votes
0 answers
39 views

Comparison of Fingerprints of Discrete Distributions

Let us assume that we are given $m$ iid samples from an unknown discrete distribution over $[k]$. Let's also assume that we are interested in a distributional property that is label-invariant. Let us ...
Sankhya's user avatar
  • 11
1 vote
0 answers
26 views

Dot-product of log-likelihood gradients ("scores")

Given two probability densities $p(x)$ and $p(y)$, define the dot-product of their log-likelihood gradients, also sometimes known as "scores", $\langle \nabla_x \log p(x), \nabla_y \log p(y) ...
Jimmy's user avatar
  • 11
0 votes
0 answers
26 views

In a principal component space, is a change in any coordinate going to result in the same distance between PC-projected observations?

Suppose that we have observations in a 2-dimensional principal coordinate space. Let's denote one observation $\mathbf{y}=(y_1,y_2)$ in our PC space. Further, suppose that we have another observation $...
Ron Snow's user avatar
  • 1,829
1 vote
0 answers
59 views

Measuring distances between distributions of ordinal variables

I'd like to be able to measure how "different" two distributions of ordinal (but not interval) variables $X$ and $Y$ are. Given three random variables $X$, $Y$, $Z$ I'd also like to be able ...
Peter R's user avatar
  • 31
1 vote
0 answers
63 views

R adjusted cosine similarity [closed]

I would like to find an effective way to get adjusted cosine similarity for a large matrix (10k rows). Apply seems also slow... Could you please suggest a method? Maybe based on the approaches ...
Erin's user avatar
  • 11
1 vote
0 answers
234 views

What are the downsides of using euclidean distance for hierarchical clustering of a correlation matrix?

Apologies if this has been answered elsewhere, but I couldn't find any answers discussing this specific question. I am lacking some notion on clustering using euclidean vs correlation distance, when ...
tomsgoms's user avatar
2 votes
0 answers
52 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 ...
user12138762's user avatar
1 vote
1 answer
487 views

Earth Mover (Wasserstein) distance for ordinal discrete data

I am doing data analysis for my Masters research and which includes some Likert scale type questions. I have been calculating some distances between the responses for these questions. All this has ...
anna6931's user avatar
  • 101
0 votes
0 answers
46 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 ...
Naledi's user avatar
  • 1
4 votes
1 answer
197 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 ...
Ashmin Jayson's user avatar
0 votes
0 answers
74 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 ...
Yandle's user avatar
  • 1,109
0 votes
0 answers
52 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 ...
Ashley M's user avatar
2 votes
1 answer
66 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 ...
SuperFluo's user avatar
1 vote
1 answer
110 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 ...
Sam Huguet's user avatar
2 votes
0 answers
63 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 ...
8k14's user avatar
  • 321
0 votes
0 answers
21 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 ...
Max Mustermann's user avatar
1 vote
0 answers
36 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 ...
user2653663's user avatar
0 votes
0 answers
19 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 ...
mrjamaisvu's user avatar

1
2 3 4 5
15