LinearScale
class LinearScale(
min_val: ScaleLimitSpec,
max_val: ScaleLimitSpec,
bins: BinCountSpec = MAX_BINS,
use_bin_zero: bool = False,
)
Bases: Scale
Categories: dq-classifier
A scale that splits [min_val, max_val] into equal-width bins (used
with ScaleCategorizer).
Examples
Ten equally wide bins between 0 and 100:
ScaleCategorizer(["amount"], scale=LinearScale(0.0, 100.0, bins=10))
Parameters
parameter
max_valScaleLimitSpec (StrictInt | StrictFloat)Highest value of the scale; strictly greater than
min_val.
parameter
binsBinCountSpec (StrictInt)Number of bins to split the range into; a whole number from 1 to 100 (default 100).
parameter
use_bin_zeroboolIf False, the minimum value belongs to the first
bin; if True, min_val gets its own bin 0.