kfold_cv_seq: K-fold cross-validation - sequential version

View source: R/predict.R

kfold_cv_seqR Documentation

K-fold cross-validation - sequential version

Description

This function provides the MSE estimate of linear model predictions through the k-fold cross-validation method.

Usage

kfold_cv_seq(
  X,
  y,
  k = 5,
  algorithm = "sd",
  tol = 0.001,
  maxit = 1000,
  stepsize = 0.001,
  verbose = FALSE
)

Arguments

X

[matrix] Design matrix

y

[vector] Observed response vector

k

[numeric] Number of folds - default is 5

algorithm

[string] "sd" for steepest descent method; "gd" for gradient descent method

tol

[numeric] Tolerance for stopping criteria

maxit

[numeric] Maximum number of iterations for stopping criteria

stepsize

[numeric] Stepsize - not used for steepest descend method

verbose

[logical]

Value

[numeric] The k-fold cross-validation MSE - Mean Squared Error


LGhilotti/CLLPackage documentation built on April 23, 2022, 3:48 a.m.