GetModelWeights: A helper function used by the Ensemble function. It will take...

Description Usage Arguments Value Examples

View source: R/Ensembling.R

Description

A helper function used by the Ensemble function. It will take the given inputs and build the weights for each of the models. This function mostly just handles different cases and error checking and calls another function to get the weights data.

Usage

1
GetModelWeights(ensemble, weights, test.set, train.type)

Arguments

ensemble

The training data to build the models.

weights

Either a given vector of weights, or the value "none".

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

A vector containg weights for the Ensemble's models.

Examples

1
2
# This function is used by Ensemble. It's usage is as follows:
# ensemble$weight.list = GetModelWeights(ensemble, weights, test.set, train.type)

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