Skip to main content
Version: 1.7.1

MonomialScale

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_val

The minimum value of the scale.

parameter
max_val

The maximum value of the scale.

parameter
power

The exponent for the power-law function.

parameter
bins

The number of bins.

parameter
use_bin_zero

If 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)])] | None

Returns 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_zerobool

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