Training and predicting¶
This module aims to standardize the training and evaluation procedure.
-
ninolearn.learn.fit.
cross_hindcast
(model, pipeline, model_name)[source]¶ Generate a hindcast from 1962 till today using the models which were trained by the .cross_training() method.
- Parameters
model – The considered model.
pipeline – The data pipeline that already was used before in .cross_training().
-
ninolearn.learn.fit.
cross_training
(model, pipeline, n_iter, **kwargs)[source]¶ Training the model on different training sets in which each time a period corresponing to a decade out of 1962-1971, 1972-1981, …, 2012-last ovserved date is spared.
- Parameters
model – A model that follows the guidelines how a model object should be set up.
pipeline – a function that takes lead time as argument and returns the corresponding feature, label, time and persistance.
save_dir – The prefix of the save directory.
**kwargs –
Arguments that shell be passed to the .set_parameter() method of the provided model.