iguanas.rule_scoring.MinMaxScaler

class iguanas.rule_scoring.MinMaxScaler(min_value: int, max_value: int)[source]

Scales rule scores using the formula:

x_scaled = (x - x_min) / (x_max - x_min)

Note that the scores are also converted to int.

Parameters
min_valueint

The minimum value of the scaled rule score range.

max_valueint

The maximum value of the scaled rule score range.

fit(rule_scores: iguanas.utils.typing.pandas.core.series.Series) iguanas.utils.typing.pandas.core.series.Series[source]

Scales the rule scores.

Parameters
rule_scoresPandasSeriesType

Rule scores to scale.

Returns
PandasSeriesType

The scaled rule scores.