Skip to content

Commit d2e5bea

Browse files
committed
Disable training of RTrees when CVFolds > 0
1 parent 75eeb25 commit d2e5bea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/ml/src/rtrees.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ class RTreesImpl : public RTrees
382382

383383
bool train( const Ptr<TrainData>& trainData, int flags )
384384
{
385+
if (impl.getCVFolds() != 0)
386+
CV_Error(Error::StsBadArg, "Cross validation for RTrees is not implemented");
385387
return impl.train(trainData, flags);
386388
}
387389

0 commit comments

Comments
 (0)