Types#
Base type to use with autofeasts.
This will init a dataclass with all neccessary information to build features with autofeats. This class also creates a join between table and public to create a time window used in features creation.
The join works creating a on clause with the id (for example a customer_id) and dates columns.
Example:
If you have a data_ref equals to “2022-01-06” and defines subtract_in_end parameter equals to 5 you will select all transactions from “2022-01-01” until “2022-01-05”.
- class autofeats.types.Dataset(table: pyspark.sql.dataframe.DataFrame, primary_key_col: str, table_join_key_col: str, table_join_date_col: str, numerical_cols: list, categorical_cols: list, public: pyspark.sql.dataframe.DataFrame, public_join_key_col: str, public_join_date_col: str, subtract_in_start: int = 0, subtract_in_end: int = 90, time_unit: str = 'day')[source]#
Bases:
object- categorical_cols: list#
List of categorical columns in the dataframe
- numerical_cols: list#
List of numerical columns in the dataframe
- primary_key_col: str#
Primary key of the table
- public: DataFrame#
Public dataframe
- public_join_date_col: str#
Public date column to use in the join
- public_join_key_col: str#
Public ID to use in the join
- subtract_in_end: int = 90#
Time window lenght
- subtract_in_start: int = 0#
Days before the reference date
- table: DataFrame#
Dataframe to create features
- table_join_date_col: str#
Date column used to do the join with public to create a time window
- table_join_key_col: str#
Column used to do the join with public
- time_unit: str = 'day'#
Unit used to make time window