Skip to main content

models.double_lift()

The double lift chart of two models (CAS Monograph 5, section 7.2.2):

Usage

models.double_lift(
    y,
    pred_a,
    pred_b,
    exposure=None,
    bands=10,
)

rows sorted by pred_a / pred_b, cut into bands of about equal exposure, with each band’s actual and predicted averages over their overall averages (each model against its own).

Parameters

y: list of float
pred_a: list of float
pred_b: list of float

Positive.

exposure: list of float = None
bands: int = 10

Returns

list of dict
exposure, actual, model_a, model_b (band totals), actual_relativity, a_relativity and b_relativity per band.