# Questions tagged [distance]

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

653 questions
Filter by
Sorted by
Tagged with
44 views

### K-Means transform function does not match pairwise_distances_argmin_min centar calculation

I need to be able to select first N most representative points from each cluster calculated by K-means. To do so, I am aiming to calulate the distance of each point to its own cluster center and take ...
24 views

44 views

### Intended interpretation of one-mode, three-way (dis)similarities?

I have what I think is a very simple question, the answer has just eluded me so far. A two-way similarity, $s_{ij}$ (for objects $i$ and $j$) can be interpreted fairly straightforwardly as the degree ...
25 views

### Which is the 'best' method to detect outliers from a PCoA analysis?

I'm trying to find a suitable method for detection of outliers from a PCoA output. This analysis is used to visualize the results from a distance matrix between a set of sample applying the Chemical ...
60 views

### How to compare two set of PMFs?

I'm facing some challenge and I don't know the correct approach for this. I'm having two sets of PMFs $S_1, S_2$ and I need to compare (distance like Jensen–Shannon) $S_1$ with $S_2$. What's the best ...
32 views

### Euclidian distance vs cosine similarity

Currently I'm working on facial recognition. If I use encoding/feature vectors of 2 images which method will prove more accuracy, L2 norm or cosine similarity and why? I read "ICA performs ...
69 views

### Why clustering in a linear scale using correlation based distance gives better results than clustering in a log2 scale?(PAM clustering)

I have questions regarding cluster analysis. I am trying to cluster data made up of proteins. (23 columns and 1800 rows) I have the data in a log2 scale, some variables range between 2-10 and others ...
104 views

### Statistical distance between two matrices

The statistical distance between two probability distributions can be measured with $f$-divergences such as the KL-divergence. The statistical distance between two clusters can be measured with ...
33 views

### Are there any linkage functions that can handle signed dissimilarity matrix?

I know that a "distance" matrix is a symmetric positive matrix where the diagonal is zero. A "dissimilarity" matrix, to my understanding, is a generalization of a distance matrix. ...
61 views

### What is the appropriate metric for determining distance / dissimilarity of sparse, high dimensional data in PCA space?

I'm working with scRNA-seq data (~96% sparse, high dimensional), and am trying to determine distances between the cells in PCA space - NOT for the specific purpose of clustering. The principal ...
146 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 ...
67 views

### Coordinates from noisy distance matrix?

I have a black box in which I know there is a 1D line and points along this line, and as output from this box I can get out a distance matrix for the points, but I know there is noise in the estimate ...
38 views

### Is there any divergence like Jensen-Shannon for two vectors which are not distribution? [duplicate]

I know that the Jensen-Shannon is defined as a divergence between two or more distributions ($P_1,P_2,...P_k$). But, instead of distributions, I have some multiplications of two distributions (so they ...
39 views

### Difference between two multi-variable datasets

I have multiple activities that a person performs, and the corresponding multidimensional values [$x$, $y$, $z$ - coordinates] for two devices and their readings. I need to find the difference between ...
151 views

### What is the correct way to implement Jensen-Shannon Distance?

I'm trying to use this code to compute the Jensen-Shannon distance: ...
36 views

### How important is triangle inequality for statistical estimators?

(Pearson's) correlation is a measure of co-dependence that does not fulfill certain axioms such non-negativity and triangle inequality. In layman's terms, how would you describe what triangle ...
59 views

### The first principal component line minimizes the sum of the squared perpendicular distances between each point and the line [duplicate]

I am currently studying An Introduction to Statistical Learning, corrected 7th printing, by Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani. Chapter 6.3.1 Principal Components ...
87 views

### direction of outlier detected by the Mahalanobis distance

Mahalanobis distance provides a value that might be used for the detection of outliers. My question: how to calculate the direction of the outlier (as a vector)? A simple answer would be to use the ...
130 views

### Sensitivity of KL Divergence

I am very new to the concept of KL divergence. Although I have grasped the fundamental formulations, I have a confusion comparing the KL divergence across the different distributions. Suppose I have 3 ...
19 views

### How to calculate similarity between two sets of items rated on a single dimension?

(I'm just making up variables for this example.) Let's say I have 100 words rated on their pleasantness. I also have 100 images rated on their pleasantness. I then had participants rate the fit ...
19 views

### Grey relation between two datasets?

I am trying to compare two datasets representing the same output. The dataset is categorical. For example, my first data output is (1)100-200 (2)200-300 (3) 200-300 (4) 300-400 etc. Second data ...
23 views

### What is the appropriate way to analyze data subsetted into bins and compare those bins across conditions?

I am wondering how to approach the analysis of a data set that I've obtained. I have animal trajectories moving toward a target under multiple experimental conditions. One of my analyses was to look ...
21 views

### Inconsistent results from partial Mantel test on (non)distance matrices

Currently I am trying to look at the correlation between three matrices of ecological data. All three are forms of distance matrices (two matrices of pairwise community dissimilarities and one matrix ...
48 views

### Euclidean distance from zero

I am trying to create my own weights for relative work task importance, or weight. For every task, I have a value of importance, ...
8 views

### What test to use on distance data inside SPSS?

I have a set of GPS points that I have put inside a GIS software to obtain their distance from the Florida coast. These points represent litter found on the ground. So for each point, I have data as ...
53 views

### distance between two points (x,y) weighted by location (x)

a new on algebra. I am trying to create an indicator of the distance between two points (x,y) from a (0,1) scale, but I want to create a weight that reduces such distances as the point x is closer to ...
2k views

### How is pairwise PERMANOVA/adonis a valid non-parametric approach for pairwise comparisons

Assume that we have taken independent random samples of several individuals from 5 locations that represent 5 populations. The design is fairly unbalanced: the number of individuals sampled from each ...
123 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 ...
109 views

### Interpreting results of ANOSIM conducted on non-abundance data

I am trying to understand how to implement and interpret an analysis of similarities (using the vegan package in R) in the following situation. Consider the following data frame: ...
152 views

### Mahalanobis Distance for Continuous and Ordinal Covariates

My dataset of home sales includes covariates such as square_feet which are continuous and others like num_bedrooms which are in <...
31 views

### How to calculate the similarity of data with noise?

I'm stuck on calculating similarity. Please tell me in which direction to move. There are three files of different lengths that need to be compared for similarity. It is supposed to use the cosine ...
Suppose we have two sequences of random variables $\{X_k\}$ and $\{Y_k\}$, both converging to the same distribution, say $N(0,V)$, for some covariance matrix $V$. Does this imply that \sup_{u}\left|...