filter
Module defining the filter object.
Classes:
Name | Description |
---|---|
Filter |
Filter class, used to filter a dataset for causal explanation on a subset. |
Filter(name: str, fitted_parquet_dataset: FittedParquetDataset, criteria: list[NumericalCriterion | CategoricalCriterion | MultivariateCriterion | TimeseriesBoxCriterion] | None = None, row_indexes: list[int] | None = None)
#
Filter class, used to filter a dataset for causal explanation on a subset.
Initialize the filter object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
The filter name. |
required |
|
FittedParquetDataset
|
The dataset to filter will be applied to. |
required |
|
list[NumericalCriterion | CategoricalCriterion] | None
|
An optional list of filter criteria to filter by feature. |
None
|
|
list[int] | None
|
An optional list of row indexes to filter by sample. |
None.
|
Methods:
Name | Description |
---|---|
add_criterion |
Add criterion. |
add_criteria |
Add many criteria. |
apply |
Generate/update a remote filter. |
__len__ |
Get filter's result size. |
Attributes:
Name | Type | Description |
---|---|---|
name |
|
|
criteria |
|
|
row_indexes |
|
|
dataset |
|
|
id |
str | None
|
Get id. |
Source code in src/xpdeep/filtering/filter.py
name = name
#
criteria = criteria if criteria is not None else []
#
row_indexes = row_indexes
#
dataset = fitted_parquet_dataset
#
id: str | None
#
Get id.
add_criterion(criterion: NumericalCriterion | CategoricalCriterion) -> None
#
add_criteria(*args: NumericalCriterion | CategoricalCriterion) -> None
#
apply() -> None
#
__len__() -> int
#
Get filter's result size.