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
-1
votes
2 answers

How to pass an Array as a parameter to a Function/Bifunction?

I need to pass an array as parameter into a BiFunction. Use case : Calculate the Euclidean Distance of 2 coordinates given in an array. coordinate1 and coordinate2 are an array. The below trial, makes the intent clearer. BiFunction
Nilotpal
  • 3,237
  • 4
  • 34
  • 56
-1
votes
1 answer

Calculating Euclidean Distance

I have the code below to calculate Euclidean Distance. however, my function does basically nothing. It gives no output and not even an error, it just runs and finishes. lst_a=[1,2,3,4,5] lst_b=[1,2,4,5,8] def distance(lst_a, lst_b): sum_of = 0 …
Python_bug
  • 25
  • 6
-1
votes
1 answer

How can I migrate from "float" to "points" in MySQL?

I'm looking for a faster way to calculate Euclidean distances in SQL. Problem I want to solve The following "Euclidean distance calculation" is slow. SELECT id, sqrt( power(f1 - (-0.09077361), 2) + power(f2 - (0.10373443), 2) + …
zono
  • 8,366
  • 21
  • 75
  • 113
-1
votes
2 answers

Creating a distance matrix from a matrix/list

I have created a list from the input and from the list I have created a matrix also. list- ('A', 'B', 3) ('A', 'D', 4) ('B', 'D', 4) ('B', 'H', 5) ('C', 'L', 2) ('D', 'F', 1) ('F', 'H', 3) ('G', 'H', 2) ('G', 'Y', 2) ('I', 'J', 6) ('I', 'K',…
-1
votes
1 answer

find maximum distance between a series of coordinates of different individuals to a single point

I have a series of tracking data in the form of coordinates from individuals leaving and returning to the same place (ie. all of them leaving from the same coordinates) and would like to find the maximum Euclidean distance reached from the starting…
-1
votes
2 answers

How to loop distance calculations for multiple instances using dplyr in r

I have positional data, an example of which is shown below, where time is the time each position was recorded, ref is the reference of each point, x is the x coordinate for each point and y is the y coordinate for each point. > print(df) time…
Stavrum
  • 51
  • 1
  • 7
-1
votes
1 answer

TypeError: family() missing 1 required positional argument: 'rebw'

Getting is error how can I fix it? Please help here is the complete Error which is showing me in Terminal: Traceback (most recent call last): File "Family-tracking-system.py", line 843, in search …
-1
votes
2 answers

Pairwise distance of points in one dimension

Is it possible to calculate the pairwise distance of a set of points in one dimension (all points are in a line) faster than O(n^2)?
Mateo
  • 83
  • 5
-1
votes
2 answers

Why tsne method use Euclidean distance to compute the similarities in high dimensional data?

I have tried other distance metrics like chebychev distance or Manhatten distance and so on, which are all implemented in tsne in Matlab. Some of them achieve the same good performance as Euclidean distance metric. So I have some questions about…
-1
votes
1 answer

Python - Euclidean Distance between a line and a point in Numpy

I would like to calculate the Euclidean Distance between a line and a point. My line is represented by a numpy matrix as follow: import pylab as pl import numpy as np pl.xlim(-1, 8) pl.ylim(-1, 8) pl.xlabel('X') pl.ylabel('Y') xx = np.array([-1. …
Jan
  • 747
  • 1
  • 10
  • 29
-1
votes
1 answer

r match rows that that are similar

I am dealing with few observations like this below. My goal is to identify rows that match/similar to each other based on a Euclidean distance concept, considering vector {x1,x2,x3,x4} and threshold 0.2. Any distance between rows that are less…
Emily Fassbender
  • 413
  • 5
  • 15
-1
votes
1 answer

Euclidean distance divided by square root of number of arrays?

I have come to learn that if I want to overally compare two vectors in my research, the best way is to use Euclidean distance divided by square root of number of arrays. However I don’t know what this equation is called. I will appreciate it if you…
Ryan
  • 1
  • 1
-1
votes
1 answer

To check Euclidean distance from center to map region in two regions

I have an 450x450 gray image. The neighbourhood of each pixel to be processed is defined by the Euclidean distance based on two radii, R1 and R2. Hence: All pixels in the neighbourhood of R1 and R2 should be summed respectively. Each pixel mapped…
-1
votes
1 answer

Distance between two Points in pandas csv Data-frame

I want to calculate the distance between two coordinates points(Lat1,long1, and Lat2,Long2) for the below data frame. `name_x rnc_x lat1 long1 scrambling_code name_y rnc_y lat2 long2 UI11481 MURNC09 72.82584 19.01234 121 UI11481…
DHANANJAY CHAUBEY
  • 107
  • 1
  • 2
  • 10
-1
votes
1 answer

How to find all point around center point in 2D

I have center point x: 0 and y: 0. How to get all points distance Up to 5? My code is not perfect: function getPoints(startX, startY, distance) { var res = [] for (var i = 1; i < distance; i++) { res.push({ x: startX + i, y: startY…
chosirai
  • 193
  • 3
  • 7