ML_EXPLAIN_TABLE
explains predictions for an entire table of unlabeled data and
saves results to an output table.
ML_EXPLAIN_TABLE
is a compute intensive process. Limiting operations to batches
of 10 to 100 rows by splitting large tables into smaller
tables is recommended.
ML_EXPLAIN_TABLE
limits explanations to the 100 most relevant features.
A loaded model is required to run
ML_EXPLAIN_TABLE
.
See Section 3.7.2, “Loading Models”.
CALL sys.ML_EXPLAIN_TABLE(table_name, model_handle, output_table_name);
ML_EXPLAIN_TABLE
parameters:
table_name
: Specifies the fully qualified name of the input table (schema_name.table_name
). The input table should contain the same feature columns as the table used to train the model but no target column.model_handle
: Specifies the model handle or a session variable containing the model handle.output_table_name
: Specifies the table where explanation data is stored. The table is created if it does not exist. A fully qualified table name must be specified (schema_name.table_name
). If the table already exists, an error is returned.
-
The following example generates explanations for a table of data. The
ML_EXPLAIN_TABLE
call specifies the fully qualified name of the table to generate explanations for, the session variable containing the model handle, and the fully qualified output table name. TheSELECT
statement retrieves explanation data from the output table.CALL sys.ML_EXPLAIN_TABLE('ml_data.iris_test', @iris_model, 'ml_data.iris_explanations'); SELECT * FROM ml_data.iris_explanations;