createEnsemble | R Documentation |
Combine the predictions of multiple models
createEnsemble( model.list, ensemble_method = "weighted_mean", metric = NULL, calc.pred = FALSE ) ## S3 method for class 'ensemble.train' predict(object, newdata = NULL, scale = TRUE, type = "raw", ...)
model.list |
A list of models returned by |
ensemble_method |
One of 'mean', 'median', 'weighted_mean' and 'number_votes'. Check details. |
metric |
A metric to use to calculate weights. Only used if |
calc.pred |
logical. Calculate predictions for training data? If |
object |
A object returned by |
newdata |
A data.frame containing data to predict. |
scale |
logical. Scale predictions of each model between 0 and 1 before ensemble? |
type |
One of "raw" or "prob". |
... |
Further arguments passed to |
You can create a ensemble model based on predictions of multiple models. The ensemble prediction is calculated based on the ensemble_method:
mean
- models mean prediction.
median
- models median prediction.
weighted_mean
- models weighted mean prediction. Weighs are based on the metric
,
so models with higher metric have more weight in the mean.
number_votes
- The number of predictions of the first class (considered positive or presence) is
divided by the number of models. When the prediction is close to 1, it means that all models
agree to predict the first class. Only models of type "Classification" are supported.
For classification, the probability of predictions is used to create the ensemble.
An S3 object of classes "ensemble.train" that also inherits "train".
This object can be used in other functions, like evaluate
or confidence_map
.
confidence_map
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.