cv_ridge: Use cross validation to find the optimal ridge penalty...

Description Usage Arguments Value Examples

View source: R/cv_ridge.R

Description

Use cross validation to find the optimal ridge penalty parameter

Usage

1
cv_ridge(form, d, lambdas, tol = 1e-08, seed)

Arguments

form

A formula specifying the model.

d

A dataframe.

lambdas

The candidate tuning parameters for the ridge penalty term

tol

Tolerance for the condition number to truncate colinear variables

seed

A seed to control the randomness

Value

A list with fitted coefficients, regression data X,Y and tolerance

Examples

1
cv_ridge(Sepal.Length~.,iris,lambdas=seq(0,1,0.01),tol=1e-8,seed=1234)

siqiangsu/bis557 documentation built on Dec. 21, 2020, 2:15 a.m.