cv.spring: Cross-validation function for spring fitting methods.

Description Usage Arguments Value See Also

Description

Function that computes K-fold cross-validated error of a spring fit on a grid of lambda1,lambda2.

Usage

1
2
cv.spring(x, y, K = 5, folds = split(sample(1:nrow(x)), rep(1:K, length =
  nrow(x))), verbose = TRUE, ...)

Arguments

x

matrix of features, possibly sparsely encoded (experimental). Do NOT include intercept.

y

response vector.

K

integer indicating the number of folds. Default is 10.

folds

list of K vectors that describes the folds to use for the cross-validation. By default, the folds are randomly sampled with the specified K. The same folds are used for each values of lambda2.

verbose

logical; indicates if the progression should be displayed. Default is TRUE.

...

additional parameters to overwrite the defaults of the spring fitting procedure. See the corresponding documentation (spring.

Value

A list with two objects of class "criterion" and "model" for which plot methods are available.

See Also

criterion, model, plot,criterion-method, plot,model-method.


jchiquet/spring documentation built on May 18, 2019, 10:22 p.m.