-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
The ale plot should not be anchored at the midpoint of the bucket. This is because the ALE value represents the average change in response from the bottom of the bucket to the top.
As a simple example:
If each bucket, the average local effect in each bucket, and the observation weight (usually number of observations) are as follows:
| bucket | average_local_effect | weight |
|---|---|---|
| [0, 1] | 22 | 15 |
| (1, 2] | 36 | 25 |
| (2, 3] | -10 | 35 |
| (3, 4] | -41 | 25 |
Then the (non-centered) ALE will be:
| bucket_edge | ALE |
|---|---|
| 0 | 0 |
| 1 | 22 |
| 2 | 58 |
| 3 | 48 |
| 4 | 7 |
This is because 22 is the change in prediction between 0 and 1, 36 is the change between 1 and 2, and so on.
We then center with the constant -1.45 (from average_local_effect @ weight / sum(weight)) to get the final ALE:
| bucket_edge | ALE |
|---|---|
| 0 | -1.45 |
| 1 | 20.55 |
| 2 | 56.55 |
| 3 | 46.55 |
| 4 | 5.55 |
See the original implementation here.
Metadata
Metadata
Assignees
Labels
No labels