Tagged Questions

Nearest neighbors are points (or other objects) in close proximity to a given location in some multi-dimensional space, e.g. a plane. Finding such neighbors lies at the core of several algorithms for various applications.

I've got a recursive function (on tree) and I need to make it work without recursion and representing the tree as an implicit data structure (array).
Here is the function:
kdnode* kdSearchNN(kdnode* ...

I am working on a UCI data set about wine quality. I have applied multiple classifiers and k-nearest neighbor is one of them. I was wondering if there is a way to find the exact value of k for nearest ...

If I wanted to display the nodes of a network on a 2D grid, but also I wanted to ensure the least amount of manhattan distance between any two directly connected nodes (where there is a maximum of one ...

I would like to write a single SPARQL query to find the k nearest neighbors for a set of vectors. To find the average label for the 100 nearest neighbors for a single vector I can use the following ...

i'm a bit new to GIS and i want to search for the k-nearest neighbor in my DB (mySQL)
.
from what i understand the options are:
1) use the Haverstine formula - but it will run on the entire DB, i know ...

I wish to implement this paper's algorithm for accessing quadtree node neighbors in constant time.
I am facing problems when attempting to access diagonal neighbors (for when the quad is one or more ...

I have a very specific question. I work on a project, were I need to find nearest neighbours (k and near).
As I dont need the excat ones and want to be able to extend to high dimensions, I focused on ...

Say I have two tables (SQL Fiddle). One that has recorded values at various timestamps, the other indicates ID's and datetimes to sample for nearest values. Using something similar to Kevin Meade's ...

I am struggling to actually implement the classifying part of my investigations into the possibility of classifying music according to some features of music files.
What I have currently produced is ...

When I am running the apache mahout clustering examples of DisplayDirichlet.java, DisplayClustering.java or etc. the output is in graphical format.
How do I find the nearest neighbor containing 'n' ...

My array is made out of a bitmap so every 4th byte is 255.
In this example I have made a byte Array as in my bitmap format.. as best as I could, it's a 64 elements array.
Or in C# I could just say:
...

I think I know how to do K-Nearest-Neighbors using Cover Trees. (Incidentally: can anybody point me to a run-time complexity analysis of this?), BUT I am looking for all-kNN (that is: find the kNN of ...

For my current input data, which is points in 3D, I'm using Morton code to improve the cache coherence when accessing the point list.
I have some other data that is 6D and 7D. Is Morton code still a ...

How does MongoDB handle range and nearest neighbor queries? what algorithms used?
I know MongoDB use GeoHash and B-Tree to index spatial data but how it handle the range and nearest neighbor queries ...

I have thousands to ten-thousands of data points (x,y)coming from 5 to 6 different source. I need to uniquely group them based on certain distance criteria in such a way that the formed group should ...

I have a rectangular shaped area with a number of points on random positions in it. Now I want to place a new point at the position with the maximum distance to its nearest neighbors. A solution for ...

Suppose we have two dimensions in original space and we wish to map data to feature space with polynomial kernel (xy)^2.
data=[1 2; 3 4; 5 6]; (2 dimensions- 3 samples)
I would like to know how can ...

I'm using knnclassify to do a kNN classification in Matlab and it's working well. Now, I need to know the distances to the neighbors and it seems that knnsearch funcion gives me that.
The problem is ...

I'm trying to find a way to quantify the density of objects, so that I can compare that density score to other object attributes. What I have is image data in .csv files, and each detected object is ...

tl;dr
I need a way to find "Foreign Nearest Neighbors" using a KDTree or some other spatial data structure. i.e find the nearest neighbor in a subset of the tree.
I built a MST algorithm that uses a ...

Currently I'm assessing the strength of several classification algorithms (Neural networks, support vector machines, k-NN, logistic regression and decision trees).
I have two data sets to do this. If ...

Nearest-neighbor is a commonly-used "filtering" technique for scaling pixel art while showing individual pixels. However, it doesn't work well for scaling with non-integral factors. I had an idea for ...

I have successfully written a function that traverses a Kd-Tree for the nearest single neighbor of a point.
However, I'm trying to switch this function around so that it finds the K-nearest neighbors ...