AccuracyMeasure
- class hana_ai.tools.hana_ml_tools.ts_accuracy_measure_tools.AccuracyMeasure(connection_context: ConnectionContext, return_direct: bool = False)
This tool calculates the accuracy measure for the time series forecast.
- Parameters:
- connection_contextConnectionContext
Connection context to the HANA database.
- Returns:
- str
The accuracy measure result in JSON format.
Note
args_schema is used to define the schema of the inputs as follows:
Field
Description
predict_table
The name of the prediction result table.
actual_table
The name of the actual result table.
predict_key
The key column name of the prediction result.
actual_key
The key column name of the actual result.
predict_target
The target column name of the prediction result.
actual_target
The target column name of the actual result.
predict_schema
The schema of the prediction table, it is optional
actual_schema
The schema of the actual table, it is optional
evaluation_metric
The accuracy measures to compute. It could be one or a list of the following options: 'mpe', 'mse', 'rmse', 'et', 'mad', 'mase', 'wmape', 'smape', 'mape' and 'spec'.
ignore_zero
Specifies whether or not to ignore zero values when calculating accuracy measure 'mpe' or 'mape'. It is optional.
alpha2
Specifies the unit stock-keeping cost parameter of accuracy measure 'spec'.
alpha1
Specifies the unit opportunity cost parameter of accuracy measure 'spec'.
- name: str
Name of the tool.
- description: str
Description of the tool.
- connection_context: ConnectionContext
Connection context to the HANA database.