Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer committed Oct 16, 2024
1 parent 2a5834f commit e9e4b88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/chapters/chapter12/model_interpretation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ The `sample.size` argument (default is `sample.size = 100`) can be increased to
#| fig-cap: Shapley values for Charlie. The actual prediction (0.63) displays the prediction of the model for the observation we are interested in, the average prediction (0.71) displays the average prediction over the given test dataset. Each horizontal bar is the Shapley value (phi) for the given feature.
#| fig-alt: 10 bar plots of Shapley values, one for each feature. x-axis says 'phi' and ranges from -0.1 to 0.05. The strongest positive contributions are from the `duration`, `purpose` and `property` variables. The strongest negative contributions are `status`, `amount`, and `savings`.
#| label: fig-iml-shapley
shapley = Shapley$new(predictor, x.interest = Charlie,
shapley = Shapley$new(predictor, x.interest = as.data.frame(Charlie),
sample.size = 1000)
shapley$plot()
```
Expand Down

0 comments on commit e9e4b88

Please sign in to comment.