Ensemble: Ensemble Creation

Description Usage Arguments Value Examples

View source: R/Ensembling.R

Description

This function takes models and turns them into a combined Ensemble

Usage

1
2
Ensemble(model.list, voting.type, weights = "none", test.set = "none",
  train.type = "Balanced Accuracy")

Arguments

model.list

The models to be used in the Ensemble

voting.type

The voting type of the Ensemble (average vote, majority vote, or majority weight)

weights

A vector of length as long as the model.list containing numeric percent values c(.76, .56, etc.) to be used for a weighted vote Ensemble. For auto calculation, leave this blank and provide a test set. If the Ensemble is not using majority weighting, then both this field and the test.set field are optional.

test.set

The data test set so that weights could be gathered from the models. Not needed if weights are given.

train.type

The metric to be used in getting model weights. Not needed if weights are given.

Value

An Ensemble Object

Examples

1
2
3
4
5
6
# prepare a binary classification dataset
iris <- PrepareIris()
# create the models
comp <- GetModelComparisons(iris[,1:4], iris[,5])
# use the models in the comparison to form a one model Ensemble
ensem <- Ensemble(comp$model.list, "majorityWeight", iris[,1:4], iris[,5])

orionw/BestModel documentation built on Aug. 17, 2019, 7:29 p.m.