A wrapper for ranger::ranger() for use in nadir::super_learner().
Arguments
- data
A dataframe to train a learner / learners on.
- formula
A regression formula to use inside this learner.
- weights
Observation weights; see
?lm- ...
Any extra arguments that should be passed to the internal model for model fitting purposes.
Value
A prediction function that accepts newdata,
which returns predictions (a numeric vector of values, one for each row
of newdata).
Examples
lnr_ranger_binary(mtcars, am ~ hp)(mtcars)
#> [1] 0.59030635 0.59030635 0.80771905 0.59030635 0.19461587 0.42658254
#> [7] 0.05305556 0.68045873 0.47346349 0.16295714 0.16295714 0.02783889
#> [13] 0.02783889 0.02783889 0.02309206 0.02159206 0.02596349 0.85462619
#> [19] 0.70718651 0.85462619 0.39622937 0.13348889 0.13348889 0.05305556
#> [25] 0.19461587 0.85462619 0.80771905 0.60546349 0.63891746 0.19461587
#> [31] 0.83626190 0.61817857
