OTProb {OTE} | R Documentation |
Train the ensemble of optimal trees for class membership probability estimation.
Description
This function selects optimal trees for class membership probability estimation from a total of t.initial
trees grown by random forest. Number of trees in the initial set, t.initial
, is specified by the user. If not specified then the default t.initial = 1000
is used.
Usage
OTProb(XTraining, YTraining, p = 0.2, t.initial = NULL,
nf = NULL, ns = NULL, info = TRUE)
Arguments
XTraining |
An |
YTraining |
A vector of length |
p |
Percent of the best |
t.initial |
Size of the initial set of probability estimation trees. |
nf |
Number of features to be sampled for spliting the nodes of the trees. If equal to |
ns |
Node size: Minimal number of samples in the nodes. If equal to |
info |
If |
Details
Large values are recommended for t.initial
for better performance as possible under the available computational resources.
Value
A trained object consisting of the selected trees.
Note
Prior action needs to be taken in case of missing values as the fuction can not handle them at the current version.
Author(s)
Zardad Khan <zkhan@essex.ac.uk>
References
Khan, Z., Gul, A., Perperoglou, A., Miftahuddin, M., Mahmoud, O., Adler, W., & Lausen, B. (2019). Ensemble of optimal trees, random forest and random projection ensemble classification. Advances in Data Analysis and Classification, 1-20.
Liaw, A. and Wiener, M. (2002) “Classification and regression by random forest” R news. 2(3). 18–22.
See Also
Predict.OTProb
, OTReg
, OTClass
Examples
#load the data
data(Body)
data <- Body
#Divide the data into training and test parts
set.seed(9123)
n <- nrow(data)
training <- sample(1:n,round(2*n/3))
testing <- (1:n)[-training]
X <- data[,1:24]
Y <- data[,25]
#Train OTClass on the training data
Opt.Trees <- OTProb(XTraining=X[training,],YTraining = Y[training],t.initial=200)
#Predict on test data
Prediction <- Predict.OTProb(Opt.Trees, X[testing,],YTesting=Y[testing])
#Objects returned
names(Prediction)
Prediction$Brier.Score
Prediction$Estimated.Probabilities