make_quadratic: Orthogonal quadratic polynomials for glmnet

Description Usage Arguments Value Author(s)

View source: R/prediction_helper.R

Description

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.

Usage

1
make_quadratic(df, cols = NULL, verbose = TRUE)

Arguments

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.

Value

an object of make_quadratic that can be used to predict on rasters and data.frames

Author(s)

Roozbeh Valavi


rvalavi/myspatial documentation built on May 15, 2021, 12:14 a.m.