Initialize a new KernelSHAP explainer.
The trained model to explain
The background data
Optional random seed in the range [0, 1)
Background data
Expected prediction value
Kernel weights for each coalition sample [nSamples, 1]
Mask used in the last run [nSamples]
Random seed
Matrix to store the feature masks [nSamples, nVaryFeatures]
Prediction model
Number of features
Number of coalition samples added
Dimension of the prediction output
Model's prediction on the background ata
Uniform random number generator
Uniform random integer generator
Sampled data in a matrix form. It is initialized after the explain() call. [nSamples * nBackground, nFeatures]
Column indexes that the explaining x has different column value from at least ont instance in the background data.
Expected model predictions on the sample data [nSamples, nTargets]
Model prediction outputs on the sampled data [nSamples * nBackground, nTargets]
Estimate SHAP values of the given sample x
One data sample
Number of coalitions to samples (default to null which uses a heuristic to determine a large sample size)
Enumerate/sample feature coalitions to approximate the shapley values
Sample rate (fraction of sampled feature coalitions)
Instance to explain
Number of coalitions to sample
Static
getGenerated using TypeDoc
Kernel SHAP method to approximate Shapley attributions by solving s specially weighted linear regression problem.