plot.cv_glasso: plot the cross-validation curve produced by "'cv_glasso'"

Description Usage Arguments Value Author(s) References Examples

Description

Plots the cross-validation curve as a function of the lambda values used.

Usage

1
2
## S3 method for class 'cv_glasso'
plot(x, type.measure = "auc", ...)

Arguments

x

fitted "cv_glasso" object

type.measure

criteria to use for cross-validation. Currently three options. The default is type.measure = "auc" which gives area under the ROC curve. type.measure = "loglike" computes the log-likelihood score in Meier et al2008. type.measure = "maxco" computes the maximum correlation coefficient in Yeo and Burge.

Value

A plot is produced, and nothing is returned.

Author(s)

Hui Lin, longqiman@gmail.com

References

L. Meier, S. van de Geer, and P. Buhlmann, The group lasso for logistic regression, J. R. Stat. Soc. Ser. B Stat. Methodol. 70 (2008), pp. 53-71.

G.W. Yeo and C.B. Burge, Maximum entropy modeling of short sequence motifs with applications to RNA splicing signals, J. Computnl Biol. 11 (2004), pp. 475-494.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
data("sim1_da1")
trainx = dplyr::select(sim1_da1, -y)
trainy = sim1_da1$y
# index of the group
index <- gsub("\\..*", "", names(trainx))
# nlam is the number of values of tuning variable
nlam <- 10
# type of prediction
type = "link"
# number of cross-validation folds
kfold <- 10
cv.fit <- cv_glasso(trainx, trainy, nlam = nlam, kfold = kfold)
plot.cv_glasso(cv.fit)

## End(Not run)

happyrabbit/DataScienceR documentation built on May 17, 2019, 2:41 p.m.