StatModelCalcError Method
|
Computes error on the training or test dataset
Namespace:
OpenCvSharp.ML
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic virtual float CalcError(
TrainData data,
bool test,
OutputArray resp
)
Public Overridable Function CalcError (
data As TrainData,
test As Boolean,
resp As OutputArray
) As Single
public:
virtual float CalcError(
TrainData^ data,
bool test,
OutputArray^ resp
)
abstract CalcError :
data : TrainData *
test : bool *
resp : OutputArray -> float32
override CalcError :
data : TrainData *
test : bool *
resp : OutputArray -> float32
function CalcError(data, test, 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
See Also