Skip to content

Commit 12ac491

Browse files
committed
re-initialize pred_type if needed
re-do initialization at time of prediction if the tree isn't grown with oobag error.
1 parent 6d798e6 commit 12ac491

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/orsf_R6.R

+5
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ ObliqueForest <- R6::R6Class(
380380

381381
if(self$pred_type != 'none'){
382382
private$clean_pred_oobag()
383+
} else {
384+
# revert pred type to NULL so it is correctly
385+
# initialized when this object is passed to
386+
# other orsf functions
387+
self$pred_type <- NULL
383388
}
384389

385390
self$trained <- TRUE

0 commit comments

Comments
 (0)