GreaterThanOrEquals#
- class deeptrack.features.GreaterThanOrEquals(value: float | Callable[[...], float] = 0, **kwargs: Dict[str, Any])#
Bases:
ArithmeticOperationFeature
Determine whether input is greater than or equal to value.
This feature performs element-wise comparison (>=) of the input.
Parameters#
- valuePropertyLike[int or float], optional
The value to compare (<=) with the input. Defaults to 0.
- **kwargsAny
Additional keyword arguments passed to the parent constructor.
Example#
In this example, each element in the input array is compared (>=) with 2.
Start by creating a pipeline using GreaterThanOrEquals:
>>> from deeptrack.features import GreaterThanOrEquals, Value
>>> pipeline = Value([1, 2, 3]) >> GreaterThanOrEquals(value=2) >>> pipeline.resolve() [False True True]
Equivalently, this pipeline can be created using:
>>> pipeline = Value([1, 2, 3]) >= 2
>>> pipeline = 2 >= Value([1, 2, 3]) # Different result.
Or, most explicitly:
>>> input_value = Value([1, 2, 3]) >>> ge_feature = GreaterThanOrEquals(value=2) >>> pipeline = ge_feature(input_value)