ropensci / aorsf

Accelerated Oblique Random Survival Forests
https://docs.ropensci.org/aorsf
Other
55 stars 10 forks source link

unexpected error #38

Closed bcjaeger closed 7 months ago

bcjaeger commented 9 months ago

I found this example caused R to crash. Likely has something to do with sample_fraction = 1 causing oobag_denom to backfire in orsf_cpp


library(aorsf)

oblique_1 <- orsf(species ~ flipper_length_mm + bill_length_mm,
                  data = penguins_orsf,
                  sample_with_replacement = FALSE,
                  sample_fraction = 1,
                  split_min_obs = nrow(penguins_orsf)-1,
                  tree_seeds = 649725,
                  oobag_pred_type = 'none',
                  n_tree = 1)

grid <- tidyr::expand_grid(
 flipper_length_mm = seq(170, 235, len = 100),
 bill_length_mm = seq(30, 70, len = 100)
)

predict(oblique_1, newdata = grid, pred_type = 'prob')
bcjaeger commented 7 months ago

Fixed with #48