RPParallel {RPEnsemble} | R Documentation |
Chooses a projection from each block in parallel
Description
Makes B1
calls to RPChoose
or RPChooseSS
in parallel and returns the results as a matrix.
Usage
RPParallel(XTrain, YTrain, XVal, YVal, XTest, d, B1 = 500, B2 = 50,
base = "LDA",projmethod = "Gaussian", estmethod = "training", k = c(3,5,9),
clustertype = "Default", cores = 1, machines = NULL, seed = 1, ... )
Arguments
XTrain |
An |
YTrain |
A vector of length |
XVal |
An |
YVal |
A vector of length |
XTest |
An |
d |
The lower dimension of the image space of the projections |
B1 |
The number of blocks |
B2 |
The size of each block |
base |
The base classifier one of |
k |
The options for |
projmethod |
|
estmethod |
Method for estimating the test errors to choose the projection: either training error |
clustertype |
The type of cluster: |
cores |
Required only if |
machines |
Required only if |
seed |
If not |
... |
Optional further arguments if |
Details
Makes B1
calls to RPChoose
or RPChooseSS
in parallel.
Value
If estmethod == "training"
or "loo"
, then returns an n+n.test
by B1
matrix, each row containing the result of a call to RPChoose
. If estmethod == "samplesplit"
, then returns an n.val+n.test
by B1
matrix, each row containing the result of a call to RPChooseSS
.
Author(s)
Timothy I. Cannings and Richard J. Samworth
References
Cannings, T. I. and Samworth, R. J. (2017) Random-projection ensemble classification, J. Roy. Statist. Soc., Ser. B. (with discussion), 79, 959–1035
See Also
Examples
Train <- RPModel(1, 50, 100, 0.5)
Test <- RPModel(1, 100, 100, 0.5)
Out <- RPParallel(XTrain = Train$x, YTrain = Train$y, XTest = Test$x, d = 2, B1 = 10,
B2 = 10, base = "LDA", projmethod = "Haar", estmethod = "training")
colMeans(Out)