Questions tagged [euclidean-distance]

the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula.

In mathematics, the Euclidean distance or Euclidean metric is the "ordinary" distance between two points that one would measure with a ruler, and is given by the Pythagorean formula. By using this formula as distance, Euclidean space (or even any inner product space) becomes a metric space. The associated norm is called the Euclidean norm.

http://en.wikipedia.org/wiki/Euclidean_distance

941 questions
0
votes
1 answer

Euclidean Distance of two vectors with different length

I have a code for calculating euclidean distance like this : for(int j=0;j
Idham Choudry
  • 589
  • 10
  • 31
0
votes
1 answer

Different results for linalg.norm in numpy

I am trying to create a feature matrix based on certain features and then finding distance b/w the items. For testing purpose I am using only 2 points right now. data : list of items I have specs : feature dict of the items (I am using their values…
0
votes
1 answer

3D euclidean distance to identify unknown samples

I have this dataframe called mydf where I have three principal covariates (PCA.1,PCA.2, PCA.3). I want to get the 3d distance matrix and get the shortest euclidean distance between all the compared Samples. In another dataframe called myref, I have…
MAPK
  • 5,635
  • 4
  • 37
  • 88
0
votes
1 answer

R vegan simper analysis: modify distance matrix

I am using a simper analysis from the Vegan package in order to determine which amino acid are responsible for the variation in protein composition between different samples. As I understood from this discussion, The simper() function uses…
Drosof
  • 191
  • 4
  • 16
0
votes
1 answer

Measuring the distance between points and groups

I am trying to measure the distance between points inside a pandas dataframe. I first and looking to measure the distance between points that are in a sub region and get the average distance for that group. Then I want to measure the distance…
rontho1992
  • 116
  • 1
  • 11
0
votes
1 answer

Geodesic Distance Transform and segmentation operations in Matlab

I am interested in using the geodesic distance transform in Matlab (2015a) to obtain segmented regions of a picture, from which I can perform operations on a particular region. I have incorporated the code outlined from here…
0
votes
1 answer

Euclidean Distance between 2 Vectors Implementation

I working through a few exercises from an academic programing book. The task is to implement 2 vectors and calculate the Euclidean distance between thereof. No this is not Home Work, rather self studying. I'm seeking some feedback on the…
dcrearer
  • 1,972
  • 4
  • 24
  • 48
0
votes
1 answer

Formula for calculating Euclidian direction in Excel

I am calculating Euclidian distance between points in an Excel application, and also need to be able to specify the direction of the difference in two-dimensional location for each pair of points. Does anyone know how to implement this in…
Proposition Joe
  • 481
  • 4
  • 8
  • 22
0
votes
0 answers

Alternative way than euclidean distance to compute likelihoods

I am currently having a part of code using euclidean distance to compute some likelihoods. I am trying to think of any ways to compute likelihoods with the same effectiveness, without using euclidean distance. Is there anyone who could give me…
userG
  • 49
  • 1
  • 8
0
votes
1 answer

Python: My while loop keeps appending the first color in the list

My while loop does not execute through correctly. It will go through and increment i how it is supposed to, but it does not increment i outside of the loop. This means it keeps appending the same rgb pixel color pairs ~4000 times. Any…
Wakedude
  • 53
  • 2
  • 11
0
votes
1 answer

calculating the euclidean dist between each row of a dataframe with all other rows in another dataframe, but out put should be which row

I have similar situation as this one: calculating the euclidean dist between each row of a dataframe with all other rows in another dataframe So, I have two dataframes, x and y. I want to calculate euclidean dist between each row of x and each row…
Jean
  • 3
  • 1
0
votes
2 answers

Python: Calculate distance between two data points in Dictionary

I have many data points in a dictionary list that is saved as: {'Canada': ['10.625', '80.743'], 'Sao Tome and Principe': ['32.399', '63.935']} I need to calculate the Euclidean distance between them by using the two numbers in each data point by…
Lee Venter
  • 53
  • 1
  • 3
  • 12
0
votes
1 answer

What does EuclideanHash in Location Sensitive Hash mean?

I find that Location Sensitive Hash support EuclideanHash CosineHash and some other hash according to the repository in github: lsh families. Anyway, CosineHash is easy to understand: double result = vector.dot(randomProjection); return result > 0 ?…
roger
  • 9,063
  • 20
  • 72
  • 119
0
votes
1 answer

How to calculate a distance between two cities using cartography?

I have latitude and longitude of two cities. Is there any free option to calculate the travel distance between these cities using cartography? At the moment, I implemented the Haversine formula for computing the great-circle distance. Then I…
Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217
0
votes
0 answers

Calculate the maximum euclidean distance from a MST (minimal spanning tree)

Task: I am working in Matlab and I have to construct a dendrogram from maximum values of a matrix of Euclidean distance. What have I done so far: I have constructed the distance matrix based on the correlation coefficients of returns of prices…
Maria P.
  • 1
  • 2