GreaterThanOrEquals#
- class deeptrack.features.GreaterThanOrEquals(b: Any | list[Any] | Callable[[...], Any | list[Any]] = 0, **kwargs: Any)#
Bases:
ArithmeticOperationFeatureDetermine whether input is greater than or equal to value.
This feature performs element-wise comparison (>=) of the input.
Parameters#
- b: PropertyLike[Any | list[Any]], optional
The value to compare (<=) with the input. Defaults to 0.
- **kwargs: Any
Additional keyword arguments passed to the parent constructor.
Examples#
>>> import deeptrack as dt
Start by creating a pipeline using GreaterThanOrEquals:
>>> pipeline = dt.Value([1, 2, 3]) >> dt.GreaterThanOrEquals(b=2) >>> pipeline.resolve() [False, True, True]
Equivalently, this pipeline can be created using:
>>> pipeline = dt.Value([1, 2, 3]) >= 2 >>> pipeline.resolve() [False, True, True]
Which is not equivalent to:
>>> pipeline = 2 >= dt.Value([1, 2, 3]) # Different result >>> pipeline.resolve() [True, True, False]
Or, more explicitly:
>>> input_value = dt.Value([1, 2, 3]) >>> ge_feature = dt.GreaterThanOrEquals(b=2) >>> pipeline = ge_feature(input_value) >>> pipeline.resolve() [False, True, True]