Description Usage Arguments Details Value See Also
View source: R/sample_from_ranger.R
Determines the predicted value using the 'whole-of-forest' prediction, or
evaluates the prediction of a selected tree (tree.imp=T
). In the
latter case, each row in the data set is predicted using a randomly selected
(with replacement) tree in the forest. We call this a 'tree-sampled'
prediction and it somewhat corresponds to an sample from the
distribution of the predicted value or class given the (new) data.
1 | sample_from_ranger(ranger_fit, data_, response, tree.imp = F, ...)
|
ranger_fit |
ranger object;
random forest fitted to data of same format as |
data_ |
a data.frame;
data.frame with same variables as the data used in the training
of |
response |
character;
name of the dependent variable i.e. the value of
|
tree.imp |
logical;
set to |
... |
additional arguments passed on to |
Ranger is considered slow at prediction as of 07/2018, particularly for smaller data sets, see issue 133: https://github.com/imbs-hl/ranger/issues/133
predicted or sampled values or classes (with original class and levels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.