Click or drag to resize

StatModelCalcError Method

Computes error on the training or test dataset

Namespace:  OpenCvSharp.ML
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public virtual float CalcError(
	TrainData data,
	bool test,
	OutputArray resp
)

Parameters

data
Type: OpenCvSharp.MLTrainData
the training data
test
Type: SystemBoolean
if true, the error is computed over the test subset of the data, otherwise it's computed over the training subset of the data. Please note that if you loaded a completely different dataset to evaluate already trained classifier, you will probably want not to set the test subset at all with TrainData::setTrainTestSplitRatio and specify test=false, so that the error is computed for the whole new set. Yes, this sounds a bit confusing.
resp
Type: OpenCvSharpOutputArray
the optional output responses.

Return Value

Type: Single

[Missing <returns> documentation for "M:OpenCvSharp.ML.StatModel.CalcError(OpenCvSharp.ML.TrainData,System.Boolean,OpenCvSharp.OutputArray)"]

See Also