ecc: Fit an Ensemble of Classifier Chains (ECC)

Description Usage Arguments Value Examples

View source: R/ecc.R

Description

Constructs an ensemble of classifier chains, each chain using a user-supplied base classifier.

Usage

1
2
ecc(x, y, m = 5, prop_subset = 0.95, run_parallel = FALSE,
  silent = TRUE, .f = NULL, ...)

Arguments

x

A data frame or matrix of features.

y

A data frame or matrix of labels. Each label must be its own column and each instance (observation) must be a row of 0s and 1s, indicating which labels belong to the instance.

m

Number of classifier chains (models) to train. Recommended: m = 3 and m = 7 for 4-core and 8-core systems, respectively.

prop_subset

The proportion of the training data to utilize when m is greater than 1. Each set of classifier chains in the ensemble will use a random subset (95% by default) of the supplied training data.

run_parallel

Whether to utilize multicore capabilities of the system.

silent

Whether to print progress messages to console. Recommended.

.f

User-supplied classifier training function.

...

additional arguments to pass to .f.

Value

An object of class ECC containing:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x <- movies_train[, -(1:3)]
y <- movies_train[, 1:3]

fit <- ecc(x, y, m = 1, .f = glm.fit, family = binomial(link = "logit"))

## Not run: 

fit <- ecc(x, y, .f = randomForest::randomForest)

fit <- ecc(x, y, m = 7, .f = C50::C5.0, trials = 10)

## End(Not run)

bearloga/MLPUGS documentation built on March 7, 2020, 11:02 a.m.