Methods_SSI_CV: SSI_CV methods

Description Usage Arguments Author(s) Examples

Description

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 summary function

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

py

Indicates whether to plot correlation (between observed and predicted) or MSE in y-axis

title

Title of the plot

showFolds

TRUE or FALSE to whether add results for individuals folds

Author(s)

Marco Lopez-Cruz (lopezcru@msu.edu) and Gustavo de los Campos

Examples

 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)     

MarcooLopez/SFSI_data documentation built on April 15, 2021, 10:53 a.m.