Wrappers for load methods of EM, LR, SVMSGD and Normal Bayes Classifier
This commit is contained in:
@@ -845,6 +845,11 @@ Ptr<EM> EM::create()
|
||||
return makePtr<EMImpl>();
|
||||
}
|
||||
|
||||
Ptr<EM> EM::load(const String& filepath, const String& nodeName)
|
||||
{
|
||||
return Algorithm::load<EM>(filepath, nodeName);
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace cv
|
||||
|
||||
|
||||
@@ -127,6 +127,12 @@ Ptr<LogisticRegression> LogisticRegression::create()
|
||||
return makePtr<LogisticRegressionImpl>();
|
||||
}
|
||||
|
||||
Ptr<LogisticRegression> LogisticRegression::load(const String& filepath, const String& nodeName)
|
||||
{
|
||||
return Algorithm::load<LogisticRegression>(filepath, nodeName);
|
||||
}
|
||||
|
||||
|
||||
bool LogisticRegressionImpl::train(const Ptr<TrainData>& trainData, int)
|
||||
{
|
||||
// return value
|
||||
|
||||
@@ -458,6 +458,11 @@ Ptr<NormalBayesClassifier> NormalBayesClassifier::create()
|
||||
return p;
|
||||
}
|
||||
|
||||
Ptr<NormalBayesClassifier> NormalBayesClassifier::load(const String& filepath, const String& nodeName)
|
||||
{
|
||||
return Algorithm::load<NormalBayesClassifier>(filepath, nodeName);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,12 @@ Ptr<SVMSGD> SVMSGD::create()
|
||||
return makePtr<SVMSGDImpl>();
|
||||
}
|
||||
|
||||
Ptr<SVMSGD> SVMSGD::load(const String& filepath, const String& nodeName)
|
||||
{
|
||||
return Algorithm::load<SVMSGD>(filepath, nodeName);
|
||||
}
|
||||
|
||||
|
||||
void SVMSGDImpl::normalizeSamples(Mat &samples, Mat &average, float &multiplier)
|
||||
{
|
||||
int featuresCount = samples.cols;
|
||||
|
||||
Reference in New Issue
Block a user