SSI_CV methods
Useful methods for retrieving, summarizing and visualizing important results from an object of the class 'SSI_CV'
## S3 method for class 'SSI_CV' summary(object, ...) ## S3 method for class 'SSI_CV' plot(..., py=c("accuracy","MSE"), title=NULL, showFolds=FALSE)
object |
An object of the class 'SSI_CV' |
... |
Arguments to be passed:
|
py |
(character) Either 'accuracy' or 'MSE' to plot the correlation between observed and predicted values or the mean squared error, respectively, in the y-axis |
title |
(character/expression) Title of the plot |
showFolds |
|
Method summary
returns a list object containing:
lambda
: (matrix) sequence of (average across folds) values of lambda (in columns) used in each CV partition (in rows).
df
: (matrix) degrees of freedom (average across folds) at each solution associated to each value of lambda for each CV partition (in rows).
accuracy
: (matrix) correlation between observed and predicted values (average across folds) given by each value of lambda (in columns) in each CV partition (in rows).
MSE
: (matrix) mean squared error (average across folds) given by each value of lambda (in columns) in each CV partition (in rows).
optCOR
: (matrix) summary of the SSI with maximum accuracy within and across CV partitions (in rows).
optMSE
: (matrix) summary of the SSI with minimum MSE within and across CV partitions (in rows).
Method plot
creates a plot of either accuracy or MSE versus the (average across folds and partitions) number of predictors (with non-zero regression coefficient) and versus lambda.
Marco Lopez-Cruz (maraloc@gmail.com) and Gustavo de los Campos
require(SFSI) data(wheatHTP) X = scale(X[1:200,])/sqrt(ncol(X)) # Subset and scale markers G = tcrossprod(X) # Genomic relationship matrix y = as.vector(scale(Y[1:200,"YLD"])) # Subset response variable fm1 = SSI_CV(y,K=G,trn=31:length(y),nFolds=5,nCV=1) out = summary(fm1) # Useful results out$accuracy # Testing set accuracy (cor(y,yHat)) out$optCOR # SSI with maximum accuracy out$optMSE # SSI with minimum MSE plot(fm1,title=expression('corr('*y[obs]*','*y[pred]*') vs sparsity')) plot(fm1,showFolds=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.