Learn R Programming

srlars (version 2.0.0)

computeCVError: Compute Cross-Validated Prediction Error (Internal)

Description

Computes the V-fold CV error for a linear regression model using fast LS fitting.

Usage

computeCVError(x, y, active_set, folds = 5)

Value

A single numeric value (Mean Squared Prediction Error).

Arguments

x

Design matrix (imputed).

y

Response vector (imputed).

active_set

Indices of predictors to include.

folds

Number of folds (default 5).