<model_name>!SHOW_EVALUATION_METRICS

返回样本外评估指标。

If you need to select specific columns from the data returned by this method, you can call the method in the FROM clause of a SELECT statement. See Selecting columns from SQL class instance methods that return tabular data.

语法

您可以调用此方法来检索模型训练时生成的交叉验证指标,也可以调用训练时不可用的其他数据(样本外数据),并根据模型对该数据的预测程度来接收指标。

返回训练时生成的时间序列交叉验证指标:

These metrics are available only if evaluate=TRUE in the CONFIG_OBJECT during model construction (this is the default).

<model_name>!SHOW_EVALUATION_METRICS();

根据其他样本外数据计算交叉验证指标:

<model_name>!SHOW_EVALUATION_METRICS(
  INPUT_DATA => <input_data>,
  [ SERIES_COLNAME => '<series_colname>', ]
  TIMESTAMP_COLNAME => '<timestamp_colname>',
  TARGET_COLNAME => '<target_colname>',
  LABEL_COLNAME => '<label_column_name>',
  [ CONFIG_OBJECT => <config_object> ]
);

实参

以下实参仅适用于其他样本外数据用例。

必填:

并非每个用例都需要以下所有实参。

INPUT_DATA => input_data

A reference to a table, view, or query that contains the future timestamps and values of the target and any exogenous variables used during training. Columns are matched between this argument and the original exogenous training data by name.

To create this reference, you can use the TABLE keyword with the table name, view name, or query, or you can call the SYSTEM$REFERENCE or SYSTEM$QUERY_REFERENCE function.

TIMESTAMP_COLNAME => 'timestamp_colname'

Name of the column containing the timestamps in input_data.

TARGET_COLNAME => 'target_colname'

Name of the column containing the target (dependent value) in input_data.

LABEL_COLNAME => 'label_column_name'

Name of the column containing the labels for the data. Labels are Boolean (true/false) values indicating whether a given row is a known anomaly. If you do not have labeled data, pass an empty string ('') for this argument.

可选:

SERIES_COLNAME => 'series_colname'

Name of the column in input_data specifying the series.

CONFIG_OBJECT => config_object

An OBJECT containing key-value pairs used to configure the evaluation job.

KeyTypeDefaultDescription
prediction_intervalFLOAT0.99

大于或等于 0.0 且小于 1.0 的值。默认值为 0.95,这代表未来有 95% 的点预计会落在预测结果得出的区间 [lower_bound, upper_bound] 内。

on_errorSTRING'ABORT'

指定错误处理方法的字符串(常量)。这在预测多个序列时最有用。支持的值包括:

  • 'abort': Abort the model forecasting operation if an error is encountered in any time series.
  • 'skip': Skip any time series where forecasting encounters an error. This allows forecasting to succeed for other time series. Series that fail are absent from the model output.

输出

ColumnTypeDescription
SERIESVARIANTSeries value (NULL if model was trained with single time series).
ERROR_METRICVARCHAR

使用的错误指标的名称。该方法会返回以下指标:

点指标:

  • MAE: Mean Absolute Error.
  • MAPE: Mean Absolute Percentage Error.
  • MDA: Mean Directional Accuracy.
  • MSE: Mean Squared Error.
  • SMAPE: Symmetric Mean Absolute Percentage Error.

Interval Metrics: These metrics use the prediction_interval argument from the Evaluation configuration.

LOGSVARIANTContains error or warning messages.