regal: Regression EPE for All Implemented Methods

Description Usage Arguments Value Author(s) See Also Examples

View source: R/regal.R

Description

Determine EPE for many regression methods.

Usage

1
2
regal(X, y, MaxIter = 1000, d = "default", NCores = 1, plotBest = 6, 
	verboseQ = FALSE)

Arguments

X

input matrix of dimension n-by-p with p<n

y

output vector

MaxIter

Number of CV iterations.

d

Size of hold-out sample.

NCores

Number of cores to use for parallel processing.

plotBest

Number of EPE's to include on plot

verboseQ

True, display progress, otherwise silent. When running R in Windows, the usual default is output buffering which means you will not see the extra output generated from verboseQ=TRUE until after regal() has finished. To see the output while this function is running you need to turn output buffering off. This can be done with the short-cut Ctrl-W. Another way to do this is to use the R Gui. Select Misc and the click on buffered output.

Value

A barplot is produced and matrix returned with rows corresponding to method and columns containing EPE, sd(EPE), snr and two correlation estimates between forecast and true value.

Author(s)

A. I. McLeod

See Also

gcv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#about 200 seconds
## Not run: 
  data(prostate)
  X <- as.matrix.data.frame(prostate[,-9])
  y <- prostate[,9]
  system.time(m<-regal(X, y, MaxIter=1000, d=10, NCores=8, verboseQ=TRUE))[3]
  ind <- rev(order(m[,6]))
  dotchart(m[ind,6], pch=19, cex=0.5, bg=rgb(1,1,0,0.4),
       color="blue", main="CPU times")

## End(Not run)

gencve documentation built on May 29, 2017, 7:12 p.m.