Preprocessor
EventPreproc
from_schema
classmethod
from_schema(
schema: Schema,
ord_cols: dict[str, str] | None = None,
final_tables: Iterable[str] = (),
ctx_cols: Sequence[str] = (),
preprocessors: dict[
str, dict[str, ColumnPreproc | ArColumn | None]
]
| None = None,
**kwargs: Any,
) -> EventPreproc
Build a preprocessor for tabular event data from the Schema
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
schema
|
Schema
|
A |
required |
ord_cols
|
dict[str, str] | None
|
For each table, the column that contain the order of the event. If None, only a single event table which is not a final table is possible, and the events are considered order as for the order in the event table. If a dictionary, each event table which is not a final table must contain an order column. Final tables may or may not have an order column. |
None
|
final_tables
|
Iterable[str]
|
The tables that contain the final events. |
()
|
ctx_cols
|
Sequence[str]
|
A sequence with the root columns to be used as context. |
()
|
preprocessors
|
dict[str, dict[str, ColumnPreproc | ArColumn | None]] | None
|
A dictionary containing preprocessing instructions for each column in the schema.
Keys are table names, values are dictionaries with column names as keys and preprocessing
instructions as values. Preprocessing instructions can be instances of |
None
|
kwargs
|
Any
|
Optional additional keyword arguments:
1. |
{}
|
Returns:
Type | Description |
---|---|
EventPreproc
|
An |
fit
fit(data: RelationalData) -> EventPreproc
Fit the preprocessor to the given RelationalData
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
RelationalData
|
The |
required |
Returns:
Type | Description |
---|---|
EventPreproc
|
The fitted |