nearest-neighbor Questions
2
Solved
I have two sets of integers A and B (size of A less than or equal to B), and I want to answer the question, "How close is A to B?". The way I want to answer this question is by producing a measure ...
Mudstone asked 12/10, 2011 at 15:50
1
Solved
I've got a series of modelled class labels from the knn function. I've got a data frame with basic numeric training data, and another data frame for test data. How would I go about drawing a decisi...
Armillda asked 2/10, 2016 at 22:44
5
Solved
Let this coordinates class with the Euclidean distance,
case class coord(x: Double, y: Double) {
def dist(c: coord) = Math.sqrt( Math.pow(x-c.x, 2) + Math.pow(y-c.y, 2) )
}
and let a grid of c...
Bowerbird asked 6/9, 2014 at 5:9
1
Solved
Edit 2: Please take a look at this crosspost for TLDR.
Edit: Given that the particles are segmented into grid cells (say 16^3 grid), is it a better idea to let run one work-group for each grid cel...
Erastatus asked 28/7, 2016 at 20:27
4
Solved
I have two large sparse matrices:
In [3]: trainX
Out[3]:
<6034195x755258 sparse matrix of type '<type 'numpy.float64'>'
with 286674296 stored elements in Compressed Sparse Row format>...
Tusche asked 2/12, 2013 at 16:31
2
Solved
Lets say we have a 3d array:
my.array <- array(1:27, dim=c(3,3,3))
I would like to create a list of the n first neighbors.
Example: Lets get my.array[2,2,2]=14, so the first neighbors of 14 ...
Salicylate asked 21/6, 2016 at 3:58
1
Solved
Citing the E2LSH manual (it's not important that's about this specific library, this quote should be true for NN problem in general):
E 2LSH can be also used to solve the nearest neighbor proble...
Ignatzia asked 8/6, 2016 at 12:57
1
Solved
I have two pandas dataframes I want to join/merge exactly on a number of columns (say 3) and approximately, i.e nearest neighbour, on one (date) column. I also want to return the difference (days) ...
Shimmery asked 31/5, 2016 at 11:37
1
Solved
I read some paper about LSH and I know that is used for solving the approximated k-NN problem. We can divide the algorithm in two parts:
Given a vector in D dimensions (where D is big) of any val...
Wellthoughtof asked 24/5, 2016 at 8:55
1
Solved
I have a series of discrete point on a plane, However, their order is scattered. Here is an instance:
To connect them with a smooth curve, I wrote a findSmoothBoundary() to achieve the smooth boun...
Tropho asked 24/5, 2016 at 3:24
1
I already have the algorithm to produce locality-sensitive hashes, but how should I bucket them to take advantage of their characteristics(i.e. similar elements have near hashes(with the hamming di...
Rapprochement asked 30/6, 2011 at 19:54
1
Solved
I'm trying to understand the section 5. of this paper about LSH, in particular how to bucket the generated hashes. Quoting the linked paper:
Given bit vectors consisting of d bits each, we choos...
Elrod asked 22/5, 2016 at 16:52
3
Solved
I want to do some basic geocoding of addresses using Postgres. I have an address table that has around 1 million raw address strings:
=> \d addresses
Table "public.addresses"
Column | Type | ...
Francophile asked 17/5, 2016 at 4:25
2
Solved
Consider array of points in 2D,3D,(4D...) space ( e.g. nodes of unstructured mesh ). Initially the index of a point in array is not related to its position in space. In simple case, assume I alread...
Overwrought asked 17/5, 2016 at 8:52
1
Solved
Lists are not hashable. However, I am implementing LSH and I am seeking for a hash function that will correspond a list of positive integers (in [1, 29.000]) to k buckets. The number of lists is D,...
Intoxication asked 9/5, 2016 at 21:11
1
Solved
Matrix M is the signatures matrix, which is produced via Minhashing of the actual data, has documents as columns and words as rows. So a column represents a document.
Now it says that every stri...
Onder asked 7/5, 2016 at 14:54
2
Solved
On the wikipedia entry for k-d trees, an algorithm is presented for doing a nearest neighbor search on a k-d tree. What I don't understand is the explanation of step 3.2. How do you know there isn'...
Iceni asked 26/10, 2009 at 20:58
1
Solved
Can anyone tell me what's the problem with my code?
Why I can predict probability of iris dataset by using LinearRegression but, KNeighborsClassifier gives me 0 or 1 while it should give me a resul...
Cassandracassandre asked 7/5, 2016 at 13:30
1
I'm working with a travelling salesman problem using the TSP package in R, but trying to achieve a predetermined start and end point.
The package apparently allows setting the start point of the j...
Phalansterian asked 18/3, 2016 at 14:2
2
Solved
I have hundreds of thousands of sparse bit strings of length 32 bits.
I'd like to do a nearest neighbour search on them and look-up performance is critical. I've been reading up on various algori...
Mima asked 31/3, 2012 at 21:13
4
Solved
G'day
I'm trying to program a smart way to find the closest grid points to the points along a contour.
The grid is a 2-dimensional grid, stored in x and y (which contain the x and y kilometre pos...
Untouchability asked 27/11, 2012 at 6:5
3
Solved
I would like to retrieve all points within a given range of another set of points. Let's say, find all shops within 500m of any subway station.
I wrote this query, which is quite slow, and would l...
Ferryman asked 14/1, 2016 at 9:52
2
Solved
Interpolate unstructured X,Y,Z data on best grid based on nearest neighbour distance for each points
This question was edited after answers for show final solution I used
I have unstructured 2D datasets coming from different sources, like by example:
Theses datasets are 3 numpy.ndarray (X, Y co...
Typesetter asked 15/1, 2016 at 13:39
1
I have a custom distance metric that I need to use for KNN, K Nearest Neighbors.
I tried following this, but I cannot get it to work for some reason.
I would assume that the distance metric is ...
Selenodont asked 22/12, 2015 at 3:31
1
I have a large list of x and y coordinates, stored in an numpy array.
Coordinates = [[ 60037633 289492298]
[ 60782468 289401668]
[ 60057234 289419794]]
...
...
What I want is to find all near...
Homans asked 6/9, 2015 at 14:27
© 2022 - 2024 — McMap. All rights reserved.