computeCVError: Compute CV Error (Internal)

View source: R/computeCVError.R

computeCVErrorR Documentation

Compute CV Error (Internal)

Description

Evaluates the cross-validation error of a given active set using a hyper-fast Cholesky solver (with optional Huber IRLS robust fitting) and robust validation loss.

Usage

computeCVError(cv_data, active_set, cv_fit, cv_loss)

Arguments

cv_data

List of fold data (x_train, y_train, x_val, y_val).

active_set

Integer vector of active predictors.

cv_fit

Character. Fitting method: "ls" or "huber" (IRLS).

cv_loss

Character. Loss function: "huber", "trimmed", or "mse".

Value

Numeric. The averaged cross-validation error.


srlars documentation built on Sept. 23, 2026, 5:10 p.m.