RotationForest: Defines the constructor for the rotationForest module

Description Usage Arguments Value Examples

Description

Requires the dependent and response values (data frames), the number of predictor variables to use in each rotation, the number of trees to train, and a logical for determining if progress should be printed

Usage

1
rotationForest(xdf, ydf, npredictor, ntree = 10, verbose = F, ...)

Arguments

xdf

a data frame of X dependent vectors

ydf

a data frame of Y response values

npredictor

the number of predictor variables that are to be used in each rotation

ntree

the number of trees that are to be used to train the ensemble

verbose

a logical, set true for classification output to be printed

...

extra variables to be passed on to the rpart function

Value

an object of class rotationForest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fpath <- system.file("extdata", "balance-scale.data", package="rotationForest")
data <- read.table(fpath, sep = ",", header = FALSE)
data.dependent <- data[,-1]
data.response <- data[,1]
data.response <- as.factor(data.response)
total <- data.frame(data.response, data.dependent)
groups <- sample(rep(1:10, times = ceiling(nrow(total) / 19)), size = nrow(total), replace = TRUE)
data.train <- total[!groups %in% 1,]
data.test <- total[groups %in% 1,]
fit <- rotationForest(data.train[,-1], data.train[,1], 2, 10)

mananshah99/rotationforest documentation built on May 21, 2019, 11:23 a.m.