Skip to main content
Version: 1.9.1

LogarithmicScale

class LogarithmicScale(
min_val: Annotated[int, Strict(strict=True)] | Annotated[float, Strict(strict=True)],
max_val: Annotated[int, Strict(strict=True)] | Annotated[float, Strict(strict=True)],
base: Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None,
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 logarithmic scale.

Initializes a logarithmic scale.

Parameters

parameter
min_val

The minimum value of the scale.

parameter
max_val

The maximum value of the scale.

parameter
base

The base of the logarithm. Defaults to math.e.

parameter
bins

The number of bins.

parameter
use_bin_zero

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

Properties

property
baseAnnotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]

Returns the base of the logarithmic scale.

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
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.