powered by
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, ...)
y_star A data.frame of samples y associated with the new inputs.
The fitted RF model from which to draw samples.
A data.frame containing new inputs from which to sample responses. If NULL, defaults to the data used to estimate fit.
The coordinates of the response from which to draw samples.
Additional parameters passed to rf_model's predict method.
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)
Run the code above in your browser using DataLab