lm_graddescent_xval: Linear model using gradient descent, adjusted for...

Description Usage Arguments Examples

View source: R/lm_graddescent_xval.R

Description

This function creates a linear model using gradient descent, adjusting the penalty for out-of-sample accuracy.

Usage

1
lm_graddescent_xval(f, d, gamma, n, flds)

Arguments

f

a formula the data will be fit too

d

the data to be fit (a data frame)

gamma

the step size (a positive number)

n

number of iterations (a positive integer)

flds

a list of folds

Examples

1
2
3
4
data("iris")
irisform <- Sepal.Length ~.
irisfold <- rsample::vfold_cv(iris)
lm_graddescent_xval(irisform, iris, 0.0001, 100000, irisfold)

kimgannon/bis557 documentation built on Nov. 25, 2020, 7:09 a.m.