The following learners are available for continuous outcomes:
Value
Every learner function shares the same structure: when
called with (data, formula, ...) it fits the underlying model
and returns a prediction closure which is a function of
newdata returning a numeric vector of predictions (predicted
probabilities of the second factor level for binary learners;
predicted densities for density learners; a matrix of class
probabilities for multiclass learners).
Details
lnr_bartlnr_cvglmnetlnr_earthlnr_gamlnr_gaussprlnr_gbmlnr_glmlnr_glmerlnr_glmnetlnr_glmnet_gridlnr_hallnr_hal_gridlnr_knnlnr_lightgbmlnr_lmlnr_lmerlnr_meanlnr_pprlnr_rangerlnr_rpartlnr_rflnr_svmlnr_xgboost
See ?density_learners to learn more about using conditional density
estimation in nadir.
lnr_mean is generally provided only for benchmarking purposes to compare
other learners against to ensure correct specification of learners, since any
prediction algorithm should (in theory) out-perform just using the mean of
the outcome for all predictions.
If you'd like to build a new learner, we recommend reading the
source code of several of the learners provided with {nadir} to
get a sense of how they should be specified.
A learner, as {nadir} understands them, is a function which
takes in data, a formula, possibly ..., and
returns a function that predicts on its input newdata.
A simple example is reproduced here for ease of reference:
