
Posterior predictive distribution of an edaphos Active-Learning fit
Source:R/active_posterior.R
active_learning_posterior.RdSamples the conditional distribution of the target at every row of
candidates by asking the underlying Quantile Regression Forest
(ranger) for a grid of quantiles. The returned
edaphos_posterior carries those quantile samples directly, so
uncertainty_calibrate() and ggplot2::autoplot() work without changes.
Arguments
- model
An
edaphos_al_modelproduced byal_fit().- newdata
A data frame with (at least) the columns used as covariates at fit time.
- n_quantiles
Integer; size of the equally-spaced grid of quantiles to request from the QRF. Defaults to
99L(1 % to 99 % in 1 % steps, which is a reasonable trade-off between a smooth empirical CDF andranger::predict()cost).- units
Optional free-text units tag.