AdditiveModelForecastFitAndSave

class hana_ai.tools.hana_ml_tools.additive_model_forecast_tools.AdditiveModelForecastFitAndSave(connection_context: ConnectionContext, return_direct: bool = False)

This tool is used to fit and predict the additive model forecast.

Parameters:
connection_contextConnectionContext

Connection context to the HANA database.

Returns:
str

The result string containing the training table name, model storage name, and model storage version.

Note

args_schema is used to define the schema of the inputs as follows:

Field

Description

fit_table

The name of the table containing the training data.

fit_schema

The schema of the fit_table, it is optional.

key

The key column in the training table.

endog

The endogenous variable column in the training table.

exog

External regressors to include in the model.

holiday_table

The name of the table containing holiday data, it is optional.

holiday_schema

The schema of the holiday_table, it is optional.

name

The name of the model to save.

version

The version of the model to save.

categorical_variable

The categorical variable columns in the training table.

growth

The growth of the model chosen from {'linear', 'logistic'}.

logistic_growth_capacity

The logistic growth capacity of the model only valid when growth is 'logistic'.

seasonality_mode

The seasonality mode of the model chosen from {'additive', 'multiplicative'}.

period

The period of the seasonality or a list of periods.

num_changepoints

The number of changepoints in the model.

changepoint_range

The proportion of history in which trend changepoints will be estimated.

regressor

Specifies the regressor in a list of json such that ['{"NAME": "X1", "PRIOR_SCALE":4, "MODE": "additive" }'].

changepoints

Specifies a list of changepoints in the format of timestamp, such as ['2019-01-01 00:00:00, '2019-02-04 00:00:00'].

yearly_seasonality

Specifies whether or not to fit yearly seasonality chosen from {'auto', 'false', 'true'}.

weekly_seasonality

Specifies whether or not to fit weekly seasonality chosen from {'auto', 'false', 'true'}.

daily_seasonality

Specifies whether or not to fit daily seasonality chosen from {'auto', 'false', 'true'}.

seasonality_prior_scale

The parameter modulating the strength of the seasonality model.

holiday_prior_scale

The parameter modulating the strength of the holiday model.

changepoint_prior_scale

The parameter modulating the flexibility of the automatic changepoint selection.

name: str

Name of the tool.

description: str

Description of the tool.

connection_context: ConnectionContext

Connection context to the HANA database.