http://www.emgu.com
Update the KNearest classifier using the specific traing data.

Namespace: Emgu.CV.ML
Assembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public bool Train(
	Matrix<float> trainData,
	Matrix<float> responses,
	Matrix<byte> sampleIdx,
	bool isRegression,
	int maxK,
	bool updateBase
)
Visual Basic
Public Function Train ( 
	trainData As Matrix(Of Single),
	responses As Matrix(Of Single),
	sampleIdx As Matrix(Of Byte),
	isRegression As Boolean,
	maxK As Integer,
	updateBase As Boolean
) As Boolean
Visual C++
public:
bool Train(
	Matrix<float>^ trainData, 
	Matrix<float>^ responses, 
	Matrix<unsigned char>^ sampleIdx, 
	bool isRegression, 
	int maxK, 
	bool updateBase
)
F#
member Train : 
        trainData : Matrix<float32> * 
        responses : Matrix<float32> * 
        sampleIdx : Matrix<byte> * 
        isRegression : bool * 
        maxK : int * 
        updateBase : bool -> bool 

Parameters

trainData
Type: Emgu.CV..::..Matrix<(Of <(<'Single>)>)>
The training data. A 32-bit floating-point, single-channel matrix, one vector per row
responses
Type: Emgu.CV..::..Matrix<(Of <(<'Single>)>)>
A floating-point matrix of the corresponding output vectors, one vector per row.
sampleIdx
Type: Emgu.CV..::..Matrix<(Of <(<'Byte>)>)>
Can be null if not needed. When specified, identifies samples of interest. It is a Matrix>int< of nx1
isRegression
Type: System..::..Boolean
Specify the output variables type. It can be either categorical (isRegression=false) or ordered (isRegression=true)
maxK
Type: System..::..Int32
The number of maximum neighbors that may be passed to the method findNearest.
updateBase
Type: System..::..Boolean
If true, the existing classifer is updated using the new training data; Otherwise, the classifier is trained from scratch

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Emgu.CV.ML.KNearest.Train(Emgu.CV.Matrix{System.Single},Emgu.CV.Matrix{System.Single},Emgu.CV.Matrix{System.Byte},System.Boolean,System.Int32,System.Boolean)"]

See Also