Click or drag to resize
Accord.NET (logo)

BaseKNearestNeighborsTModel, TInput, TDistanceGetNearestNeighbors Method

Gets the top K points that are the closest to a given input.

Namespace:  Accord.MachineLearning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.6.0
Syntax
public abstract TInput[] GetNearestNeighbors(
	TInput input,
	out int[] labels
)
Request Example View Source

Parameters

input
Type: TInput
The query point whose neighbors will be found.
labels
Type: SystemInt32
The label for each neighboring point.

Return Value

Type: TInput
An array containing the top K points that are at the closest possible distance to input.
See Also