Adapts the result of train() to an input to predict().

Description

At the moment FIT::train() returns a nested list of trained models but FIT::predict() expects to receive them as a flat list. This ugly adaptor is provided in order to prepare for future changes in this implementation detail.

Usage

1
train.to.predict.adaptor(models)

Arguments

models

A collection of trained models as is returned by FIT::train().

Value

A collection of trained models in a form appropriate for the consumption by FIT::predict().

Examples

1
2
3
4
5
6
## Not run: 
models <- FIT::train(..)
models2 <- train.to.predict.adaptor(models)
predictions <- FIT::predict(models2, ..)

## End(Not run)