lift_score#
- empulse.metrics.lift_score(y_true, y_score, *, fraction=0.1, check_input=True)[source]#
Compute the lift score for the top fraction of predictions.
- Parameters:
- y_true1D array-like, shape=(n_samples,)
Binary target values (‘positive’: 1, ‘negative’: 0).
- y_score1D array-like, shape=(n_samples,)
Target scores, can either be probability estimates or non-thresholded decision values.
- fractionfloat, optional, default: 0.1
Fraction of data to consider. Must be between 0 and 1.
- check_inputbool, default=True
Perform input validation. Turning off improves performance, useful when using this metric as a loss function.
- Returns:
- lift_scorefloat
Lift score for the top fraction of the data.