Learn R Programming

sodavis (version 0.1)

soda_trace_CV:

Description

This function takes a SODA result variable as input, and calculates the cross-validation error for each step of the SODA procedure.

Usage

soda_trace_CV(xx, yy, res_SODA)

Arguments

xx
The design matrix, of dimensions n * p, without an intercept. Each row is an observation vector.
yy
The response vector of dimension n * 1.
res_SODA
SODA result varaible. See example below.

Examples

Run this code
# Michigan lung cancer dataset (uncomment the code to run)
#data(mich_lung);
#res_SODA = soda(mich_lung_xx, mich_lung_yy, gam=0.5);
#cv_SODA  = soda_trace_CV(mich_lung_xx, mich_lung_yy, res_SODA)
#cv_SODA

Run the code above in your browser using DataLab