nearest-neighbor Questions

7

Solved

Need some help here. I'm a UI designer who isn't good at numbers doing an experimental web form design and I need to know which input element is closest to a clicked point on a web page. I know how...
Iodine asked 6/9, 2011 at 15:38

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...

8

Solved

I have a numpy array like this: x = np.array([[1,2,3],[4,5,6],[7,8,9]]) I need to create a function let's call it "neighbors" with the following input parameter: x: a numpy 2d array (i,j): th...
Caravette asked 12/6, 2012 at 12:34

3

I am using the scikit-learn KNeighborsClassifier for classification on a dataset with 4 output classes. The following is the code that I am using: knn = neighbors.KNeighborsClassifier(n_neighbors=...
Rodgerrodgers asked 22/3, 2018 at 3:47

4

Solved

The following pseudo-code is from the first chapter of an online preview version of The Algorithm Design Manual (page 7 from this PDF). The example is of a flawed algorithm, but I still really wan...
Atalanti asked 27/8, 2011 at 19:14

1

Solved

I have many users and each user has an associated vector. I would like to compute the cosine similarity between each user. This is prohibitive based on the size. It seems LSH is a good approximatio...
Turbo asked 10/6, 2022 at 20:56

3

I have been searching for an implementation of the ICP algorithm in python lately with no result. According to wikipedia article http://en.wikipedia.org/wiki/Iterative_closest_point, the algorithm...
Calculus asked 21/11, 2013 at 11:56

2

Solved

I have a 2 dimensional array: MyArray = array([6588252.24, 1933573.3, 212.79, 0, 0], [6588253.79, 1933602.89, 212.66, 0, 0], etc...) The first two elements MyArray[0] and MyArray[1] are the X ...
Arbalest asked 16/10, 2012 at 21:20

4

Solved

I have two data.tables. They contain x & y coordinates for some points. They are as following:- set.seed(123) a <- data.table(x = runif(10), y = runif(10)) a x y 1: 0.9036218 0.005233401...
Brandonbrandt asked 21/3, 2022 at 9:23

5

Solved

I have a numpy array, filtered__rows, comprised of LAS data [x, y, z, intensity, classification]. I have created a cKDTree of points and have found nearest neighbors, query_ball_point, which is a l...
Rodas asked 6/11, 2013 at 19:50

3

Solved

I'm trying to do a k nearest neighbors prediction on some text recognition data I found on the UCI Machine Learning Database. (https://archive.ics.uci.edu/ml/datasets/Letter+Recognition) I cross v...

3

Solved

I need to have an image render with nearest-neighbor resizing and not the bicubic way that is currently used. I currently use the following: ms-interpolation-mode: nearest-neighbor; image-renderin...
Juliusjullundur asked 23/3, 2011 at 10:39

3

I have a set of latitude and longitude for various locations and also know the latitude and longitude of my current location. I have to find out the nearest places from current location. Which al...
Woodenware asked 18/3, 2017 at 11:4

1

Solved

Problem statement: I have 150k points in a 3D space with their coordinates stored in a matrix with dimension [150k, 3] in mm. I want to find all the neighbors of a given point p that are within a r...
Callie asked 25/11, 2020 at 11:34

15

Solved

I have asked a question a few days back on how to find the nearest neighbors for a given vector. My vector is now 21 dimensions and before I proceed further, because I am not from the domain of Mac...

4

Solved

To a list of N points [(x_1,y_1), (x_2,y_2), ... ] I am trying to find the nearest neighbours to each point based on distance. My dataset is too large to use a brute force approach so a KDtree seem...
Teriann asked 6/1, 2018 at 11:16

3

Solved

This question concerns the implementation of KNN searching of KDTrees. Traversal of a KDTree to find a single best match (nearest neighbor) is straightforward, akin to a modified binary search. Ho...
Saenz asked 9/1, 2016 at 2:11

1

I'm working with latitude and longitude data. I've used BallTree because I have many rows (32000 rows) in the dataset. If I built the tree with haversine distance: model_BTree = BallTree(np.array(p...
Storz asked 27/7, 2020 at 18:20

4

There are lots of works for the nearest neighbor search problem, so I wonder if I want to do fixed radius range search, could I utilize those algorithms for nearest neighbor search? perhaps I cou...
Boatload asked 23/4, 2015 at 3:30

3

Solved

Input: point = (lat, long) places = [(lat1, long1), (lat2, long2), ..., (latN, longN)] count = L Output: neighbors = subset of places close to the point. (len(neighbors)=L) Question: Can I use ...
Illegitimacy asked 19/5, 2016 at 13:14

1

Solved

I have a large set of 2-dimensional points and want to be able to rapidly query the set for the k-Nearest-Neighbours of any point in the 2-d space. Since it's low-dimensional, a KD-Tree seems like ...
Abba asked 25/5, 2015 at 23:40

3

Is there a database that supports fast approximate nearest neighbor queries in high-dimensional vector spaces? I'm looking for a database that would fit the following use case: Works for m...
Nunatak asked 15/9, 2013 at 22:13

13

Solved

I can use the median of medians selection algorithm to find the median in O(n). Also, I know that after the algorithm is done, all the elements to the left of the median are less that the median an...
Impracticable asked 13/10, 2009 at 0:36

1

Solved

The problem is simple i have two DataFrame : one with 90 000 apartment and their latitude/longitude and one with 3 000 pharmacy and their latitude/longitude And i want to create a new variable...
Governor asked 16/11, 2019 at 18:8

1

Solved

The pseudo-code for nearest neighbor (NN) search in Wikipedia is not tractable enough for me. Few more posts available with implementations, but they seem to be language specific. So I'm finding it...
Roar asked 14/8, 2019 at 7:5

© 2022 - 2024 — McMap. All rights reserved.