Emgu CV Library Documentation
Train Method (trainData, responses, varIdx, sampleIdx, update)
NamespacesEmgu.CV.MLNormalBayesClassifierTrain(Matrix<(Of <(Single>)>), Matrix<(Of <(Int32>)>), Matrix<(Of <(Int32>)>), Matrix<(Of <(Int32>)>), Boolean)

www.emgu.com/wiki
Train the classifier using the specific data
Declaration Syntax
C#Visual BasicVisual C++
public bool Train(
	Matrix<float> trainData,
	Matrix<int> responses,
	Matrix<int> varIdx,
	Matrix<int> sampleIdx,
	bool update
)
Public Function Train ( _
	trainData As Matrix(Of Single), _
	responses As Matrix(Of Integer), _
	varIdx As Matrix(Of Integer), _
	sampleIdx As Matrix(Of Integer), _
	update As Boolean _
) As Boolean
public:
bool Train(
	Matrix<float>^ trainData, 
	Matrix<int>^ responses, 
	Matrix<int>^ varIdx, 
	Matrix<int>^ sampleIdx, 
	bool update
)
Parameters
trainData (Matrix<(Of <(Single>)>))
The training data. A 32-bit floating-point, single-channel matrix, one vector per row
responses (Matrix<(Of <(Int32>)>))
A floating-point matrix of the corresponding output vectors, one vector per row.
varIdx (Matrix<(Of <(Int32>)>))
Can be null if not needed. When specified, identifies variables (features) of interest. It is a Matrix>int< of nx1
sampleIdx (Matrix<(Of <(Int32>)>))
Can be null if not needed. When specified, identifies samples of interest. It is a Matrix>int< of nx1
update (Boolean)
If true, the training data is used to update the classifier; Otherwise, the data in the classifier are cleared before training is performed
Return Value
The number of done iterations

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