Questions tagged [euclidean]

Euclidean distance is the intuitive notion of a 'straight-line' distance between two points in a Euclidean space.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 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 ...
user avatar
1 vote
1 answer
27 views

Intuitive explanation of Ward's method

I got this explanation of the Ward's method of hierarchical clustering from Malhotra et. al (2017), and I don't really get what it means: Ward’s procedure is a variance method which attempts to ...
user avatar
1 vote
0 answers
22 views

Similarity between datasets A and B where B is a subset of A

I have two datasets A and B, and for each entry in both datasets I have a mixture of ordered and unordered categorical variables such as gender, age (integral value) and date. It is believed that ...
user avatar
1 vote
0 answers
44 views

What are the moments of the Beckmann distribution?

Let $U=(u_1, u_2)$ and $V=(v_1, v_2)$ be two randomly distributed points on the Euclidean plane assuming bivariate normal distributions $U \sim N(\mu_u, \Sigma_u)$ and $V \sim N(\mu_v, \Sigma_v)$ with ...
user avatar
  • 11
2 votes
0 answers
51 views

About the calculation of covariance matrix in mahalanobis distance: How $W^TW$ is equal to the covariance matrix? [closed]

I was reading about deep metric learning (from here) and came across the mahalanobis distance. I understood why we can not use euclidean distance if the distribution is not isotropic (the covariance ...
user avatar
  • 189
2 votes
1 answer
167 views

Cosine similarity seems to perform better with higher dimensions than Euclidean distance? Should this be the case?

I've generated 100 random vectors (data points) in n∈[1,...,50] dimensions. I then compared distances between each pair of vectors and calculated the mean value. I've done this for all dimensions ...
user avatar
2 votes
2 answers
166 views

How to define distance for vector of angles?

I have a vector of angles and I am looking for a method to compute the distance of my vector with any other vector of angles? I am looking for something similar to Euclidean distance but I know that ...
user avatar
  • 151
0 votes
0 answers
17 views

Measure for difference or similarity between two regions of the plane

Suppose I have a picture and let two people mark regions within it. How can I measure the (dis)similarity of the two marked regions? More mathematically, suppose I have a (filled) rectangle $A\subset \...
user avatar
  • 226
0 votes
0 answers
21 views

Is combination of squared Euclidean and normalized cosine distance follow Bregman-divergence?

I know that squared euclidean distance satisfy the property of Bregman-divergence. I wanted to do some experiments using combination of various distance metric. So I am curious to know if I add ...
user avatar
1 vote
0 answers
51 views

Euclidean Norm normalized Normal Distribution

Let $X$ be a multivariate normal $\mathcal{N}(\mu, \Sigma^2)$ and let $X$ be anistropic, that is I am considering $\Sigma$ to be a diagonal matrix but the elements on the diagonal might be different. ...
user avatar
  • 181
1 vote
1 answer
51 views

Applying Dynamic Time Warping (DTW) instead of Euclidean Distance for Clustering Synchronized Time series data

I am trying to cluster members based on hourly login data. As this is mostly synchronized, I first applied Euclidean and it failed to cluster them into groups with sensible patterns. I tried DTW ...
user avatar
  • 11
0 votes
0 answers
15 views

Significance test for comparing two mean Euclidean distances?

First time poster here, so please let me know if more details are needed! In short, I'm analyzing a dataset that has scores from 98 siblings from 64 families. So some families contributed only one ...
user avatar
  • 1
1 vote
0 answers
109 views

What is the effect of the limitations of Euclidean distances in high dimensions to multiple regression?

This is eye-opening, and the effect on KNN, for example, is easy to predict, but should the limitations of Euclidean distance in high dimension be a reason for concern in the very common application ...
user avatar
0 votes
1 answer
49 views

Is Euclidean distance the same as distance-from-correlation as $d(x, y) = \sqrt{2m[1 - r(x, y)]}$

I found in a couple of documents (e.g. this) that the Euclidean distance $d(x, y) = \sqrt{\sum_{i = 1}^{n}{(x_i - y_i)^2}}$ can be obtained from correlation coeffcient if $x$ and $y$ are standardised ...
user avatar
  • 3,110
0 votes
1 answer
15 views

How can I cluster plant biomass and grain weight for different plant varieties using Ward's method based clustering?

I have plant biomass and grain weight data for different plant varieties which I now need to cluster. Do I need to define the number of clusters if using Ward's method and Squared Euclidean distance ...
user avatar
1 vote
0 answers
59 views

How to find the average distance between randomly distributed points in a rectangle?

Assume there are n points randomly distributed in a rectangle (x being the height y being the width) shown below in the figure. I would like to calculate the average distance between 2 random red ...
user avatar
2 votes
1 answer
80 views

Non-Euclidean analogue to MSE loss

The most basic machine learning model called OLS uses the RSS (squared loss) or its average, mean squared error (MSE), for its loss function, which is aligned with Euclidean geometry. What is the ...
user avatar
  • 3,067
2 votes
1 answer
150 views

Probability of one point being closer to fixed $x \in \mathbf{R}^2$ than another

Let $x, x^{(0)}, x^{(1)} \in \mathbb{R}^2$, $r_1, r_2 \sim U[-1, 1]$. Point $x$ is fixed, $x = (0.32, 0)$, and $x^{(0)} = (0, r_1)$, $x^{(1)} = (1,r_2)$. What is the probability that the fixed point $...
user avatar
0 votes
1 answer
63 views

Generate Uniform Random Variates with Constant Norm [duplicate]

How can one generate $k$ uniform random variates centered at zero, $X_1, X_2, ..., X_k$, given a constant Euclidean norm, $c =\sqrt{X_1^2+X_2^2+...X_k^2}$?
user avatar
  • 33
2 votes
1 answer
153 views

Cosine similarity for Categorical datasets?

Can I use Cosine similarity measure for estimating similarity/relationship between D1 and D2 (two categorical datasets)
user avatar
  • 41
0 votes
0 answers
344 views

PCoA/MDS on sqrt transformed Bray-Curtis dissmilarity using cmdscale

I would like to use PCoA to visualize beta diversity of a large community. I chose Bray-Curtis as distance measure to calculate the dissimilarity matrix and would like to apply a square root ...
user avatar
  • 121
0 votes
0 answers
119 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, ...
user avatar
  • 31
7 votes
2 answers
437 views

Variance and asymptotic normality of $\frac{1}{n-1}\sum_{i=1}^{n-1}(x_{i+1}-x_i)^2$, where $X \sim \mathcal{N}(0,1)$

Consider a length $n$ vector $\mathbf{x}$ containing $n$ i.i.d. observations $\{x_i\}_{i=1}^n$ of a standard normal random variable $X$. Let $\mathbf{z}$ be a length $n-1$ vector whose entries are $...
user avatar
  • 556
2 votes
1 answer
236 views

Should we apply PCA before calculating similarities in high-dimensional space if my observations have length 1?

I have high-dimensional space (around 20 features) and I want to calculate similarity based on the angle of observation, not the magnitude. I have a nice function that can compute euclidean distance ...
user avatar
  • 185
0 votes
1 answer
222 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 ...
user avatar
0 votes
0 answers
29 views

Plotting Vector Embeddings

I am currently working on a project that requires some form of data on the paper. Even though I was able to get some coding done and communicate results, I need some graphs. What I want to do is ...
user avatar
0 votes
0 answers
49 views

Manhattan vs Euclidian Distance Measure [duplicate]

In which case we should pickup Manhattan distance and when we should use euclidian distance measure. To my understanding both are used for continues numeric data(not like cosine or others who works ...
user avatar
  • 153
1 vote
1 answer
79 views

How to find the list of nearest vectors if ony a vector is given?

I know there are many ways to compute similarity of two different non-zero vectors but is it possible to get a list of nearest vectors whose values are continous given a single continous vector. Lets ...
user avatar
  • 2,031
1 vote
2 answers
430 views

How Rapidminer handle same distance for KNN Algorithm

Actually I already asked in rapidminer forum, but no one has given an answer yet.. https://community.rapidminer.com/discussion/55963/how-k-nn-algorithms-work-with-same-distance-in-rapidminer#latest ...
user avatar
1 vote
0 answers
65 views

the accuracy of covariance between two high-dimensional vectors

Question Is the covariance between high-dimensional vectors less accruate than covariance between two vectors in low-dimensional vecotrs? I am asking this questio to check if there is a need for '...
user avatar
0 votes
0 answers
557 views

Difference between standardizing variables and using Mahalanobis distance

I am wondering how and/or why the Mahalanobis distance is different from using the Euclidean distance on standardized variables?
user avatar
  • 2,197
11 votes
1 answer
4k views

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

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-...
user avatar
  • 365
0 votes
2 answers
111 views

Clustering high dimensional data

I was going through this wiki page on clustering in high dimensions and I don't understand the following statement there. Can someone explain to me what this means? The concept of distance becomes ...
user avatar
3 votes
1 answer
2k 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, ...
user avatar
1 vote
1 answer
65 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 ...
user avatar
3 votes
0 answers
38 views

Is my variable considered okay to use in k-means clustering with Euclidean distance?

I was wondering if I can use regular kmeans() in R with my variable "number of drug prescriptions" which equals a number between 1-25. From what I've read k-means ...
user avatar
  • 173
1 vote
0 answers
236 views

Set similarity as weight to ratings

I have a problem deciding which similarity function to use. I want to find the similarity between the users based on their requirements about computer performance metrics normalized to 1. Each user ...
user avatar
3 votes
1 answer
237 views

What to do when results of hiearchical, k-means elbow, and k-means silhoutte disagree?

I am conducting a cluster analysis involving 60 subjects and 5 continuous variables. After appropriate scaling, I performed hierarchical clustering with Euclidean distance and complete linkage, and ...
user avatar
1 vote
0 answers
231 views

How to improve Pairwise Euclidean Distance for Similarity Measure

I am trying to identify the most similar stations between two DataFrames like below: ...
user avatar
  • 21
1 vote
0 answers
1k 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 ...
user avatar
3 votes
1 answer
2k 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 ...
user avatar
  • 89
0 votes
0 answers
610 views

Clustering: choosing correlation-based over euclidean distance (fviz_dist)

I'm trying to cluster some business data. You can imagine the data as describing customers (age, no. of purchases, satisfaction after the first purchase, etc.). I work with normalised data. I also ...
user avatar
3 votes
1 answer
956 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 ...
user avatar
  • 355
3 votes
1 answer
134 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 ...
user avatar
  • 479
0 votes
0 answers
510 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, ...
user avatar
0 votes
2 answers
997 views

How k-means computes cluster centroids differently for each distance metric?

K-means computes cluster centroids differently for each distance metric. I don't know why the way of computing the centroid is dependent of the distance measure. I don't know how we compute the ...
user avatar
  • 133
1 vote
1 answer
310 views

Similarity between 2 profiles (observations). Is it possible to generate a % similarity?

I have multiple profiles for 10 different people. Each person has been measured for 5 different continuous variables of different magnitudes. So my dataframe is 10x5 where each row represents a person ...
user avatar
  • 133
1 vote
1 answer
579 views

Does it make sense to cluster asymmetric binary data with Ward's method?

I'm working with 104x42 data set where all variables are (asymmetric) binary (0-1). I've read that Ward's linkage method doesn't work theoretically properly with binary data beaucause it requests ...
user avatar
  • 53
10 votes
1 answer
1k views

My neural network can't even learn Euclidean distance

So I'm trying to teach myself neural networks (for regression applications, not classifying pictures of cats). My first experiments were training a network to implement an FIR filter and a Discrete ...
user avatar
  • 547
0 votes
1 answer
256 views

What is the difference between these distances in self organized maps

I am building an anomaly model and am confused between these distances below. What is the difference between these distances in self organized maps. som.iris$distances dist(som.iris$codes[[1]]) As ...
user avatar
  • 157