RPEnsembleClass {RPEnsemble} | R Documentation |
Classifies the test set using the random projection ensemble classifier
Description
Performs a biased majority vote over B1
base classifications to assign the test set.
Usage
RPEnsembleClass(RP.out, n , n.val, n.test, p1, samplesplit, alpha, ...)
Arguments
RP.out |
The result of a call to |
n |
Training set sample size |
n.test |
Test set sample size |
n.val |
Validation set sample size |
p1 |
Prior probability estimate |
samplesplit |
|
alpha |
The voting threshold |
... |
Optional further arguments if |
Details
An observation in the test set is assigned to class 1 if B1*alpha
or more of the base classifications are class 1 (otherwise class 2).
Value
A vector of length n.test
containing the class predictions of the test set (either 1 or 2).
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 = 50, B2 = 10, base = "LDA", projmethod = "Haar",
estmethod = "training", clustertype = "Default")
Class <- RPEnsembleClass(RP.out = Out, n = length(Train$y),
n.test = nrow(Test$x), p1 = sum(Train$y == 1)/length(Train$y),
splitsample = FALSE, alpha = RPalpha(Out, Y = Train$y,
p1 = sum(Train$y == 1)/length(Train$y)))
mean(Class != Test$y)
[Package RPEnsemble version 0.5 Index]