makeRidgeLearner: Create a Ridge learner object

View source: R/ridge_learner.R

makeRidgeLearnerR Documentation

Create a Ridge learner object

Description

Creates a Ridge learner object to be used in veb_boost

Usage

makeRidgeLearner(
  X,
  X_test = NULL,
  growMode = c("NA", "+*", "+", "*"),
  changeToConstant = FALSE,
  scale_X = c("sd", "max", "NA")
)

Arguments

X

is our design matrix used in training. Scaling is handled by this function

X_test

is our design matrix used in testing Scaling is handled by this function

growMode

is a string for if the learner should be grown (or not) If "+*", we grow mu_0 -> (mu_0 * mu_2) + mu_1 If "+", we grow mu_0 -> (mu_0 + mu_1) If "*", we grow mu_0 -> (mu_0 * mu_1) (NOTE: Not recommended if we start with k = 1) If "NA", we do not grow this learner

changeToConstant

is a logical for if constant fits should be changed to be constant

scale_X

is a string for if/how the columns of X should be scaled. 'sd' scales by the standard deviations of the variables. 'max' scales by the maximum absolute value (so variables are on the [-1, +1] scale). 'NA' performs no scaling.

Details

A Ridge learner \beta has a prior distribution

\beta ~ N(0, \sigma_{\beta}^2 S^2)

for a fixed and given S.


stephenslab/VEB.Boost documentation built on July 2, 2023, 1 p.m.