lm_gradient_looc: Leave one out cross validation for Linear Models with...

Description Usage Arguments Value

View source: R/lm_gradient_looc.R

Description

lm_gradient_looc is used to perform a leave one out cross validation to a linear model with gradient or steepest descent.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
lm_gradient_looc(
  b,
  formula,
  data = NULL,
  maxit = 1000,
  tolerance = 1e-05,
  stepsize = 1e-04,
  fun = "sd",
  parallel = FALSE
)

Arguments

b

initial values for beta

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted

data

an optional data frame, list or environment. If not found in data, the variables are taken from environment(formula)

maxit

number of max iterations of the algorithm

tolerance

the algorithm will stop if tolerance is reached

stepsize

size of each step (only for gradient descent)

fun

function can be sd for steepest descent or gd for gradient descent

parallel

perform the cross validation in multi-core

Value

the function returns an object of class "gradient"


vincnardelli/gradient documentation built on July 30, 2020, 9:57 a.m.