find_best_lambda: Determines the best penalty term from a set of options

View source: R/ridge_regression.R

find_best_lambdaR Documentation

Determines the best penalty term from a set of options

Description

This function uses a randomly chosen test and training set

Usage

find_best_lambda(train_dat, test_dat, response, lambdas)

Arguments

train_dat

A data frame to construct the model from

test_dat

A data frame to test the model on

response

The name of a response variable in the data frame (unquoted)

lambda

A vector of penalty terms to try

Details

No interaction terms are included.

Value

A data frame of penalty terms and resulting errors


mknauss58/Lab-6-Group documentation built on May 22, 2022, 12:26 a.m.