Skip to main content
Version: 1.9.1

IdentityScale

class IdentityScale(
min_val: Annotated[int, Strict(strict=True)],
max_val: Annotated[int, Strict(strict=True)],
use_bin_zero: bool = False,
)

Bases: Scale

Categories: dq-classifier

An identity scale where each integer value corresponds to a bin.

Initializes an identity scale.

Parameters

parameter
min_val

The minimum integer value of the scale.

parameter
max_val

The maximum integer value of the scale.

parameter
use_bin_zero

If False, the minimum value is part of the first bin.

Properties

property
bins

Returns the number of bins in the scale.

property
scale_rangetuple[Annotated[int, Strict(strict=True)], Annotated[int, Strict(strict=True)]]

Returns the (min, max) range of the scale.

property
use_bin_zerobool

Returns whether the minimum value is in bin zero or in bin one.