Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
1answer
25 views

Hellinger distance for two shifted log-normal distributions

If I am not mistaken, Hellinger distance between P and Q is generally given by: $$ H^2(P, Q) = \frac12 \int \left( \sqrt{dP} - \sqrt{dQ} \right)^2 .$$ If P and Q, however, are two differently ...
0
votes
0answers
9 views

How to Measure Similarity to Ground Truth? (Measuring Similarity with Features of Different Scales/Units)

I am trying to reproduce a set of ground truth data [t_start | t_end | theta_start | theta_end] (blue) A plot of my ground truth data would show a scatter of lines along the time and angular axes....
2
votes
1answer
35 views

Choosing appropriate distance metric and algorithm for clustering for any given dataset

I have been looking for an answer/guidance/pointer to this question of mine for a while. After going through many (100s actually) posts and articles, I finally found this question, where this response ...
2
votes
1answer
35 views

Distribution of distance of N-1 gamma distributed iid random variables from minimum

I have the minimum value of N iid random variables that are gamma-distributed. The parameters of the gamma distribution are known. What would be the distribution of the distance of the remaining N - 1 ...
0
votes
0answers
13 views

detect an outlier in multi-dimensions - where the number of rows is not >> number of columns

I have the following situation: a data frame with two dimensions x and y, with three "areas": an a-parametric distribution ...
1
vote
0answers
23 views

Is pairwise distance matrix useful to k-means?

The k-means implemented in scikit-learn precomputes distances but I don't how these distances are used. In its standard version, k-means is known to compute only the distances between the points and ...
5
votes
1answer
50 views

Suitable distance metric for time-series clustering with respect to location of shapes

I'm doing clustering on time-series (each time-series has the information for one day = 24 hours). For the clustering purpose, it's important for me to consider the time period in which the shape of ...
2
votes
0answers
77 views

Obtain within-group Gram matrix out of distance matrix

Gram matrix Let $\bf X$ be a n x p dataset with columns (variables) centered. Then p x p $\bf X'X$ is the total scatter matrix ...
0
votes
0answers
28 views

How to compute distances with both categorical and continuous attributes?

I have to handle with a datast containing both categorical attributes (around 25) and continuous attributes (around 25). I would like to do outliers detection. I think that it would be a good idea to ...
0
votes
1answer
13 views

Single Linkage Clustering with Manhattan metric

Say suppose we are having 5 data points with 3 attributes each ... (4,3,1) (2,1,5) (1,2,3) (2,3,1) .... Now let us build the distance matrix. If we do Manhattan metric then the cell corresponding to ...
1
vote
0answers
33 views

What happens with Mahalanobis-Distance, when the assumption of equal Covariance-Matrices breaks down

Assume that we want to compare the forecast quality of various forecasters $f$ on $n$ values such as stock-market prices or whatever. We could then define a "Mahalanobis-Distance" (MD) (or rather ...
0
votes
0answers
28 views

Common methods to calculate total distance from data with categorical, continuous and counting variables

I have a data set with categorical, continuous and counting variables. I want to be able to use a method that will give me a distance for each pairwise data point. From my understanding, each type ...
0
votes
0answers
23 views

Similarity of two sets of points

PROBLEM I have one set of 10 points, $X = \{(x_1,y_1),\,\dots,\,(x_{10},y_{10})\}$ and two sets of 3 points each, $A = \{ (a_1,b_1),\, (a_2,b_2),\, (a_3,b_3) \}$ and $C = \{(c_1,d_1),\,(c_2,d_2),\,(...
0
votes
0answers
16 views

Which is the best distance metric in an Indicator matrix

Is it okay to use the $\chi^2-distance$ when we have a indicator matrix? With Indicator matrix I mean the complete dijuntive table that is used in the Multiple Correspondence analysis. I mea n, if we ...
0
votes
1answer
51 views

Is Earth Mover Distance has maximum bound?

I have two probability distributions which each distribution has sum up to 1. I want to compute the distance between those two probability distributions. I want to use Earth Mover Distance to ...
4
votes
2answers
94 views

The Curse of high Dimension And Distance

For extracting features from video frames (2 sample/sec) I use keras framework in python and load VGG16 that input size is (150,150,3) and output size is (4,4,512). After the feature extraction step I ...
4
votes
2answers
72 views

Is the maximum bound of Euclidean distance between two probability distributions equal to $\sqrt{2}$?

I used Euclidean distance to compute the distance between two probability distribution. The example of computation shown in the Figure below. As my understanding, the maximum distance occur while $...
11
votes
3answers
941 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. ...
5
votes
2answers
153 views

Do Autoencoders preserve distances?

Based on my understanding, autoencoders are used to find a compact representation of input features that carries the essential underlying information. Is there any relationship between the L2 ...
1
vote
0answers
43 views

Gower's Distance + PCA : How to interpret in R? [closed]

I have a dataset (40 records and 10 variables that is a combination of continuous variables and categorical variables (age, work experience, current salary, educational qualification, house in rural/...
0
votes
0answers
27 views

On the right dissimilarity matrix for discrete cluster analysis

Currently I'm having some trouble on deciding the right dissimilarity matrix for my data. After reading some previously asked questions here, I'm even left more confused. So, here is the deal. My data ...
0
votes
0answers
14 views

How well does a subsample of a large dataset represents the full set in a statistical sense?

Suppose that a large sample $ \{X_k\}_{k=1}^{n} $ (from a multivariate distribution $ X $) is given. I would like find a subsample $ \{ Y_k \}_{k=1}^{m} \subset \{X_k\}_{k=1}^{n} $ of this dataset in ...
1
vote
0answers
17 views

Distance vs Dissimilarity measure

I am reading up on distance and dissimilarity measures for my class on natural language processing and could not understand this slide. Why does the dissimilarity measure not satisfy item 3 ? What ...
0
votes
0answers
27 views

Using some kind of similarity measure to predict target variable from historical data

Let me first describe the data I have: I have aggregated CAN bus data (1 second windows, from the original 50 ms values) from 6 forklifts, and I also have measurements for these 6 trucks which ...
0
votes
0answers
31 views

Difference between the Wasserstein metric, mallows metric and Earth mover's distance

I'm really confused, is there a difference between the Wasserstein metric, mallows metric and Earth mover's distance? If yes What is it? Thank you
3
votes
2answers
101 views

Distance calculation on variables that cannot be represented in the Euclidean space

Given a variable such as number of events attended together, which is more of a multi-dimensional data how can you calculate a sort of distance between people (i.e. ...
0
votes
0answers
18 views

Gower vs Log Likelihood distance measure for mixed variables

I am working on distance measures and have used gone through the theory for two distance measure i.e. Gower distance measure and the log-likelihood distance measure. Am I correct to say that the ...
2
votes
1answer
27 views

What is a “Nominal Type Histogram” and “Shuffling Invariant Property”?

I'm reading this paper about comparing histograms ["Comprehensive Survey on Distance/Similarity Measures between Probability Density Functions" by Sung-Hyuk Cha] that writes in the introduction: ...
3
votes
2answers
114 views

Distance metric for source code

I'm trying to compare source code from multiple github projects, and in particular I'm looking for projects that include large chunks of code from other repositories, or large chunks with small ...
0
votes
0answers
24 views

How to measure distribution of values (e.g. location of dots on a line) in two groups?

Let's say I have 2 lines of equal length with dots on them. Each dot has a position (number). How can I measure if the distribution of these dots correlates (i.e. presence of hot spots or gaps without ...
0
votes
2answers
89 views

Hierarchical Clustering: What is the difference between linkages and distance measures?

Clustering algorithm defines a particular distance (correlation or euclidean) and a linkage (which, strangely some books call distance - single, complete, average or centroid). Conceptually, ...
10
votes
2answers
187 views

Does Mercer's theorem work in reverse?

A colleague has a function $s$ and for our purposes it is a black-box. The function measures the similarity $s(a,b)$ of two objects. We know for sure that $s$ has these properties: The similarity ...
1
vote
1answer
74 views

Binary distance measure

I want a metric - not an answer - for this. If I have a main binary sequence - 00100 I want a measure to tell me how far away another binary sequences 1's are relating to the sequence of interest. ...
5
votes
1answer
131 views

Determine rate of change in dissimilarity (distance)?

I have repeated measures plant abundance data for 36 forest plots, across 80 years involving 50+ species of trees. The data are structured as: Columns = ...
0
votes
0answers
9 views

Setting up an experiment for growing dodder and its major and minor host plant

I'm looking at how distance can alter a parasitic dodder plant's (Cuscuta europaea) preference to choose its minor host plant over major host plant in finland. For its major host I chose urtica dioica ...
0
votes
1answer
14 views

Distance measure for binary arrays

Basically if I have binary sequence that I want to check against, and I want to determine how far other binary sequences are to this first sequence, what is the most appropriate measure to use. The ...
0
votes
1answer
36 views

Online anomaly detection

I have some time series data I'm working with, where each at each step I have a sequence. For example I could have a bunch of graphs looking like the left figure, followed by an anomalous piece of ...
0
votes
0answers
26 views

similarity between position frequency matrices

I need to check the similarity between a set of position frequency matrices (finally to see if there is significant difference between 2 groups of 8 matrices). Simplified example of two matrices are ...
1
vote
1answer
43 views

Validating Clustering by Considering the Ratio of Intra-cluster to Inter-cluster Distance

I'm trying to evaluate a clustering method by looking at the ratio of the mean intra-clustering distance (the average distance between points in the same cluster) to the mean inter-cluster distance (...
1
vote
0answers
16 views

How to calculate the similarity/distance between multiple measures for a single individual

I have what may be a relatively simple query, but I'm unsure of the best way to do it. I would like to calculate the similarity between multiple measures for a single individual. I have a data matrix ...
0
votes
0answers
28 views

Measuring Distances and Subsequent Analysis

I am measuring 24 colour panels using 4 different devices. I know the ground truth of the 24 colours - they are a MacBeth colour chart. Measuring the 24 colours yields a matrix of measurements (24 x ...
0
votes
0answers
43 views

Distance Between 1-D Histograms and Binning

In order to calculate the distance between two 1-D histograms, they must have the same number of bins. I'm wondering if it's preferable to have more or fewer bins for such calculation. For example, ...
0
votes
0answers
6 views

Probabilistic distance in space of words of equal lengths

I am new in this type of analysis. I have a space of words of the same length, eg, "horse", "mercy", "bingo", etc. Overall I have eg 1000 words. People are making mistakes typing these words, so in ...
1
vote
0answers
27 views

Solving a system of equation by moment condition reports error but minimum distance works

I do not understand the following error message I get using the gmm function in R. The code below creates two moment conditions (...
3
votes
1answer
94 views

Distances between random points in a hypercube and statistics of exponents

TL;DR: Why is $\text{avg}\left(|a-b|^k\right)=\frac{2}{(k+1)(k+2)}$? I.e. for $k=2$, as for finding average Euclidian distances, the result is $\frac{1}{6}$? I've been reading a book about "Corobs," ...
0
votes
0answers
21 views

Distance metric for comparing two rankings of different length with partial overlap

Suppose I have two competing ways to rank: 1. Bob Bob 2. Alice Sam 3. Tom Alice 4. Sam . The rankings may have some overlap (like Bob, Sam, and ...
1
vote
1answer
128 views

Calculate the Kullback-Leibler Divergence for these 2 Gamma distributions

I have 2 models $P \sim Ga(115,1329.914) \\ Q \sim Ga(140,650.6775)$ and I'm looking to calculate the K-L divergence of these 2. $D_{KL}(P||Q) = \int_\infty ^\infty p(x) log \frac{p(x)}{q(x)}\,dx$...
3
votes
2answers
205 views

Is there a version of the Mahalanobis distance for matrices?

I'm working on a computer vision problem and I want to use the Mahalanobis distance to cluster image patches (2D matrices having the same dimensions). I haven't been able to find any generalisation up ...
0
votes
0answers
24 views

Similarity Measure for two vectors with arbitrary order

while computing Approximate Bayesian Computing i had the following problem. Suppose i have a vector (1) of length 20 with different ages (in years) -half in the range 18-20, the other half over 40. ...
1
vote
3answers
504 views

Can I use Manhattan distance on binary data for hierarchical clustering?

I understand that classically Jaccard and Hamming work best with binary data, but is there anything specifically wrong with using a Manhattan distance instead with the complete linkage function?