library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
## ✓ tibble  3.1.6     ✓ dplyr   1.0.7
## ✓ tidyr   1.1.4     ✓ stringr 1.4.0
## ✓ readr   2.1.1     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(xgboost)
## 
## Attaching package: 'xgboost'
## The following object is masked from 'package:dplyr':
## 
##     slice

Causal Attribution

Attribution when varying the “normality” (read: probability) of causes. This can be statistical normality or prescriptive normality (as in what one believes to be normal).

Abnormal inflation rule

Suppose that an outcome depends on a causal factor C as well as an alternative causal factor A, such that the outcome will only occur if both C and A occur. Then people will be more inclined to say that C caused the outcome when they regard C as abnormal than when they regard C as normal.

## [19:55:38] WARNING: amalgamation/../src/metric/auc.cc:330: Dataset is empty, or contains only positive or negative samples.
## [19:55:38] WARNING: amalgamation/../src/metric/auc.cc:330: Dataset is empty, or contains only positive or negative samples.

The graph shows a downward trend, so shap values satisfy abnormal inflation rule.

Supersession

Suppose an outcome depends on a causal factor C as well as an alternative causal factor A, such that the outcome will only occur if both C and A occur. Then people will be less inclined to say that C caused the outcome if A is abnormal than if A is normal.

The graph shows an upward trend so Shap values follow the conjuctive supersession rule.

No supersession with disjunction

Suppose an outcome depends on a causal factor C as well as an alternative causal factor A, such that it will only occur if either C or A occurs. Then people are just as inclined to say that C caused the outcome when A is abnormal as they are when A is normal.

## [19:55:44] WARNING: amalgamation/../src/metric/auc.cc:330: Dataset is empty, or contains only positive or negative samples.
## [19:55:44] WARNING: amalgamation/../src/metric/auc.cc:330: Dataset is empty, or contains only positive or negative samples.
## [19:55:44] WARNING: amalgamation/../src/metric/auc.cc:330: Dataset is empty, or contains only positive or negative samples.
## [19:55:44] WARNING: amalgamation/../src/metric/auc.cc:330: Dataset is empty, or contains only positive or negative samples.

There should be no trend. Shap values violate the disjunctive supersession rule.