Combine classification models into an ensemble
Arguments
- sm
a
splendid_model
object- data
data frame with rows as samples, columns as features
- class
true/reference class vector used for supervised learning
- top
the number of highest-performing algorithms to retain for ensemble
- seed_rank
random seed used for reproducibility in rank aggregation of ensemble algorithms
- rfe
logical; if
TRUE
, run Recursive Feature Elimination as a feature selection method for "lda", "rf", and "svm" algorithms.- sequential
logical; if
TRUE
, a sequential model is fit on the algorithms that had the best performance with one-vs-all classification.
Examples
dat <- iris[, 1:4]
class <- iris$Species
sm <- splendid_model(dat, class, n = 3, algorithms = c("xgboost", "slda"))
se <- splendid_ensemble(sm, dat, class)