|
KNearestNeighborsGetNearestNeighbors 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.8.0
Syntax public override double[][] GetNearestNeighbors(
double[] input,
out int[] labels
)
Public Overrides Function GetNearestNeighbors (
input As Double(),
<OutAttribute> ByRef labels As Integer()
) As Double()()
Request Example
View SourceParameters
- input
- Type: SystemDouble
The query point whose neighbors will be found. - labels
- Type: SystemInt32
The label for each neighboring point.
Return Value
Type:
Double
An array containing the top
K points that are
at the closest possible distance to
input.
See Also