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: ExplainableFeature, *, min_: float | None = None, max_: float | None = None)
#
Choose max and min values to keep.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Literal['NUMERICAL']
|
|
required |
|
None | float
|
|
required |
|
None | float
|
|
required |
Attributes:
| Name | Type | Description |
|---|---|---|
additional_properties |
dict[str, Any]
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
Numerical Criterion initialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
NumericalFeature
|
The feature type to use with the criterion. |
required |
|
int | None
|
Filter's minimum value. |
None
|
|
int | None
|
Filter's maximum value. |
None
|
Methods:
| Name | Description |
|---|---|
to_model |
Convert to CriterionInsert instance. |
Source code in src/xpdeep/filtering/criteria.py
feature = feature
#
to_model() -> CriterionInsert
#
Convert to CriterionInsert instance.
Source code in src/xpdeep/filtering/criteria.py
CategoricalCriterion(feature: ExplainableFeature, *, categories: list[str] | list[int])
#
Choose which categories to keep.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Literal['CATEGORICAL']
|
|
required |
|
list[int] | list[str]
|
|
required |
Attributes:
| Name | Type | Description |
|---|---|---|
additional_properties |
dict[str, Any]
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
Categorical Criterion initialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ExplainableFeature
|
The feature on which apply on the criterion. |
required |
|
list[str | int | bool]
|
List on categories to keep. |
required |
Methods:
| Name | Description |
|---|---|
to_model |
Convert to CriterionInsert instance. |
Source code in src/xpdeep/filtering/criteria.py
feature = feature
#
to_model() -> CriterionInsert
#
Convert to CriterionInsert instance.
Source code in src/xpdeep/filtering/criteria.py
MultivariateCriterion(feature: ExplainableFeature, *, target_channel: int = 0, mode: Literal['MIN', '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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Literal['MULTIVARIATE']
|
|
required |
|
int
|
|
required |
|
MultivariateFilterMode
|
|
required |
Attributes:
| Name | Type | Description |
|---|---|---|
additional_properties |
dict[str, Any]
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
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 |
required |
Methods:
| Name | Description |
|---|---|
to_model |
Convert to CriterionInsert instance. |
Source code in src/xpdeep/filtering/criteria.py
feature = feature
#
to_model() -> CriterionInsert
#
Convert to CriterionInsert instance.
Source code in src/xpdeep/filtering/criteria.py
TimeseriesBoxCriterion(feature: ExplainableFeature, *, target_channel: int = 0, min_: float | None = None, max_: float | None = None, start: int | None = None, end: int | None = None, aggregators: list[Literal['MAX', 'MIN', 'AVG']])
#
Defines a 2D box area that should include aggregation results of chosen times series subpart.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Literal['TIMESERIES_BOX']
|
|
required |
|
list[Aggregator]
|
|
required |
|
int
|
|
required |
|
None | float
|
|
required |
|
None | float
|
|
required |
|
None | int
|
|
required |
|
None | int
|
|
required |
Attributes:
| Name | Type | Description |
|---|---|---|
additional_properties |
dict[str, Any]
|
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) |
Time series Box Criterion initialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
UnivariateTimeSeries | MultivariateTimeSeries
|
The feature on which apply on the criterion. |
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 |
Methods:
| Name | Description |
|---|---|
to_model |
As CriterionInsert. |
Source code in src/xpdeep/filtering/criteria.py
feature = feature
#
to_model() -> CriterionInsert
#
As CriterionInsert.