Skip to content

Commit

Permalink
drop = false for 1 predictor
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed May 2, 2024
1 parent c1fba42 commit ded908b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/orsf_R6.R
Original file line number Diff line number Diff line change
Expand Up @@ -3051,15 +3051,14 @@ ObliqueForest <- R6::R6Class(
unique(variable[predictor %in% colnames(cpp_args$x)])
)


oob_data[n_predictors,
`:=`(n_predictors = n_predictors,
stat_value = cpp_output$eval_oobag$stat_values[1,1],
variables_included = .variables_included,
predictors_included = colnames(cpp_args$x),
predictor_dropped = worst_predictor)]

cpp_args$x <- cpp_args$x[, -worst_index]
cpp_args$x <- cpp_args$x[, -worst_index, drop = FALSE]
n_predictors <- n_predictors - 1
current_progress <- current_progress + 1

Expand All @@ -3069,6 +3068,7 @@ ObliqueForest <- R6::R6Class(
cat("Selecting variables: 100%\n")
}


collapse::na_omit(oob_data)

},
Expand Down

0 comments on commit ded908b

Please sign in to comment.