Skip to content

optbinning/scorecard-scaling-config

Pack Severity Fix Versions
optbinning error none, edit by hand All versions

optbinning.Scorecard requires scaling_method to be "pdo_odds" or "min_max" (note that optbinning's own error message misprints "pd_odds"), requires a matching scaling_method_params dict whenever scaling_method is set, and rejects rounding=True when scaling_method is None.

card = Scorecard(binning_process=bp, estimator=clf, scaling_method="pdo_odds")
card = Scorecard(
binning_process=bp,
estimator=clf,
scaling_method="pdo_odds",
scaling_method_params={"pdo": 20, "odds": 50, "scorecard_points": 600},
)

Scorecard(...) calls with an invalid scaling_method string, a scaling_method missing scaling_method_params, or rounding=True without scaling_method.

Pass scaling_method="pdo_odds" with {"pdo": ..., "odds": ..., "scorecard_points": ...} or scaling_method="min_max" with {"min": ..., "max": ...}, and only set rounding=True when a scaling method is configured.

Scorecard(scaling_method=$METHOD) raises ValueError. Allowed scaling_method values are "pdo_odds" (note the "o") and "min_max".

See all rules in the optbinning pack.