Click or drag to resize
Accord.NET (logo)

KNearestNeighborsTInput Constructor (Int32, TInput, Int32, IDistanceTInput)

Note: This API is now obsolete.

Creates a new KNearestNeighbors.

Namespace:  Accord.MachineLearning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.7.0
Syntax
[ObsoleteAttribute("Please use KNearestNeighbors(int k, IDistance<T> distance) constructor instead.")]
public KNearestNeighbors(
	int k,
	TInput[] inputs,
	int[] outputs,
	IDistance<TInput> distance
)
Request Example View Source

Parameters

k
Type: SystemInt32
The number of nearest neighbors to be used in the decision.
inputs
Type: TInput
The input data points.
outputs
Type: SystemInt32
The associated labels for the input points.
distance
Type: Accord.Math.DistancesIDistanceTInput
The distance measure to use in the decision.
See Also