Description Usage Arguments Value Examples
Constructs an ensemble of classifier chains, each chain using a user-supplied base classifier.
1 2 |
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. |
... |
additional arguments to pass to |
An object of class ECC
containing:
y_labels
: names of the columns of y
fits
: An list of length m
, each element being a set of
classifier chains - a list of length L = ncol(y)
where each element
is a fitted model object trained to predict each of the L
labels.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.