ropensci / aorsf

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

Error in matrix(data = c(collapse::fnth(numeric_data, 0.1, w = self$weights), : 'data' must be of a vector type, was 'NULL' #55

Closed cmululu closed 4 months ago

cmululu commented 4 months ago

For the oblique random survival forest model, if there is only one independent variable in the data except for the time and event. The error will happen.

image image

bcjaeger commented 4 months ago

Thanks! Would you be comfortable providing a reprex for this error? I will check it out a little more carefully and see if it's feasible to work in a fix.

For oblique random forests, you don't gain anything from including fewer than 2 predictor variables. Oblique splitting with 1 variable is the same thing as axis based splitting.

bcjaeger commented 4 months ago

PR #56 should fix the error you received. Please don't hesitate to let me know if there are still issues after you download the development version of aorsf