bluecast.blueprints.preprocessing_recipes

Module Contents

Classes

PreprocessingForLinearModels

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

class bluecast.blueprints.preprocessing_recipes.PreprocessingForLinearModels(num_columns: List | None)

Bases: bluecast.preprocessing.custom.CustomPreprocessing

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.

fit_transform(df: pandas.DataFrame, target: pandas.Series) Tuple[pandas.DataFrame, pandas.Series]
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.