CvANN_MLPTrain Method (Mat, Mat, Mat, Mat, CvANN_MLP_TrainParams, MLPTrainingFlag) OpenCvSharp Class Library
Trains/updates MLP

Namespace:  OpenCvSharp.CPlusPlus
Assembly:  OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public virtual int Train(
	Mat inputs,
	Mat outputs,
	Mat sampleWeights,
	Mat sampleIdx = null,
	CvANN_MLP_TrainParams param = null,
	MLPTrainingFlag flags = MLPTrainingFlag.Zero
)

Parameters

inputs
Type: OpenCvSharp.CPlusPlusMat
A floating-point matrix of input vectors, one vector per row.
outputs
Type: OpenCvSharp.CPlusPlusMat
A floating-point matrix of the corresponding output vectors, one vector per row.
sampleWeights
Type: OpenCvSharp.CPlusPlusMat
(RPROP only) The optional floating-point vector of weights for each sample. Some samples may be more important than others for training, e.g. user may want to gain the weight of certain classes to find the right balance between hit-rate and false-alarm rate etc.
sampleIdx (Optional)
Type: OpenCvSharp.CPlusPlusMat
The optional integer vector indicating the samples (i.e. rows of _inputs and _outputs) that are taken into account.
param (Optional)
Type: OpenCvSharp.CPlusPlusCvANN_MLP_TrainParams
The training params.
flags (Optional)
Type: OpenCvSharp.CPlusPlusMLPTrainingFlag
The various parameters to control the training algorithm.

Return Value

Type: Int32
the number of done iterations.
See Also

Reference