ecc {MLPUGS} | R Documentation |
Fit an Ensemble of Classifier Chains (ECC)
Description
Constructs an ensemble of classifier chains, each chain using a user-supplied base classifier.
Usage
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:
|
prop_subset |
The proportion of the training data to utilize when
|
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. If not supplied, the trainer will use the built-in classifier. See Details for more information. |
... |
additional arguments to pass to |
Value
An object of class ECC
containing:
-
y_labels
: names of the columns ofy
-
fits
: An list of lengthm
, each element being a set of classifier chains - a list of lengthL = ncol(y)
where each element is a fitted model object trained to predict each of theL
labels.
Examples
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)