GAMCR.trainer.trainer module#

GAMCR.trainer.trainer.ReLU(x, delta=0.001)[source]#
class GAMCR.trainer.trainer.Trainer[source]#

Bases: object

A class with the algorithm to optimize the model’s parameters.

L#

number of basis functions on which the transfer function is decomposed - it is also equal to the number of GAMs considered in our model

Type:

int

n_splines#

number of splines used for one GAM

Type:

int

lam#

regularization parameter related to the smoothing penalty in the GAM

Type:

positive float

trainer(ls_X, ls_modelmat, Y, dates=None, lr=1e-3, max_iter=200, warm_start=False, save_folder=None, name_model='', normalization_loss=1, lam_global=0)[source]#

Optimize the model parameters, savong the optimized model along the iterations.

trainer(ls_X, ls_modelmat, Y, dates=None, lr=0.001, max_iter=200, warm_start=False, save_folder=None, name_model='', normalization_loss=1, lam_global=0)[source]#