Skip to content

Commit 3eb9a65

Browse files
committed
ml: disable not implemented k-fold validation in RTrees
1 parent d25cbaa commit 3eb9a65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/ml/src/precomp.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ namespace ml
151151
CV_Error( CV_StsOutOfRange,
152152
"params.CVFolds should be =0 (the tree is not pruned) "
153153
"or n>0 (tree is pruned using n-fold cross-validation)" );
154+
if(val > 1)
155+
CV_Error( CV_StsNotImplemented,
156+
"tree pruning using cross-validation is not implemented."
157+
"Set CVFolds to 1");
158+
154159
if( val == 1 )
155160
val = 0;
156161
CVFolds = val;

0 commit comments

Comments
 (0)