selection_impact_ratio#

solas_disparity.disparity.selection_impact_ratio(...)#

Calculate the selection impact ratio.

Parameters
  • group_data (DataFrame) – Dataframe containing columns for group data.

  • race_ethnicity_groups (List[str]) – A list of race/ethnicity groups corresponding to individual columns in group_data (e.g. [“Hispanic or Latino”, “White”, “Black or African American”, “Native Hawaiian or Pacific Islander”, “Asian”, “Native American or Alaska Native”, “Two or More Races”]).

  • gender_groups (List[str]) – A list of gender groups corresponding to individual columns in group_data (e.g. [“Male”, “Female”]).

  • outcome (Series) – Boolean outcome series.

  • ratio_threshold (float) – Threshold at which a ratio is considered significant.

  • difference_threshold (float) – Threshold at which a difference is considered significant.

  • sample_weight (Optional[Series], optional) – Sample weight series. Has the same length as group_data. Defaults to None.

  • max_for_fishers (int, optional) – Maximum value of samples for Fisher’s exact test to be used. Defaults to MAX_FOR_FISHERS.

  • shortfall_method (Optional[types.ShortfallMethod], optional) – Method used for shortfall calculation. Defaults to ShortfallMethod.TO_REFERENCE_MEAN.

  • drop_small_groups (Optional[bool], optional) – Whether to separate and return a table of groups that comprise less than 2% of individuals. Defaults to True.

Returns

Object containing results of the disparity calculation.

Return type

Disparity