Explain Model Action Set

Required Specifications

The following specifications are required in order to run the shapleyExplainer action:

  • An input data table. Typically, this is the data table that you use to train the model.

  • A list of input variables. These are the model inputs that are used in training the model. Inputs can be interval or nominal, but you must identify any numeric inputs that you want to treat as nominal by using the nominals parameter. String variables are always treated as nominal.

  • An input data table that has row, known as the query table. This row is the observation that acts as the focus of the model explanation.

  • A scoring function. You must provide either an analytic store, several analytic stores and DS2 code, or DATA step score code that is created by the modeling algorithm.

  • A predicted target variable. This is the output variable that contains the model’s predictions when the scoring function is applied to the input data table. The values of the variable can represent numeric predictions or predicted probabilities for an interval or nominal target, respectively. In many SAS Viya machine learning models, the name of the variable is constructed as follows: for an interval target, "P_" is prefixed to the name of the target variable (for example, "P_MSRP"); for a nominal target, "P_" is prefixed to the name of the target variable, and the value that corresponds to the target event is appended (for example, "P_Bad1").

Last updated: August 04, 2026