Emgu CV Library Documentation
Train Method (trainData, responses, sampleIdx, isRegression, maxK, updateBase)
NamespacesEmgu.CV.MLKNearestTrain(Matrix<(Of <(Single>)>), Matrix<(Of <(Single>)>), Matrix<(Of <(Int32>)>), Boolean, Int32, Boolean)

www.emgu.com/wiki
Update the KNearest classifier using the specific traing data.
Declaration Syntax
C#Visual BasicVisual C++
public bool Train(
	Matrix<float> trainData,
	Matrix<float> responses,
	Matrix<int> sampleIdx,
	bool isRegression,
	int maxK,
	bool updateBase
)
Public Function Train ( _
	trainData As Matrix(Of Single), _
	responses As Matrix(Of Single), _
	sampleIdx As Matrix(Of Integer), _
	isRegression As Boolean, _
	maxK As Integer, _
	updateBase As Boolean _
) As Boolean
public:
bool Train(
	Matrix<float>^ trainData, 
	Matrix<float>^ responses, 
	Matrix<int>^ sampleIdx, 
	bool isRegression, 
	int maxK, 
	bool updateBase
)
Parameters
trainData (Matrix<(Of <(Single>)>))
The training data. A 32-bit floating-point, single-channel matrix, one vector per row
responses (Matrix<(Of <(Single>)>))
A floating-point matrix of the corresponding output vectors, one vector per row.
sampleIdx (Matrix<(Of <(Int32>)>))
Can be null if not needed. When specified, identifies samples of interest. It is a Matrix>int< of nx1
isRegression (Boolean)
Specify the output variables type. It can be either categorical (isRegression=false) or ordered (isRegression=true)
maxK (Int32)
The number of maximum neighbors that may be passed to the method findNearest.
updateBase (Boolean)
If true, the existing classifer is updated using the new training data; Otherwise, the classifier is trained from scratch
Return Value

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

Assembly: Emgu.CV.ML (Module: Emgu.CV.ML) Version: 1.0.0.0 (1.0.0.0)