Top "Nearest-neighbor" questions

Nearest neighbors are points (or other objects) in close proximity to a given location in some multi-dimensional space, e.g. a plane.

How to find k nearest neighbors to the median of n distinct numbers in O(n) time?

I can use the median of medians selection algorithm to find the median in O(n). Also, I know that …

algorithm sorting search median nearest-neighbor
2D Nearest Neighbor Interpolation in Python

Suppose that we have the following look up table | 1.23 2.63 4.74 6.43 5.64 -------|-------------------------------------- -------|-------------------------------------- 2.56 | 0 0 1 0 1 4.79 | 0 1 1 1 0 6.21 | 1 0 0 0 0 This table contains a labeling matrix (having …

python numpy scipy interpolation nearest-neighbor
Image interpolation mode in Chrome/Safari?

I need to have an image render with nearest-neighbor resizing and not the bicubic way that is currently used. I …

css image interpolation nearest-neighbor
nearest neighbor - k-d tree - wikipedia proof

On the wikipedia entry for k-d trees, an algorithm is presented for doing a nearest neighbor search on a k-d …

nearest-neighbor kdtree
How To Rotate Image By Nearest Neighbor Interpolation Using Matlab

My Plain Code without interpolation: im1 = imread('lena.jpg');imshow(im1); [m,n,p]=size(im1); thet = rand(1); m1=m*…

matlab image-processing nearest-neighbor image-rotation
Plot k-Nearest-Neighbor graph with 8 features?

I'm new to machine learning and would like to setup a little sample using the k-nearest-Neighbor-method with the Python library …

python machine-learning plot scikit-learn nearest-neighbor
K-Nearest Neighbor Query in PostGIS

I am using the following Nearest Neighbor Query in PostGIS : SELECT g1.gid g2.gid FROM points as g1, polygons …

postgresql postgis indexing nearest-neighbor
Find all nearest neighbors within a specific distance

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 …

python numpy nearest-neighbor
Implement K Neighbors Classifier in scikit-learn with 3 feature per object

I would like to implement a KNeighborsClassifier with scikit-learn module (http://scikit-learn.org/dev/modules/generated/sklearn.neighbors.KNeighborsClassifier.html) …

python machine-learning scikit-learn nearest-neighbor classification
How to find the nearest neighbors of 1 Billion records with Spark?

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 …

apache-spark pyspark spark-dataframe nearest-neighbor euclidean-distance