Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [distance]

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

2
votes
0answers
21 views

Distribution $f$ that minimizes $JSD(f||q) + JSD(f||p)$

What can we say about the distribution $f^*$ that is the solution to the following optimization problem: $$\min_f JSD(f||p)+JSD(f||q) ,$$ where $p,q$ are given distributions over some set, and $JSD$ ...
0
votes
0answers
3 views

Comparing which histogram has overall low cost

Let's say there are two histograms which basically is constructed from array of numbers which is measured by, repeatedly performing a task by two different methods and individual numbers are time ...
5
votes
1answer
133 views

Why Kullback-Leilbler divergence is a better metric for measuring distance between two probability distributions than squared error?

I know that KL-divergence is a metric that is more suitable when we want to measure the distance between numbers which a probability form. However, I am still confused what is the benefit of using KL-...
2
votes
0answers
49 views

Relation Between Wasserstein Distance and Relative Entropy

Consider the Wasserstein metric of order one $W_1$ (aka the Earth Movers Distance). I would like to know whether it is possible to link $W_1$ and relative entropy and what this would mean intuitively. ...
0
votes
0answers
5 views

Distance correlation and a corresponding mapping

I have two long vectors, say X and Y (of equal length). I computed the Distance Correlation as implemented in Scipy and I got a ...
0
votes
0answers
31 views

Signature of a distribution - Earth Mover distance

I am studying the Earth Mover Distance from here, but I have some difficulty in fully understanding what is the signature of a distribution and how it matches with the last constraint of the Earth ...
0
votes
0answers
33 views

Total variation norm

I am reading Dwork, C., Hardt, M., Pitassi, T., Reingold, O., & Zemel, R. (2012, January). Fairness through awareness. In Proceedings of the 3rd innovations in theoretical computer science ...
0
votes
1answer
21 views

estimate equal distribution of few points on a line

I am trying to find the best solution to estimate equal distribution of points over a line. I know I can use relative SD or similar, but I was wondering if there are more "specific" methods that can ...
0
votes
0answers
12 views

How can I analyse simmilarities/differences of one nominal variable of two different groups?

I have two different samples. I want to measure how similar is each individual of the first group with the second group in terms of Var 1 (nominal not ordered), given that they are both categorized ...
0
votes
0answers
7 views

Scoring the difference between a family of distributions and a test distribution

Let's suppose we have a random model that I can sample to generate distributions of a certain 1D variable. I want to score the distance of a test distribution to the model in question. The distance ...
1
vote
1answer
36 views

Difference between Euclidean ,Pearson, Geodesic and Mahalanobis distance metrics

Given a set of samples $X$. We are tasked to find an appropriate distance metric for $X$ from the given options which are Euclidean Pearson Geodesic and Mahalanobis distance metrics. To solve this, ...
0
votes
0answers
10 views

Metric learning with respect to an outcome

Suppose I have $n$ datapoints in $p$-dimensional space, and the $p$ variables are highly heterogenous. That is, there is no natural way to combine them. Some are ordinal, some one-hot, some continuous,...
1
vote
1answer
20 views

What is the specific normalization chi2 in seqdist?

In the documentation for the seqdist() function it is noted that there is "...a specific normalization for"CHI2" and "EUCLID". See the Details section." (p.60). But in the details section there is no ...
0
votes
0answers
39 views

Advantages of Wasserstein barycenters

Which are the advantages of using Wasserstein distance when averaging many probability distribution estimates? How does uncertainty of each affects the computation of the barycenter? Does the ...
0
votes
0answers
13 views

Is there a difference between Hausdorff Distance and Discrete Frechet Distance when working on time series?

I'm currently doing a little research on which kind of distance metric is the best for comparing the time-series I'm working with. To be clear, I'm doing this for a computer science internship, and I ...
0
votes
0answers
15 views

Proxy for Mahalanobis distance when n < p? [duplicate]

I'm working on a ranking problem where I want to measure the distance between a collection of query points (as a group) and each target point in my database. Each query point is part of the set of ...
2
votes
0answers
26 views

Distance / Metric between two regression models? [closed]

I wonder if there is any theory or work about the "similarity" of two regression models. For example, if it is linear regression, the "similarity" could be defined by the l-2 distance between the ...
1
vote
0answers
24 views

Distribution of distance between positions

I have N = 3 billion ordered positions, as in a genome that has 3 billion base pairs. I have R = 3 million, as in 3 million SNPs (Single Nucleotide Polymorphisms) that are (close to) randomly ...
0
votes
2answers
16 views

Distance based Spatial sampling

I am struggling with spatial sampling of data which has Latitude & Longitude for data points. I need to do sampling such that no adjacent or nearby point should get selected ( Need to give some ...
0
votes
0answers
24 views

Is euclidean distance in pca rotated and scaled when $n < p$ the same for all observations?

I am trying to come up with an appropriate measure of the 'distance to the normal mean' in high dimensional space and I came up with a strange result, and I need some theoretical background to ...
0
votes
1answer
26 views

How can K-Means clustering work without spatial information?

Just got stuck at working with K-means clustering. I have looked up this python/skimage commands: ...
0
votes
0answers
11 views

Manipulation of asymptotic bounds for distance between estimators

Suppose I know some asymptotic bounds: $$\mathbb{E}(|D(a,\hat{a})|) \lesssim O(n^{-1/2}),$$ where $D$ is some distance between probability measures, and $a$ is a probability measure while $\hat{a}$ ...
0
votes
0answers
37 views

Distance between point process realizations

Is there a valid distance metric for measuring how similar are the realisations of two point processes? E.g. let's say we simulate two histories $ h_1, h_2 $ in the time interval $ [0, T] $ for two ...
0
votes
0answers
44 views

Dot Product and Distance Matrix

If we want to calculate the squared distance between 2 vectors, $x$ and $y$, we use the dot product: $$||x-y||^2 = (x-y)(x-y)^T = xx^T - 2xy + yy^T$$ The question is, how to generalize this concept ...
0
votes
0answers
22 views

Inferences about leverage score and Mahalanobis distance [duplicate]

I have some inference given below: Given the design matrix $\textbf{X}$, the leverage score is defined as $\textbf{H}_{ii}$ where $\textbf{H} = \textbf{X} (\textbf{X}^T \textbf{X})^{-1} \textbf{X}^T$ ...
1
vote
0answers
177 views

Hierarchical clustering dendrogram on a distance matrix

When computing hierarchical clustering over a data matrix, a dissimilarity matrix is first computed in order to build the tree (dendrogram). For example: ...
3
votes
1answer
150 views

Explaining the difference between Pearson correlation and distance correlation

This question and its answer might highlight my naivete regarding Brownian/distance correlation. I'm using the difference between a matrix of distance correlations, as calculated by ...
0
votes
0answers
79 views

Gower Distance and PAM algorithm with Random Forest for Variable Selection

I am currently working with cluster analysis and am trying to create clusters based on the important variables. My data consists of both categorical and continuous variables thus I have used the ...
0
votes
1answer
136 views

What is Intraclass Distance?

For an assignment I have to compute the intra-class distance and use it as an objective function to select features. This is for the MNIST dataset. While I have a fairly good handle on other aspects ...
1
vote
0answers
18 views

R daisy - Gower distance, different values with different number of observations [duplicate]

I have a mixed data set where I want to compute distances between observations with Gower in R (daisy function). When I compute distances between different number of observations, the distances seem ...
1
vote
1answer
87 views

How is Student's t-distribution related with this similarity/probability equation between data points?

In the t-SNE paper "Visualizing Data using t-SNE" and a Deep Embedded Clustering (DEC) approach "Unsupervised Deep Embedding for Clustering Analysis", they both use the Student t-distribution to ...
0
votes
0answers
4 views

Similarity between observations and an ideal trend

I have a series of well known data showing, for example, the average weight by age in Europe. Let's say yesterday I called a lot of people and I asked for their age and weight. The data coming from ...
1
vote
2answers
176 views

For calculating the distance between different points, does it make sense to use all Principal Components?

I have a data frame with about 500 observations and 8 variables that I'd like to run through PCA in order to try and reduce the number of variables to only those with the most variance. From here, I ...
2
votes
0answers
51 views

Are there distance-based models that can include a random effect?

Distance-based linear models, such as those implemented by the adonis package in R, allow us to fit one or more predictors to a multivariate response represented by ...
0
votes
0answers
24 views

Training a classifier with just a subset of labelled classes

I have a problem space in which there are tens of different classes but we only have some labelled data of just a few of those classes. The classifier should predict the class of those it knows (i.e. ...
2
votes
1answer
207 views

Is one-hot encoding and standardization of data equivalent to Gower's distance?

For clustering and other techniques for mixed data (numerical and categorical), Gower's distance is usually more preferred than Euclidean distance because the former computes distance differently for ...
1
vote
0answers
139 views

KL divergence between sample and true (multivariate normal) distribution

I was wondering, whether there is a possible interpretation of the KL-Divergence between sample and true distribution in terms of probabilities. E.g. given $P=\mathcal{N}\left(\mu,\Sigma\right)$ and $...
2
votes
1answer
40 views

$L_2$ norm of product of two vectors

Let's assume we have two matrices $A^{d\times 1}$ and $B^{1 \times e}$, and we define their product as $C^{d\times e}$. Assuming $A,B$ are real valued with all entries in $[-1,1]$. I can intuitively ...
0
votes
0answers
6 views

BGSS for non-euclidean distance matrices

How to compute BGSS without the concept of centroid or barycentre where only a distance matrix is available and not the original data points? For non-euclidean distances, TSS (total sum of squares) = ...
2
votes
1answer
50 views

Distance metric with characteristics of cosine and Manhattan

I'm working on a project where I want to find similarities between groups of events. So far I have expressed groups of events as vectors of event counts and computing similarities between them. I'm ...
0
votes
0answers
25 views

Class frequency comparison (exponential distribution)

I have two different sources of data and I would like to check if their class distributions are similar and how much. The first dataset ($D_1$) has 2M samples and the second ($D_2$) 6M. When I ...
2
votes
2answers
36 views

Localized distance function on sequential binary data

I am trying to find a good distance function for sequential data that is all binary. For now, I am using Edit distance however I have some more domain-specific knowledge that I would like to ...
0
votes
1answer
32 views

How bregman divergence gives optimal solution for cluster assignment?

Can somebody gives intuition behind Bregman divergences that how using it leads to optimal cluster representation? And why using ...
0
votes
1answer
28 views

Euclidean distances in spaces of different dimensions

A modest attempt to illustrate my question: Setup Consider a survey where you have to choose if you like to do an activity or not. You do this for a number of activities $A_1,...,A_8$. In addition, ...
-1
votes
1answer
63 views

How to cluster a (directional) dissimilarity matrix with both positive and negative values?

I may be thinking of this incorrectly but what would be the best way to cluster a dissimilarity measure that has direction? For example, if someone had condition A ...
0
votes
0answers
130 views

Is there any intuition behind the writing Jensen-Shannon divergence based on the entropy?

I know that Jensen-Shannon divergence between two distribution $P$ and $Q$ can be written as follow: $JS(P||Q) = H(\frac{P+Q}{2}) - \frac{H(P)}{2} - \frac{H(Q)}{2}$ But is there any intuition behind ...
2
votes
0answers
30 views

Computing Wassertein Distance

For two probability measures $\mu$ and $\nu$, the Wassertein Distance is defined as $$W_p (\mu , \nu) = \left[ \inf\limits_{\gamma \in \Gamma} |x-y|^p \, d\gamma (x,y) \right] ^{\frac{1}{p}} \, , $$ ...
0
votes
1answer
38 views

R: What is the distance function equivalent for this formula?

Hi I'm using an R package that calculates distance with this formula here, as.dist(1 - cor(df, use = "pa")) However I cannot seem to find an equivalent dist ...
1
vote
0answers
52 views

How to localize points from an incomplete distance matrix in R?

Suppose you have 3 shops and 2 supply units, and you only know the 6 pairwise (Euclidean, assuming 2D) distances between each shop and each supply unit, but not the pairwise distances between the ...
0
votes
0answers
3 views

Quick search based on similarity: logarithmic time

I have some objects $x\in X$ and a metric $s:X\times X\to\mathbb{R_{+}}$. For each $x$, there is a $y\in Y$. Note that $x$ and $y$ are highly structured and we cannot consider neural networks for ...