stable_cart.path_agreement¶
- stable_cart.path_agreement(models, X)[source]¶
Fraction of rows routed through the same feature sequence by most fits.
Averaged over rows: for each row, the share of fits agreeing with that row’s modal path. This is explanation stability from the perspective of the individual being explained to.
Parameters¶
- models
Fitted trees, each from a different training sample.
- X
Rows to route.
Returns¶
- float
Mean modal-path agreement, in [0, 1].
Raises¶
- ValueError
If fewer than two models are supplied.