cv_krr: Choose best lambda via cross-validation.

Description Usage Arguments Value

Description

A very crude method to find the optimal lambda for a krr (kernel ridge regression) model.

Usage

1
cv_krr(x, y, lambda_index)

Arguments

x

Quantitative explanatory variables (vector, matrix, or data.frame).

y

Quantitative response variable.

lambda_index

Vector of lambdas to scan for best model.

Value

Returns best lambda, MSE, and model. Also returns a dataframe of every lambda_index value and corresponding MSE.


TimothyKBook/krr documentation built on May 9, 2019, 4:48 p.m.