def label_value_or_threshold()

in src/smclarify/bias/report.py [0:0]


def label_value_or_threshold(label_series: pd.Series, positive_values: List[Any]) -> str:
    """
    Fetch label values or threshold intervals for the input label data and label values
    :param label_series: label column data
    :param positive_values: list of positive label values
    :return: string with category values or threshold indices seperated with ','
    """
    if not positive_values:
        raise ValueError("Positive label values or thresholds are empty for Label column")

    label_data_type, label_series = common.ensure_series_data_type(label_series, positive_values)
    _, value_or_threshold = _positive_label_index(
        data=label_series, data_type=label_data_type, positive_values=positive_values
    )
    return value_or_threshold