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

Computing normalized Euclidean distance in R

The data frame I have is as follows: Binning_data[1:4,] person_id V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 1 312 74 80 NA 87 90.0 85 88 98 96.5 99 94 95 90 90 93 106 2 316 NA NA 116 106 105.0…
0
votes
1 answer

Weka Java API - Euclidean Distance: Normalized vs NonNormalized

i want to calculate the normalized euclidean distance between two vectors with length of 5. The simpler way with Apache Math and RealVector does not normalize the distance so I try to use Weka. I have followed java code: Attribute one = new…
frankenstein
  • 161
  • 1
  • 13
0
votes
1 answer

are numpy record/structure arrays restricted to containing numpy voids?

I have a complicated set of data that I have to do distance calculations on. Each record in the data set contains many different data types so a record array or structured array appears to be the way to go. The problem is when I have to do my…
b10hazard
  • 7,399
  • 11
  • 40
  • 53
0
votes
2 answers

R: Euclidian distances between objects in a group

I want to create a matrix with similarities based on two identifiers, consider following matrix: x1 <- c(2,2,2,3,1,2,4,6,4) y1 <- c(5,4,3,3,4,2,1,6,3) x2 <- c(8,2,7,3,1,2,2,2,6) y2 <- c(1,3,3,3,1,2,4,3,8) x3 <- c(4,4,1,2,4,6,3,2,9) y3 <-…
tobias sch
  • 369
  • 2
  • 15
0
votes
1 answer

Calculate chi-squared distance between two image histograms in Java

I have calculated the histograms of two images in Java (Code modified and shortened): for (int posX = 0; posX < image.getWidth(); posX++) { for (int posY = 0; posY < image.getHeight(); posY++) { Color c1 = new…
0
votes
1 answer

Calculating the distance between two squares on a grid - Java

I am creating a game in Java and have a grid of squares that make up the playable area. The player has certain targets and I need to work out how far away the player is from those targets using the x an y coordinate values of the squares. So if the…
user3407039
  • 1,285
  • 5
  • 25
  • 51
0
votes
1 answer

Is it possible to calculate Euclidean Distance between two varying length matrices?

I have started working on online signature data-set for verification purpose. I have two matrices containing digitized data of two signatures of varying length (the number of rows differ). e.g. one is 177×7 and second is 170×7. I want to treat each…
0
votes
2 answers

Matlab - Euclidian distance between two matrix

I have declared 2 matrixes like this: a = [ 1 2; 11 12]; [m, n] = size(a); b = a(2,:); dist( b , a ); % the first column is not interesting This works, I get a vector [ 10.0499 9.0000 ] However if I want to add a column or a line to my…
kaligne
  • 3,098
  • 9
  • 34
  • 60
0
votes
2 answers

Running the same function multiple times and saving results with different names in workspace

So, I built a function called sort.song. My goal with this function is to randomly sample the rows of a data.frame (DATA) and then filter it out (DATA.NEW) to analyse it. I want to do it multiple times (let's say 10 times). By the end, I want that…
Mohr
  • 323
  • 1
  • 3
  • 9
0
votes
1 answer

whether i have to choose classification or clustering for my project?

I just detected faces using Viola-jones algorithm. I cropped faces from frames(or video)and I made it as training set.In my video there are 5 different faces. I decided to use eigenfaces for face recognition.I ended with finding eucledian distance…
0
votes
2 answers

How can I get Euclidean distance matrix from adjacency matrix if the distance between neighbours is fixed to one

I have adjacency matrix,I don't know the location of the points only I know the adjacency matrix and distance between neighbors are equal. so how I get the distance between points??: is there any algorithm do that
0
votes
1 answer

why 'module' object is not callable in python opencv?

I have two modules, and I'm importing 1 elements/objects from each module(program), and i am assigning it to some other variables, but still i am getting this error. my code is: from CBIR import feature_matrix_db from experiment import…
varsha_holla
  • 852
  • 7
  • 23
  • 41
0
votes
2 answers

Calculate Euclidian Distance in two numpy arrays

I have two numpy arrays as following. X = np.array([-0.34095692,-0.34044722,-0.27155318,-0.21320583,-0.44657865,-0.19587836, -0.29414279, -0.3948753 ,-0.21655774 , -0.34857087]) Y = np.array([0.16305762,0.38554548, 0.10412536, -0.57981103,…
Nilani Algiriyage
  • 32,876
  • 32
  • 87
  • 121
0
votes
2 answers

Calculating the geographic and euclidean distances for TSP in Java

Basically I'm using data from TSPLIB and I have this spec . This is how I calculated the Euclidean distance (according to the above spec): public static double calculateDistance(double x1, double y1, double x2, double y2){ double xDistance =…
MTA
  • 739
  • 2
  • 9
  • 29
0
votes
1 answer

Finding minimum euclidean distance of two 3d vectors

Ok so I've got two large 3D binary arrays. I want to calculate the minimum distance between the surface points of these two structures to get an output of the distances between the perimeter voxels of the objects displayed in the array data. I know…
user3168953
  • 153
  • 2
  • 10