Description Usage Arguments Value Author(s)
View source: R/prediction_helper.R
A function to create quadratic terms for glmnet functions i.e. lasso and ridge regression. The output is an object of make_quadratic that can be used to predict on rasters and data.frames for creating the quadratic terms.
1 | make_quadratic(df, cols = NULL, verbose = TRUE)
|
df |
a data.frame, typically the training data. |
cols |
the name or index of the columns to be transformed. If NULL, all the columns will be transformed. The factor columns won't be transformed. |
verbose |
logical. print messages. |
an object of make_quadratic that can be used to predict on rasters and data.frames
Roozbeh Valavi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.