
Conditional Normal Density Estimation Given Mean Predictors
Source:R/density_learners.R
lnr_lm_density.RdThis is the simplest possible density estimator that is
entertainable. It fits a lm model to the data, and
uses the variance of the residuals to parameterize a
model of the data as \(\mathcal N(y | \beta x, \sigma^2)\).
Arguments
- data
A dataframe to train a learner / learners on.
- formula
A regression formula to use inside this learner.
- weights
Observation weights; see
?lm- ...
Any extra arguments that should be passed to the internal model for model fitting purposes.