ThresholdCondition¶
- class baybe.constraints.conditions.ThresholdCondition[source]¶
Bases:
Condition
Class for modelling threshold-based conditions.
Public methods
__init__
(threshold, operator[, tolerance])Method generated by attrs for class ThresholdCondition.
evaluate
(data)Evaluate the condition on a given data series.
from_dict
(dictionary)Create an object from its dictionary representation.
from_json
(string)Create an object from its JSON representation.
to_dict
()Create an object's dictionary representation.
to_json
()Create an object's JSON representation.
to_polars
(expr, /)Apply the condition to a Polars expression.
Public attributes and properties
The threshold value used in the condition.
The operator used in the condition.
A numerical tolerance.
- __init__(threshold: float, operator: str, tolerance: float | None = NOTHING)¶
Method generated by attrs for class ThresholdCondition.
For details on the parameters, see Public attributes and properties.
- to_json()¶
Create an object’s JSON representation.
- Return type:
- Returns:
The JSON representation as a string.