RRotF: Fit a Random Rotation Forest.

Description Usage Arguments Value Author(s) References See Also Examples

Description

Fit a Random Rotation Forest using randomised trees with orthogonal or oblique splits as base learners.

Usage

1
2
RRotF(x, y, K = round(ncol(x)/3, 0), L = 10, mtry = floor(sqrt(ncol(x))),
  model = "log", ...)

Arguments

x

Training data input matrix.

y

Training data response.

K

The number of variable subsets. The default is the value K that results in three features per subset.

L

The number of base classfiers.

mtry

Number of variables randomly sampled as candidates at each split.

model

Specifies the base learner model: 'rpart' for ordinary classification trees; 'rf' for randomised trees; 'ridge', 'pls', 'log', 'svm' or 'rnd' for randomised trees using oblique splits with the corresponding model.

...

Additional arguments specified to randomForest, rpart or obliqueRF.

Value

A fitted model object of type 'RRotF', which is a list containing base learner fits and PCA loadings.

Author(s)

Arnu Pretorius: arnupretorius@gmail.com

References

Rodriguez, J.J., Kuncheva, L.I., 2006. Rotation forest: A new classifier ensemble method. IEEE Trans. Pattern Anal. Mach. Intell. 28, 1619-1630. doi:10.1109/TPAMI.2006.211

See Also

predict.RRotF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(ElemStatLearn)
library(caret)
data("SAheart")
trainIndex <- createDataPartition(SAheart$chd, p=0.6, list=FALSE)
train <- SAheart[trainIndex,]
test <- SAheart[-trainIndex,]
Xtrain <- train[,-10]
ytrain <- train[,10]
Xtest <- test[,-10]
ytest <- test[,10]
mod <- RRotF(Xtrain, ytrain, model="log")
preds <- predict(mod, Xtest)
error <- mean(preds != ytest)
error

arnupretorius/RRotF documentation built on May 10, 2019, 1:46 p.m.