Description Usage Arguments Author(s) Examples
'summary'
: Returns accuracy, MSE, df, achieved by each value of the vector lambda. These values are averages across folds and partitions. Also returns summary for the SSI with maximum accuracy and with minimum MSE.
'plot'
: Creates a plot of either accuracy or MSE versus the (average) number of predictors and versus lambda (in negative logarithm) averaged across folds and partitions.
1 2 3 4 5 |
object |
An object of the class 'SSI_CV' |
... |
Arguments to be passed:
|
py |
Indicates whether to plot correlation (between observed and predicted) or MSE in y-axis |
title |
Title of the plot |
showFolds |
|
Marco Lopez-Cruz (lopezcru@msu.edu) and Gustavo de los Campos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require(SFSI)
data(wheatHTP)
X = scale(X[1:300,]) # Subset and scale markers
G = tcrossprod(X)/ncol(X) # Genomic relationship matrix
y = scale(Y[1:300,"YLD"]) # Subset response variable
fm1 = SSI_CV(y,K=G,trn.CV=101:length(y),nFolds=10,nCV=1)
yHat = fitted(fm1) # Predicted values for each SSI
corTST = summary(fm1)$accuracy # Testing set accuracy (cor(y,yHat))
summary(fm1)$optCOR # SSI with maximum accuracy
summary(fm1)$optMSE # SSI with minimum MSE
plot(fm1,title=expression('corr('*y[obs]*','*y[pred]*') vs sparsity'))
plot(fm1,py="MSE",title='Mean Square Error vs sparsity')
plot(fm1,showFolds=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.