LorenzCurveResult#

class superglm.LorenzCurveResult(
curve: DataFrame,
gini_model: float,
gini_perfect: float,
gini_ratio: float,
figure: Any | None,
)#

Bases: object

Result from superglm.lorenz_curve().

Attributes:
curvepd.DataFrame

Lorenz curve data with columns: cum_exposure_share, cum_loss_share_ordered, cum_loss_share_model, cum_loss_share_perfect.

gini_modelfloat

Gini coefficient for the model ordering.

gini_perfectfloat

Gini coefficient for perfect-foresight ordering.

gini_ratiofloat

Normalised Gini: gini_model / gini_perfect.

figureobject or None

The generated matplotlib or Plotly figure, or None if an external matplotlib ax was provided.