IdentityScale
class IdentityScale(
min_val: ScaleIdentityLimitSpec,
max_val: ScaleIdentityLimitSpec,
use_bin_zero: bool = False,
)
Bases: Scale
Categories: dq-classifier
A scale where every integer in [min_val, max_val) maps to its own
bin (used with ScaleCategorizer).
Examples
One bin per whole value in the range -- here a bin for each score from 1 to 5:
ScaleCategorizer(["score"], scale=IdentityScale(1, 5))
Parameters
parameter
max_valScaleIdentityLimitSpec (StrictInt)Highest integer of the scale; a whole number strictly
greater than min_val and no more than 100 above it (the
span is the bin count).
parameter
use_bin_zeroboolIf False, the minimum value belongs to the first
bin; if True, min_val gets its own bin 0.