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

learn more… | top users | synonyms

0
votes
1answer
42 views

A question on cosine similarity & k-means

I used the following code to perform clustering of a dataset in R. distMatrix1 <- dist(sample2, method="cosine") km<-kmeans(distMatrix1,3) I have got some ...
-1
votes
0answers
25 views

How to find the 1000 closest point to a centroid built from another matrix

I actually work on text-mining. I try to find the 1000 closest documents (inside a corpus of 56000 documents) to a selected corpus of document (150). There are a lot of words in my dictionary. I ...
-1
votes
1answer
31 views

Appropriate distance measure for positive and negative values [closed]

I am looking for an appropriate distance measure for analyzing a weather data set that includes positive and negative values for changes in temperature and precipitation through time. The values are ...
-1
votes
2answers
36 views

How to calculate distance between points in DBSCAN matrix data? [on hold]

I'm making a simple C implementation of DBSCAN following his pseudocode. If I well underand how DBSCAN works, I may represent my set of N elements (each with M features) with a NxM matrix. When it ...
0
votes
0answers
31 views

Identifying the most representative observation in a sample

Given a multidimensional X, is there a standard way of identifying the most representative observation? A few options come to mind: Minimum average distance (e.g. cosine, Mahalanobis) from all other ...
0
votes
0answers
21 views

Measuring distances between numbers, in a way

I'm using fantasy football data from Draft Kings. I have data frames that look like this in r: ...
0
votes
0answers
10 views

Average distance in distance matrix

I have a set of many longitude and latitude points within a city. I constructed the nxn euclidean distance matrix. My goal is to know which is the average distance ...
1
vote
1answer
18 views

Bhattacharya Distance on Distributions (Matrices) with Different Number of Variables (Dimensions) [duplicate]

We have two matrices, $A$ and $B$, representing two different probability distributions, with dimensions, $m*n$ and $k*n$, respectively. How can we calculate the Bhattacharya distance or another ...
0
votes
0answers
4 views

Can I use Bray-Curtis distance when performing MRPP or MRBP?

Can I use Bray-Curtis distance when performing MRPP (Multi-response Permutation Procedures) or MRBP (Blocked Multi-response Permutation Procedures)? [See Ch 24 of McCune & Grace (2002) for ...
1
vote
0answers
29 views

Intuitive explanation for covariance and inverse covariance

Say we are given n observations from the same multidimensional distribution $D$. I am trying to understand what is the intuition behind the following norms: $\sqrt{x^TC_nx}$ and $\sqrt{x^TC_n^{-1}x}$ ...
1
vote
0answers
19 views

Log-likelihood distance

How to calculate log-likelihood distance between clusters in two step clustering? if the following is the solution,then how to proceed? I would appreciate if someone can help me to find this. I am ...
0
votes
0answers
10 views

Converting a m x n matrix to a n*m x 3 matrix [migrated]

I currently have a matrix that is 479 x 729, and I would like to convert this matrix into a three column matrix such that the first column is the row entry of the original matrix, the second column is ...
0
votes
1answer
38 views

What is the use of distance matrix in clustering algorithms?

I found a C library for clustering and I was reading about the distance matrix here: it says: The first step in clustering problems is usually to calculate the distance matrix. This matrix ...
3
votes
1answer
95 views

Visualizing Mahalanobis distance in more than 3 dimensions

I have 4 dimensional data in a matrix, group1, that looks like the following: ...
0
votes
0answers
7 views

Can I use Bray-Curtis similarity with environmental data? [duplicate]

I have 18 metals concentration (in ppm) in 300 soil samples. Can I use Bray-Curtis in stead of Euclidean-distance and do I need to normalize the data?
0
votes
0answers
31 views

mahalanobis Distance between 2 groups in r

I have two groups, that each group has 3 variables such as following: ...
0
votes
1answer
49 views

Why is it bad to use Pearson distance in K-means clustering? [duplicate]

I have implemented this algorithm in MATLAB and when I produce plots I notice that using Euclidean distance, I usually get presented with a clear pattern (sum of squares decreases with the number of ...
0
votes
0answers
9 views

Investigate clusters of outcome variables in a study and verify whether stratification for an exposure changes the clusters

We have a study in which we have a number of outcomes (~30) and big number of observations/patients (> 1000) and we tested the effect of a certain exposure on the probability of these outcomes. For ...
2
votes
0answers
69 views

Combining Bhattacharya Distance (or A Measure of Similarity) — across Different Variables (Properties)

We have a series of observations of different properties (such as heart rate or blood sugar level and others as well) across different days from different people from different geographical regions. ...
2
votes
1answer
228 views

What is the purpose of inverse distance?

In many econometric models, they use the inverse distance, instead of just distance. For example, if they are looking at the impact of distance to CBD on land values, they might use the inverse ...
0
votes
0answers
15 views

To what degree does Mahalanobis distance account for correlations of the data?

I understand that Mahalanobis distance is used when your data are correlated (e.g., as with many environmental variables), but just how correlated can the variables be? Should I be screening and ...
3
votes
0answers
18 views

Distance and Clustering of subset

So, I have 3 category, A (6 samples),B (3 samples), and C(7 samples). I have another data X(7 samples) which I want to measure the distance with A,B, or C. A,B,C,and X are close to 20.000 features. ...
0
votes
1answer
23 views

Error when computing Cosine Similarity

I'm trying to compute the cosine similarity of the following vector: 1 1 0 1 2 0 1 1 $ \frac {1*2+1*0+0*1+1*1}{ \sqrt(1^2+1^2+0^2+1^2)\sqrt(2^2+0^2+1^2+1^2)}$ ...
11
votes
3answers
178 views

Distribution of difference between two normal distributions

I have two probability density functions of normal distributions: $$f_1(x_1 \; | \; \mu_1, \sigma_1) = \frac{1}{\sigma_1\sqrt{2\pi} } \; e^{ -\frac{(x-\mu_1)^2}{2\sigma_1^2} }$$ and $$f_2(x_2 \; | ...
0
votes
0answers
6 views

Interpretation of Mantel r correlations

I am using mantel in R package Ecodist to perform a series of partial mantel tests. I am examining the correlation between a species composition (Bray-curtis ...
3
votes
1answer
51 views

Measuring spatial correlation using a distance-decay model

I asked a question on the GIS StackExchange site, regarding working spatial correlation/regression in QGIS, and how to implement this in software: Calculating spatial correlation between features from ...
1
vote
2answers
61 views

Multivariate time series Euclidean distance

I would like to know how to use Euclidean distance to find similarity between two multivariate time series. Suppose, I have two $N$-variate time series $u$ and $v$, with $u_i(t)$ denoting the $i$-th ...
0
votes
0answers
14 views

Distances to nearest neighbours of each classes

In the forum post summing up the winning solution for the Kaggle Otto product classification competition, they mention creating a feature which is the "Distances to nearest neighbours of each ...
0
votes
1answer
42 views

Real data example of Mahalanobis distance - proper data values given

Here is my real data example (these are real data check below pictures to see. I am comparing real documents (words represented as TF-IDF values). I equalize list sizes with missing words added as 0 ...
3
votes
0answers
18 views

Sampling vector so they will have a given euclidean distances matrix

Given a matrix $M\in\mathbb{R}^{P\times P}$ , is it possible to sample $P$ vectors $u_i\in\mathbb{R}^N$, $i=1..P$ so that $\|u_i-u_j\|=M_{ij}$. Obviously for not any $M$ this is possible, i.e. it has ...
0
votes
0answers
17 views

Calculate distances of a company branches from main branch in every state. How calculate distance for main branch in every state?

Suppose that I'm calculating distances of a company branches in every state from main branch of that state. After that I'm combining this feature with other features to creating a composite indicator ...
1
vote
0answers
16 views

Point configuration given distribution of distances

Does anybody know if there is a method/algorithm to find coordinates for $N$ points, given a probability density function from which the $N(N-1)/2$ different pairwise distances between them can be ...
0
votes
0answers
15 views

Multivariate DTW

I am not able to find any resources in case of DTW for multivariate signals. For example, I would like to find DTW similarity between two objects where each object contains following signals: ...
0
votes
0answers
32 views

How many chi-squared distance matrix does correspondence analysis make?

I am trying to understand step by step how correspondence analysis work. Suppose AxB (row x column) frequency matrix, roughly you should: 1) Calculate row and column profiles 2) Calculate ...
1
vote
0answers
15 views

Get level set from 3D dataset obtained exploring a 2D space parameter

I am exploring a 2 parameter space performing simulations. As a result I get a surface as a function of these 2 parameters. I know this is probably simple but I don't know how to look for it. Now I ...
0
votes
0answers
44 views

Does chi-square distance between two vectors (not histograms) have any meaning

I have used the chi-square distance with the KNN for a classification task and I get a good results. My feature vectors each have size 10000. The feature vectors are not histograms. I know that ...
0
votes
0answers
20 views

Check independence using the relative distance test for generating random numbers

I generated $500000$ random numbers of uniform distribution $[0,1]$ with $10$ Intervals, and I obtained the table as below. I compute chi-squared test is 3.037 with acceptable with the probability of ...
0
votes
2answers
27 views

Which clustering or distance metric is appropriate?

I need some help finding the correct direction to go in. Here is the problem: I have a dataset of unique devices, and each device has a count of the number of service tickets opened in each of 4 ...
0
votes
2answers
26 views

Cluster users based on file access and application usage

I have access to file access data for employees in my organisation. For each employee I can see what read/write operations they carried out in the last month or so. Per operation, I see a user ID, ...
1
vote
1answer
63 views

Which algorithm suits this type of outlier detection?

Suppose I have gathered the time a certain user takes to input a four digit PIN from his previous logins as follows : User A : (10,12,11,13,19.1,12.4,12,16) Now, ...
0
votes
0answers
18 views

Spearman's Rank or Pearson's Correlation Coefficient? [duplicate]

I would like to test to see whether there is a significant correlation between the percentage of children in census output areas and the mean distance to green spaces. I'm confused as to whether it is ...
3
votes
1answer
32 views

Hellinger distance bounds

The squared Hellinger distance is, for two densities $f(x)$ and $g(x)$, $$HD^2(f,g)=\frac{1}{2}\int \left[\sqrt{f(x)}-\sqrt{g(x)}\right]^2dx$$ Using that $\int f(x)dx=\int g(x)dx=1$, we may write ...
0
votes
0answers
48 views

Quantifying symmetry across the diagonal in asymmetric dissimilarity matrix

I've got a dissimilarity matrix constructed from pairwise similarity ratings. These similarity ratings are often asymmetrical (i.e., matrix[i,j] != matrix[j,i]), and the differences between the ij and ...
0
votes
0answers
17 views

How do I determine whether two random vectors with known dispersion matrices might actually be the same vector?

I might be asking this question in a stupid way. Essentially, I have two random vectors with known dispersion matrices, and I want some test to determine how likely it is that they are the same ...
5
votes
1answer
51 views

What is the purpose of row normalization

I understand the reasoning behind column normalization, as it causes features to be weighted equally, even if they are not measured on the same scale - however, often in the nearest neighbour ...
-2
votes
1answer
81 views

dtw(distance.only = TRUE, …) : No warping path exists that is allowed by costraints [closed]

Using the UCR time-series database and modification in this code: ...
1
vote
0answers
33 views

Measure of similarity between two multivariate samples

I have two samples from a multivariate distribution. One is approximate and the other is exact. My aim is to measure the similarity between the approximate sample and the exact sample. In particular, ...
0
votes
1answer
35 views

Normalised distance measure to compare distributions

Network generation parameters are to be optimised to produce spatial networks that match a given degree distribution (discrete: negative binomial) and a given continuous distance distribution ...
0
votes
0answers
11 views

Expectation maximization from distances

I want to infer location from noisy distance measurements from a sensor network. I've been doing initial simulations and trying to use EM to help. I have: A list of distance measurements to each ...
0
votes
2answers
71 views

Convert categorical data to numerical data to compute a distance then

I want to calculate euclidean distances for a dataset I have. However, there are two attributes which are not numbers. One attribute is country(10 different countries), the other one is race(3 races). ...