http://www.emgu.com
Train the classifier using the specific 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<int> responses,
	Matrix<byte> varIdx,
	Matrix<byte> sampleIdx,
	bool update
)
Visual Basic
Public Function Train ( 
	trainData As Matrix(Of Single),
	responses As Matrix(Of Integer),
	varIdx As Matrix(Of Byte),
	sampleIdx As Matrix(Of Byte),
	update As Boolean
) As Boolean
Visual C++
public:
bool Train(
	Matrix<float>^ trainData, 
	Matrix<int>^ responses, 
	Matrix<unsigned char>^ varIdx, 
	Matrix<unsigned char>^ sampleIdx, 
	bool update
)
F#
member Train : 
        trainData : Matrix<float32> * 
        responses : Matrix<int> * 
        varIdx : Matrix<byte> * 
        sampleIdx : Matrix<byte> * 
        update : 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 <(<'Int32>)>)>
A floating-point matrix of the corresponding output vectors, one vector per row.
varIdx
Type: Emgu.CV..::..Matrix<(Of <(<'Byte>)>)>
Can be null if not needed. When specified, identifies variables (features) of interest. It is a Matrix>int< of nx1
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
update
Type: System..::..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

Type: Boolean
The number of done iterations

See Also