The SHAP command takes an SQL-inf command as input and outputs a shap value for each row of the output and each column of the input data the inner SQL-inf command. These Shap values can be used to build an explanation of the inner SQL-inf command.
You can read more about how SHAP works and how to get the best out of it in the tutorial on Explainability.
SHAP(<SQL-inf command> [, )
SQL-inf commandis a well-defined SQL-inf command.
clsdefines which class to explain, if the
SQL-inf commanddefines a classification command, like
clsoption is required.
A column for each input feature and each input row with a number representing how much that feature contributed to the outcome of the inner SQL-inf command.
The output columns are named after the input columns with the prefix
Explain how all other fields in the table
customers contributed to the prediction of
churn per row.
SELECT * FROM customers SHAP(PREDICT(churn), cls=1)