This is a very naive/simple learner that simply predicts the mean of the
outcome for every row of input newdata. This is primarily
useful for benchmarking and confirming that other learners are
performing better than lnr_mean. Additionally, it may be the case
that some learners are over-fitting the data, and giving some weight to
lnr_mean helps to reduce over-fitting in super_learner().
Arguments
- data
A dataframe to train a learner / learners on.
- formula
A regression formula to use inside this learner.
- weights
Observation weights; see
?lm
