Description Usage Arguments Value
This function uses pre-computed Shapley values to decompose the overall model R^2 into feature-level attributions of variance explained using the formulation of Redell (2019) arXiv:1908.09718.
1 |
shap |
A matrix or data.frame of Shapley values. The dimensions should be 'number of instances' by
'number of features'. The predicted outcome for each instance, used in the R^2 caluclation, is the row
sum of Shapley values across columns + the user-supplied |
y |
A |
intercept |
A length-1 numeric vector giving the model's average prediction. The |
scale |
The scaling of the feature importances. |
A data.frame of the feature importances with the model's global R^2 ('r2'), the feature-level importances or attribution of variance explained ('r2_shap'), and the proportion of variance between the baseline or intercept-only model and the final model that can be uniquely ascribed to a given feature ('sigma_unique').
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.