Methods_SSI_CV: SSI_CV methods

Description Usage Arguments Value Author(s) Examples

Description

Useful methods for retrieving, summarizing and visualizing important results from an object of the class 'SSI_CV'

Usage

1
2
3
4
5
## S3 method for class 'SSI_CV'
summary(object, ...)

## S3 method for class 'SSI_CV'
plot(..., py=c("accuracy","MSE"), title=NULL, showFolds=FALSE)

Arguments

object

An object of the class 'SSI_CV'

...

Arguments to be passed:

  • Not needed for method summary

  • object: One or more objects of the class 'SSI_CV' (for method plot)

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

TRUE or FALSE to whether add results for individuals folds

Value

Method summary returns a list object containing:

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.

Author(s)

Marco Lopez-Cruz (maraloc@gmail.com) and Gustavo de los Campos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  require(SFSI)
  data(wheatHTP)
  
  index = which(Y$CV %in% 1:2)        # Use only a subset of data
  M = scale(M[index,])/sqrt(ncol(M))    # Subset and scale markers
  G = tcrossprod(M)                     # Genomic relationship matrix
  y = as.vector(scale(Y[index,"E1"]))   # Subset ans scale response variable
 
  trn = seq(1,length(y),by=2)
  fm1 = SSI_CV(y,K=G,trn=trn,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)     

SFSI documentation built on Oct. 1, 2021, 1:08 a.m.