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
11 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 ...
-1 votes
0 answers
12 views

Is the integral of TV distance larger than the TV distance of an integral? [closed]

Let $z \to \mu_z$ be a Borel measurable function from a Polish space $S$ to $(\mathcal{P}_p(U),W_p)$, where $(U,p)$ is a Polish metric space. Let $V \subseteq S$ be a Borel set inside $S$. Let $\...
0 votes
0 answers
27 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 ...
0 votes
1 answer
2k views

Distance between two points with covariance [duplicate]

I would like to find the distance between two points location 1 and location 2. In 2D, location 1 is represented by a Gaussian distribution with mean $\mu_1$ and co-variance matrix $\Sigma_1$. ...
0 votes
0 answers
7 views

Does a bounded Wasserstein distance indicate the probability difference is also bounded?

Suppose we have two random variables $X,Y \in R$. $X$ follows a distribution $P$, $Y$ follows a distribution $Q$. Denote the $p$-Wasserstein distance between $P,Q$ as $W_p(P,Q)$. Suppose we know $P$ ...
1 vote
1 answer
430 views

Does DTW return smaller distance measure than Euclidean Distance?

QUESTION 1: When computing the distance between two time series, shouldn't the DTW distance measure return a smaller distance than the Euclidean distance (assuming DTW internally uses the Euclidean ...
1 vote
0 answers
15 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) ...
1 vote
1 answer
48 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 ...
1 vote
1 answer
591 views

Euclidean distance between points in PCA space along different principal component dimensions

I've picked up this project half way through, and I'm working through the last guy's code, so please bear with me. So the original data consists of 500+ points in 150 dimensions, and I want to ...
0 votes
0 answers
26 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 ...
2 votes
2 answers
171 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 ...
1 vote
0 answers
19 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 ...
19 votes
4 answers
13k views

What's the maximum value of Kullback-Leibler (KL) divergence

I am going to use KL divergence in my python code and I got this tutorial. On that tutorial, to implement KL divergence is quite simple. ...
1 vote
0 answers
63 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 ...
1 vote
1 answer
221 views

Correlation-based distance dissimilarity measure is not a metric [duplicate]

Show by an example that the correlation-based distance $d(X,X^\prime)=1-\rho(X,X^\prime)=1-\frac{\sum_{j=1}^p (X_j-\bar{X})((X_j^\prime-\bar{X}^\prime)}{\sqrt(\sum_{j=1}^p (X_j-\bar{X})^2\sum_{j=1}^p (...
2 votes
1 answer
21 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 ...
1 vote
1 answer
490 views

Outlier detection in high-dimensional longitudinal data

I'm having a longitudinal dataset with a large number of variables where I would like to use a ML algorithm to inspect possible outliers. What are the techniques you would use for this? I've seen a ...
4 votes
1 answer
439 views

"PCA" based on distance metric other than $L_2$

PCA is based on $L_2$ distance and is maximizing variance along the PC axes. What if we try a different distance measure (something else than $L_2$)? Do any methods corresponding to PCA but with ...
1 vote
0 answers
13 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 ...
0 votes
0 answers
23 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 ...
4 votes
1 answer
178 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 ...
0 votes
0 answers
23 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 ...
0 votes
0 answers
16 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 ...
0 votes
1 answer
207 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 ...
0 votes
1 answer
39 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 ...
172 votes
10 answers
112k views

Bottom to top explanation of the Mahalanobis distance?

I'm studying pattern recognition and statistics and almost every book I open on the subject I bump into the concept of Mahalanobis distance. The books give sort of intuitive explanations, but still ...
5 votes
1 answer
1k views

Appropriate distance measure between two finite state Markov chain models?

I am empirically creating Markov chains similar to this question. I end up with several finite state Markov chain models with the same nodes but varying transition probabilities. I want to calculate a ...
2 votes
0 answers
47 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 ...
1 vote
1 answer
1k views

How to extend the dynamic time warping to 3D Cartesian space

I already searched the topics here but couldn't figure out clearly what to do so I'm asking here. I have thousands of fiber tracts (the outputs of a tractography algorithm on brain diffusion MRI) that ...
0 votes
2 answers
1k views

Clustering given "distance" matrix and K in python

INPUT ($D$, $K$): I have a symmetrical "distance" matrix $D$ of size $N \times N$ which tells me how distant one object is from another. Function used for calculating the distances is not a ...
0 votes
0 answers
14 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
0 answers
34 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 ...
4 votes
1 answer
291 views

Is random walk a good metric to compute distances of two sets of nodes in the graph?

I have a big graph and I have three sets(A,B,C) of labeled nodes on it. I would like to compute on average how fare each sets are from each others. In other word, I want to compute distance matrix for ...
0 votes
0 answers
9 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 ...
2 votes
0 answers
62 views

Intuition behind log in kl distance

So, let's start stating that I already read both Why KL-Divergence uses "ln" in its formula? and What is the role of the logarithm in Shannon's entropy? ... However, I still have no ...
0 votes
0 answers
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 ...
1 vote
2 answers
470 views

Is it correct to compute Bhattacharyya distance for Cauchy like, Bell shaped function?

I have the algorithm (MF (Membership function) ARTMAP Neural network). Output from this algorithm are clusters in n-dimensional feature space. Over each cluster (in n+1 dimension) there is some ...
1 vote
1 answer
230 views

Odd-one-out survey

I'm currently conducting a survey on a pool of songs, divided in rounds. For each round, the user listens to 3 songs, and then choses the one he thinks is the odd-one-out (similarity-wise). I'm ...
2 votes
0 answers
100 views

Determine outliers for robust Mahalanobis distance

I want to apply a robust mahal distance and found an implementation in scikit. but there is the number of outliers already given in advance. For me, who wants to find out the number of outliers, this ...
29 votes
2 answers
39k views

Using correlation as distance metric (for hierarchical clustering)

I would like to hierarchically cluster my data, but rather than using Euclidean distance, I'd like to use correlation. Also, since the correlation coefficient ranges from -1 to 1, with both -1 and 1 ...
0 votes
0 answers
44 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 ...
7 votes
2 answers
18k views

Gower's (dis)similarity index

I would like to ask a question about Gower similarity/dissimilarity index. Is it ok to use the Gower dissimilarity measure with Ward linkage clustering? I was reading that the Gower similarity index ...
0 votes
2 answers
87 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 ...
2 votes
2 answers
80 views

Calculating distances: Using count data or discrete probabilities?

I am looking into calculating distances between vectors for some data analysis. One question I have is whether I should use actual count data or convert to discrete probabilities. For some distances, ...
0 votes
0 answers
36 views

Mahalanobis distance for a vector with (also) angular data

I have a vector of data that is composed of 9 values: position in 3d orientation in 3d size in 3d. Obviously, angles are "circular" values, that is 359deg is near to 1deg, but $359 - 1 = ...
0 votes
1 answer
62 views

Can we test if distance matrices are significantly farther apart?

I work in the field of linguistics, and my current project involves lots of distance matrices generated from language data, which measure the distance and similarity of dialects. Concretely, my ...
1 vote
1 answer
43 views

Distance measure between two sequences of different lengths [duplicate]

I am looking for some distance (or similarity) measure between two sequences, possibly of different lengths. Conceptually, I would like a measure with a property that $[3,1,5]$ is similar to $[3,1,4,5]...
3 votes
1 answer
155 views

Non-logarithmic approaches to compositional data

Background Compositional data ($x_i>0, \sum_i x_i=c$) are usually analyzed using some kind of log-transformation (alr/clr/ilr), to take into account naturally the fact that, in presence of the sum ...
2 votes
1 answer
38 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 ...
2 votes
1 answer
65 views

Equating different forms of Hellinger Distance

For a research report, I want to show that the standard expression of the Hellinger Distance between two discrete distributions, $$H(p,q)={\sqrt{\frac{1}{2} \sum_{x \in X} \left[\sqrt{p(x)}-\sqrt{q(x)}...

1
2 3 4 5
15