rf_sampler | R Documentation |
This assumes a continuous response, so that the out-of-sample MSE can be used
to estimate the outcome variability \sigma
.
rf_sampler(fits, newdata = NULL, indices = NULL, ...)
fits |
The fitted RF model from which to draw samples. |
newdata |
A data.frame containing new inputs from which to sample responses. If NULL, defaults to the data used to estimate fit. |
indices |
The coordinates of the response from which to draw samples. |
... |
Additional parameters passed to rf_model's predict method. |
y_star A data.frame of samples y associated with the new inputs.
m <- rf_model()
fit <- estimator(m)(mpg ~ hp + wt, data = mtcars)
rf_sampler(fit, mtcars)
prf <- parallelize(ranger::ranger)
fit <- prf(mpg + disp ~ hp + wt, data = mtcars)
rf_sampler(fit, mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.