find_lambda: Lambda finder

Description Arguments Examples

View source: R/function.R

Description

search the best ridge regression parameter lambda based on N folds cross validation for out of sample accuracy.

Arguments

formula

a formula for a linear model to regress.

data

the data frame we run our model on.

N

number of folds to split the dataset

lambdas

list of lambda you want to search from, default is from 0.1 to 0.9

Examples

1
find_lambda(mpg ~.,mtcars,lambdas = c(0.1,0.2,0.5))

importbq/bis557 documentation built on Dec. 21, 2020, 3:05 a.m.