splendid_ensemble: Combine classification models into an ensemble

View source: R/splendid_ensemble.R

splendid_ensembleR Documentation

Combine classification models into an ensemble

Description

Combine classification models into an ensemble

Usage

splendid_ensemble(
  sm,
  data,
  class,
  top = 3,
  seed_rank = 1,
  rfe = FALSE,
  sequential = FALSE
)

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)

AlineTalhouk/splendid documentation built on Feb. 23, 2024, 9:37 p.m.