step_ols | R Documentation |
Uses the Eigen C++ library fast versions to generate predictions and coefficients from a recipe.
step_ols(.rec, formula, role = "predictor", do_response = TRUE, ...)
.rec |
the R6 recipe object. |
formula |
formula for the regression |
role |
character - the name of the role |
do_response |
|
... |
additional arguments |
an updated recipe
Other ols:
step_nls()
data("kennel_2020")
kennel_2020[, datetime := as.numeric(datetime)]
formula <- as.formula(wl~.)
n_knots <- 12
deg_free <- 27
max_lag <- 1 + 720
frec = recipe(formula = formula, data = unclass(kennel_2020)) |>
step_distributed_lag(baro, knots = hydrorecipes:::log_lags_arma(n_knots, max_lag)) |>
step_spline_b(datetime, df = deg_free, intercept = FALSE) |>
step_intercept() |>
step_drop_columns(baro) |>
step_drop_columns(datetime) |>
step_ols(formula) |>
prep() |>
bake()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.