criteria
Criteria.
Classes:
Name | Description |
---|---|
NumericalCriterion |
Choose max and min values to keep. |
CategoricalCriterion |
Choose which categories to keep. |
MultivariateCriterion |
Choose samples that got max or min value in the given target_channel, which is interpreted as an array index. |
TimeseriesBoxCriterion |
Defines a 2D box area that should include aggregation results of chosen times series subpart. |
NumericalCriterion(feature: NumericalFeature | Metadata, *, min_: float | None = None, max_: float | None = None)
#
Choose max and min values to keep.
Numerical Criterion initialization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
NumericalFeature | Metadata
|
The feature on which apply on the criterion. |
required |
|
int | None
|
Filter's minimum value. |
None
|
|
int | None
|
Filter's maximum value. |
None
|
Source code in src/xpdeep/filtering/criteria.py
CategoricalCriterion(feature: CategoricalFeature, *, categories: list[str | int | bool])
#
Choose which categories to keep.
Categorical Criterion initialization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
CategoricalFeature
|
The feature on which apply on the criterion. |
required |
|
list[str | int | bool]
|
List on categories to keep. |
required |
Source code in src/xpdeep/filtering/criteria.py
MultivariateCriterion(feature: MultivariateNumericalFeature, *, target_channel: int = 0, mode: Literal['min', 'max'] = 'max')
#
Choose samples that got max or min value in the given target_channel, which is interpreted as an array index.
Only for 1D arrays.
Multivariate Criterion initialization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
MultivariateNumericalFeature
|
The feature on which apply on the criterion. |
required |
|
int
|
An array's index value (starts from 0 to array size),
so the resulting samples will have this dimension as their greatest
or lowest value, depending on the |
1
|
|
Literal['min', 'max']
|
If |
"max"
|
Source code in src/xpdeep/filtering/criteria.py
TimeseriesBoxCriterion(feature: UnivariateSynchronousTimeSerie | UnivariateAsynchronousTimeSerie | MultivariateSynchronousTimeSerie | MultivariateAsynchronousTimeSerie, *, target_channel: int = 0, min_: float | None = None, max_: float | None = None, start: int | None = None, end: int | None = None, aggregators: list[Literal['min', 'max', 'avg']])
#
Defines a 2D box area that should include aggregation results of chosen times series subpart.
Time series Box Criterion initialization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
UnivariateSynchronousTimeSerie | UnivariateAsynchronousTimeSerie | MultivariateSynchronousTimeSerie
|
|
required |
|
Literal['min', 'max']
|
Time series dimension to filter. |
"max"
|
|
float | None
|
The aggregation result of chosen time serie subpart should be greater than this value. Default as None, which means no limit. |
None
|
|
float | None
|
The aggregation result of chosen time serie subpart should be lower than this value. Default as None, which means no limit. |
None
|
|
int | None
|
Array's index from where starts the chosen time serie subpart. Default as None, which means start from index 0. Negative index values are not supported. |
None
|
|
int | None
|
Array's index where ends the chosen time serie subpart. Default as None, which means goes to index (last index). Negative index values are not supported. |
None
|
|
list[Literal['min', 'max', 'avg']]
|
Used aggregators to compute resulting values that will be projected to verify if they are included in the defined box. |
required |