Package 'DecorateR'

Title: Fit and Deploy DECORATE Trees
Description: DECORATE (Diverse Ensemble Creation by Oppositional Relabeling of Artificial Training Examples) builds an ensemble of J48 trees by recursively adding artificial samples of the training data ("Melville, P., & Mooney, R. J. (2005) <DOI:10.1016/j.inffus.2004.04.001>").
Authors: Matthias Bogaert
Maintainer: Matthias Bogaert <[email protected]>
License: GPL (>=2)
Version: 0.1.2
Built: 2024-09-25 03:14:06 UTC
Source: https://github.com/matthbogaert/decorater

Help Index


Binary classification with DECORATE (Melville and Mooney, 2005)

Description

DECORATE (Diverse Ensemble Creation by Oppositional Relabeling of Artificial Training Examples) builds an ensemble of J48 trees by recursively adding artificial samples of the training data.

Usage

DECORATE(x, y, C = 15, I = 50, R = 1, verbose = FALSE)

Arguments

x

a data frame of predictor (numeric, integer or factors). Character variables should be transformed to factors.

y

a vector of response labels. Only {0, 1} is allowed.

C

the desired ensemble size. Set to 15 as recommended by Melville and Mooney (2005).

I

the maximum number of iterations. Set to 50 as recommended by Melville and Mooney (2005).

R

the amount of articially generated examples, expressed as a fraction of the number of training examples. R is set to 1, meaning that the number of artificially created samples is equal to the training set size.

verbose

TRUE or FALSE. Should information be printed on the screen?

Value

an object of class DECORATE.

Author(s)

Authors: Matthias Bogaert, Maintainer: [email protected]

References

Melville, P., & Mooney, R. J. (2005). Creating diversity in ensembles using artificial data. Information Fusion, 6(1), 99-111. <doi: 10.1016/j.inffus.2004.04.001>

See Also

predict.DECORATE

Examples

data(iris)
y <- as.factor(ifelse(iris$Species[1:100]=="setosa",0,1))
x <- iris[1:100,-5]
dec <- DECORATE(x = x, y = y)

Predict method for DECORATE objects

Description

Prediction of new data using DECORATE

Usage

## S3 method for class 'DECORATE'
predict(object, newdata, type = "prob", all = FALSE, ...)

Arguments

object

an object of the class DECORATE, as created by the function DECORATE.

newdata

a data frame containing the same predictors as in the training phase.

type

character specifying whether to return the probabilites ('prob') or class ('class'). Default: prob.

all

Return the predictions per tree instead of the average (default = FALSE).

...

Not used currently.

Value

vector containing the response probabilities.

Examples

data(iris)
y <- as.factor(ifelse(iris$Species[1:100]=="setosa",0,1))
x <- iris[1:100,-5]
dec <- DECORATE(x = x, y = y)
predict(object=dec,newdata=x)