Method | Description | |
---|---|---|
CalcError ( OpenCvSharp.ML.TrainData data, bool test, OutputArray resp ) : float |
Computes error on the training or test dataset
|
|
Empty ( ) : bool |
|
|
GetVarCount ( ) : int |
Returns the number of variables in training samples
|
|
IsClassifier ( ) : bool |
Returns true if the model is classifier
|
|
IsTrained ( ) : bool |
Returns true if the model is trained
|
|
Predict ( InputArray samples, OutputArray results = null, Flags flags ) : float |
Predicts response(s) for the provided sample(s)
|
|
Train ( InputArray samples, SampleTypes layout, InputArray responses ) : bool |
Trains the statistical model
|
|
Train ( TrainData trainData, int flags ) : bool |
Trains the statistical model
|
Method | Description | |
---|---|---|
StatModel ( ) : System |
Default constructor
|
public CalcError ( OpenCvSharp.ML.TrainData data, bool test, OutputArray resp ) : float | ||
data | OpenCvSharp.ML.TrainData | the training data |
test | bool | 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 | OutputArray | the optional output responses. |
return | float |
public Predict ( InputArray samples, OutputArray results = null, Flags flags ) : float | ||
samples | InputArray | The input samples, floating-point matrix |
results | OutputArray | The optional output matrix of results. |
flags | Flags | The optional flags, model-dependent. |
return | float |
public Train ( InputArray samples, SampleTypes layout, InputArray responses ) : bool | ||
samples | InputArray | training samples |
layout | SampleTypes | SampleTypes value |
responses | InputArray | vector of responses associated with the training samples. |
return | bool |
public Train ( TrainData trainData, int flags ) : bool | ||
trainData | TrainData | training data that can be loaded from file using TrainData::loadFromCSV /// or created with TrainData::create. |
flags | int | optional flags, depending on the model. Some of the models can be updated with the /// new training samples, not completely overwritten (such as NormalBayesClassifier or ANN_MLP). |
return | bool |