Train the classifier using the specific data
Namespace:
Emgu.CV.MLAssembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 2.1.0.649 (2.1.0.649)
Syntax
C# | Visual Basic | Visual C++ |
public: bool Train( Matrix<float>^ trainData, Matrix<int>^ responses, Matrix<unsigned char>^ varIdx, Matrix<unsigned char>^ 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 <(Byte>)>)
Can be null if not needed. When specified, identifies variables (features) of interest. It is a Matrix>int< of nx1
- sampleIdx
- Matrix<(Of <(Byte>)>)
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