euclidean-distance Questions
7
Solved
I have set of line segments (not lines), (A1, B1), (A2, B2), (A3, B3), where A,B are ending points of the line segment. Each A and B has (x,y) coordinates.
QUESTION:
I need to know the shortest d...
Vyatka asked 27/11, 2014 at 1:7
6
Solved
I have a set of points in 2-dimensional space and need to calculate the distance from each point to each other point.
I have a relatively small number of points, maybe at most 100. But since I ne...
Vannesavanness asked 28/3, 2014 at 18:47
2
Problem
Given are n=10000 points and m=1000 line segments in a plane. The task is to determine the closest segment to each point. A fast solution in Python is preferred.
Specifications
Line segment...
Gurgle asked 4/2, 2024 at 22:37
3
Solved
I am wondering if there is a way to get cosine distance of two vectors in postgres.
For storing vectors I am using CUBE data type.
Below is my table definition:
test=# \d vectors
Table "publi...
Multifarious asked 29/6, 2019 at 10:33
3
Solved
What's an easy way to find the Euclidean distance between two n-dimensional vectors in Julia?
Zina asked 18/9, 2014 at 0:14
26
Solved
I have two points in 3D space:
a = (ax, ay, az)
b = (bx, by, bz)
I want to calculate the distance between them:
dist = sqrt((ax-bx)^2 + (ay-by)^2 + (az-bz)^2)
How do I do this with NumPy? I have:...
Merrill asked 9/9, 2009 at 19:48
3
Solved
Let's say I have two 4-dimensional vectors (i.e. a and b) as follows:
a = {a1, a2, a3, a4}
b= {b1, b2, b3, b4}
How do I compute the Euclidean distance between these vectors?
Ahwaz asked 29/4, 2014 at 1:30
4
Solved
Given 1 Billion records containing following information:
ID x1 x2 x3 ... x100
1 0.1 0.12 1.3 ... -2.00
2 -1 1.2 2 ... 3
...
For each ID above, I want to find the top 10 closest IDs, based o...
Gabler asked 3/5, 2016 at 18:46
4
Solved
I am currently using SciPy to calculate the euclidean distance
dis = scipy.spatial.distance.euclidean(A,B)
where; A, B are 5-dimension bit vectors. It works fine now, but if I add weights for ea...
Lucylud asked 14/1, 2012 at 7:38
9
Solved
I have two arrays of x-y coordinates, and I would like to find the minimum Euclidean distance between each point in one array with all the points in the other array. The arrays are not necessarily ...
Sike asked 9/12, 2009 at 4:11
4
Solved
First of all, this is NOT the problem of calculating Euclidean distance between two matrices.
Assuming I have two matrices x and y, e.g.,
set.seed(1)
x <- matrix(rnorm(15), ncol=5)
y <- mat...
Vowell asked 10/1, 2020 at 9:41
2
Solved
I have a csv file with a list of co-ordinate positions for over 2000 farms, with the following structure;
FarmID | Latidue | Longitude |
------ |---------|-----------|
1 | y1 | x1 |
2 | y2 | x...
Talkie asked 11/5, 2017 at 2:18
7
Solved
I want to calculate the Euclidean distance in multiple dimensions (24 dimensions) between 2 arrays. I'm using numpy-Scipy.
Here is my code:
import numpy,scipy;
A=numpy.array([116.629, 7192.6, 4...
Werra asked 23/2, 2012 at 14:13
5
Solved
I'm trying to do it by myself the assignments from Stanford CS231n 2017 CNN course.
I'm trying to compute L2 distance using only matrix multiplication and sum broadcasting with Numpy. L2 distance i...
Fontaine asked 22/11, 2020 at 8:24
1
Hi.
I've been gathering info from various sources consistently over the past month, yet without any luck of finding an idea that would suit my particular issue. So here's the formulation of the ...
Hairsplitting asked 25/9, 2019 at 14:28
2
Solved
Assume the following distance matrix in python...
0 1 2 3
0 0 1 4 8
1 1 0 3 7
2 4 3 0 3
3 8 7 3 0
I would like to convert this distance matrix to a list of pairwise euclidean distances, as ...
Hydrogenous asked 10/3, 2021 at 21:52
3
Solved
Any option to extract the distance between the nodes and the centroid in a kmeans cluster.
I have done Kmeans clustering over an text embedding data set and I want to know which are the nodes that...
Lactation asked 17/1, 2019 at 16:21
2
Solved
How can I calculate the Euclidean distance between all the rows of a dataframe? I am trying this code, but it is not working:
zero_data = data
distance = lambda column1, column2: pd.np.linalg.norm...
Anabasis asked 7/3, 2020 at 6:4
6
I need to calculate euclidean distance between two points in the fastest way possible.
In C.
My code is this and seems a little bit slow:
float distance(int py, int px, int jy, int jx){
return s...
Sappington asked 21/8, 2015 at 22:17
5
Solved
It seems like the answer to this should be simple, but I am stumped. I have a matrix of Nx3 matrix where there 1st 2nd and 3rd columns are the X Y and Z coordinates of the nth item. I want to calcu...
Cityscape asked 17/3, 2011 at 16:56
3
Solved
I want to calculate the euclidean distance between two vectors (or two Matrx rows, doesn't matter). Is there a good function for that in OpenCV?
Bregenz asked 16/4, 2014 at 9:48
3
Сan anyone shine a light to my matlab program?
I have data from two sensors and i'm doing a kNN classification for each of them separately.
In both cases training set looks like a set of vectors of...
Judiciary asked 4/5, 2014 at 18:4
1
Solved
I'm looking for a function to compute the euclidian distance between a numpy array of points with two coordinates (x, y) and a line segment. My goal is to have a result in under 0.01 sec for a line...
Wilford asked 30/1, 2019 at 13:48
1
Solved
I'm looking for an algorithm or data structure to solve the following problem:
You are given a set of points S.
And you are given Q queries in form of another point.
For every query, find the farth...
Nevers asked 11/1, 2019 at 20:30
4
Solved
I have corpora of classified text. From these I create vectors. Each vector corresponds to one document. Vector components are word weights in this document computed as TFIDF values. Next I build a...
Manhattan asked 16/10, 2013 at 17:48
1 Next >
© 2022 - 2025 — McMap. All rights reserved.