Learn R Programming

gencve (version 0.3)

regal: Regression EPE for All Implemented Methods

Description

Determine EPE for many regression methods.

Usage

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

Arguments

X
input matrix of dimension n-by-p with p
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.

See Also

gcv

Examples

Run this code
#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)

Run the code above in your browser using DataLab