bluecast.preprocessing.custom

This module contains the CustomPreprocessing class. This is an entry point for last mile computations before model training or tuning.

Module Contents

Classes

CustomPreprocessing

This class is an entry point for last mile computations before model training or tuning. It is an abstract class

class bluecast.preprocessing.custom.CustomPreprocessing(trained_patterns: Any | None = None)

Bases: abc.ABC

This class is an entry point for last mile computations before model training or tuning. It is an abstract class and must be extended by the user. For fit_transform x_train and y_train are passed. For transform x_test and y_test are passed in the BlueCast pipeline. Use prediction_mode = False to skip processing the missing targets. :param trained_patterns: Optional. Can we used to save anything from training to be loaded and used in transform. If more placeholders are needed, use a dictionary.

abstract fit_transform(df: pandas.DataFrame, target: pandas.Series) Tuple[pandas.DataFrame, pandas.Series]
abstract transform(df: pandas.DataFrame, target: pandas.Series | None = None, predicton_mode: bool = False) Tuple[pandas.DataFrame, pandas.Series | None]

Use prediction mode to not process the missing target during inference.