forecastflowml.ForecastFlowML#
- class forecastflowml.ForecastFlowML(id_col, group_col, date_col, target_col, date_frequency, max_forecast_horizon, model_horizon, model, categorical_cols=None, use_lag_range=0)[source]#
Create forecaster Instance
- Parameters:
id_col (str) – Time series identifer column.
group_col (str) – Column to partition the dataframe.
date_col (str) – Date column.
target_col (str) – Target column.
date_frequency (str) – Date frequency of the dataframe.
model_horizon (int) – Forecast horizon for a single model.
max_forecast_horizon (int) – Maximum horizon to generate the forecast. Needs to be multiple of
model_horizon.model (sklearn.base.BaseEstimator) – Regressor compatible with
scikit-learnAPI.categorical_cols (Optional[List[str]]) – List of columns to treat as categorical.
use_lag_range (int) – Extra lag range to use in addition to allowed lag values.
Methods
cross_validate(df[, n_cv_splits, ...])Time series cross validation predictions
get_feature_importance([df_model])The feature importances.
grid_search(df, param_grid[, n_cv_splits, ...])Grid search with time series cross validation.
predict(df[, trained_models, spark])Make predictions
train(df[, local_result])Train models
Attributes
Trained models in pickled format