ForeTiS.model._stat_model
Module Contents
Classes
Parent class based on BaseModel for all models with a statsmodels-like API to share functionalities. |
- class ForeTiS.model._stat_model.StatModel(optuna_trial, datasets, featureset_name, optimize_featureset, current_model_name=None, target_column=None, pca_transform=None)
Bases:
ForeTiS.model._base_model.BaseModel
,abc.ABC
Parent class based on BaseModel for all models with a statsmodels-like API to share functionalities. See
BaseModel
for more information.- Parameters:
- retrain(retrain)
Implementation of the retraining for models with statsmodels-like API. See
BaseModel
for more information.- Parameters:
retrain (pandas.DataFrame) –
- update(update, period)
Update existing model due to new samples. See
BaseModel
for more information.- Parameters:
update (pandas.DataFrame) –
period (int) –
- predict(X_in)
Implementation of a prediction based on input features for models with statsmodels-like API. See
BaseModel
for more information.- Parameters:
X_in (pandas.DataFrame) –
- Return type:
numpy.array
- train_val_loop(train, val)
Implementation of a train and validation loop for models with statsmodels-like API. See
BaseModel
for more information.- Parameters:
train (pandas.DataFrame) –
val (pandas.DataFrame) –
- Return type:
numpy.array
- get_transformed_set(df, target_column, transf, power_transformer, only_transform=False)
Function returning dataset with (log or power) transformed column
- Parameters:
- Returns:
dataset with transformed column
- Return type:
pandas.DataFrame
- get_inverse_transformed_set(y, transf, power_transformer, is_conf=False)
Function returning inverse (log or power) transformed column