plastro.overlap.gini_index
- plastro.overlap.gini_index(arr: ndarray) float[source]
Compute the Gini inequality index for a 1D array.
The Gini index measures inequality in the distribution of values, commonly used in economics but applicable to any distribution analysis. For PLASTRO, it measures how concentrated overlap values are across radii.
- Parameters:
arr (np.ndarray) – Array of overlap values between 0 and 1. Each value represents overlap at a different radius.
- Returns:
Gini index value between 0 and 1. - 0: Perfect equality (all values identical) - 1: Perfect inequality (one value has everything, others have nothing)
- Return type:
Notes
Mathematical definition: Gini = 1 - Σ(p_i + p_{i-1}) * (x_i - x_{i-1})
Where p_i is cumulative proportion and x_i are sorted values.
For PLASTRO interpretation: - High Gini: Overlap concentrated at specific radii (scale-specific plasticity) - Low Gini: Overlap distributed across radii (scale-invariant plasticity)