MonomialScale
classView source ↗
class MonomialScale(
min_val: Annotated[int, Strict(strict=True)] | Annotated[float, Strict(strict=True)],
max_val: Annotated[int, Strict(strict=True)] | Annotated[float, Strict(strict=True)],
power: Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])],
bins: Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=1), Le(le=100)])] = 100,
use_bin_zero: bool = False,
)
Bases: NonIdentityScale
Categories: dq-classifier
A monomial (power-law) scale.
Initializes a monomial scale.
Parameters
parameter
min_valThe minimum value of the scale.
parameter
max_valThe maximum value of the scale.
parameter
powerThe exponent for the power-law function.
parameter
binsThe number of bins.
parameter
use_bin_zeroIf False, the minimum value is part of the first bin.
Properties
property
binsAnnotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=1), Le(le=100)])] | NoneReturns the number of bins in the scale.
property
powerAnnotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]Returns the power of the monomial scale.
property
scale_rangetuple[Annotated[int, Strict(strict=True)] | Annotated[float, Strict(strict=True)], Annotated[int, Strict(strict=True)] | Annotated[float, Strict(strict=True)]]Returns the (min, max) range of the scale.
property
use_bin_zeroboolReturns whether the minimum value is in bin zero or in bin one.