Commit df3219b9 authored by Cédric Traizet's avatar Cédric Traizet

BUG: don't expose cvFold dtree parameter, as it is not implemented in opencv 3 and 4

parent 710c8a48
......@@ -79,8 +79,6 @@ public:
OTB_CV_WRAP_PROPERTY(int, MinSampleCount)
OTB_CV_WRAP_PROPERTY(bool, UseSurrogates)
// warning: CV fold crash in openCV 3
OTB_CV_WRAP_PROPERTY(int, CVFolds)
OTB_CV_WRAP_PROPERTY(bool, Use1SERule)
OTB_CV_WRAP_PROPERTY(bool, TruncatePrunedTree)
OTB_CV_WRAP_PROPERTY(float, RegressionAccuracy)
......
......@@ -103,13 +103,6 @@ public:
itkGetMacro(MaxCategories, int);
itkSetMacro(MaxCategories, int);
/** If cv_folds > 1 then prune a tree with K-fold cross-validation where K is equal to cv_folds.
* Default is 10
* \see http://docs.opencv.org/modules/ml/doc/decision_trees.html#CvDTreeParams::CvDTreeParams%28%29
*/
itkGetMacro(CVFolds, int);
itkSetMacro(CVFolds, int);
/** If true then a pruning will be harsher. This will make a tree more compact and
* more resistant to the training data noise but a bit less accurate.
* Default is true
......@@ -190,7 +183,6 @@ private:
double m_RegressionAccuracy;
bool m_UseSurrogates;
int m_MaxCategories;
int m_CVFolds;
bool m_Use1seRule;
bool m_TruncatePrunedTree;
std::vector<float> m_Priors;
......
......@@ -39,7 +39,6 @@ DecisionTreeMachineLearningModel<TInputValue, TOutputValue>::DecisionTreeMachine
m_RegressionAccuracy(0.01),
m_UseSurrogates(false),
m_MaxCategories(10),
m_CVFolds(0),
m_Use1seRule(true),
m_TruncatePrunedTree(true)
{
......@@ -68,7 +67,6 @@ void DecisionTreeMachineLearningModel<TInputValue, TOutputValue>::Train()
m_DTreeModel->setRegressionAccuracy(m_RegressionAccuracy);
m_DTreeModel->setUseSurrogates(m_UseSurrogates);
m_DTreeModel->setMaxCategories(m_MaxCategories);
m_DTreeModel->setCVFolds(m_CVFolds);
m_DTreeModel->setUse1SERule(m_Use1seRule);
m_DTreeModel->setTruncatePrunedTree(m_TruncatePrunedTree);
m_DTreeModel->setPriors(cv::Mat(m_Priors));
......
......@@ -145,7 +145,6 @@ OTB_CV_WRAP_IMPL(int, MaxCategories)
OTB_CV_WRAP_IMPL(int, MaxDepth)
OTB_CV_WRAP_IMPL(int, MinSampleCount)
OTB_CV_WRAP_IMPL(bool, UseSurrogates)
OTB_CV_WRAP_IMPL(int, CVFolds)
OTB_CV_WRAP_IMPL(bool, Use1SERule)
OTB_CV_WRAP_IMPL(bool, TruncatePrunedTree)
OTB_CV_WRAP_IMPL(float, RegressionAccuracy)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment