Preprocessing#
- class preprocess.preprocess_object.PreProcessObject(seed=None, **kwargs)[source]#
Bases:
ABCBase class for a preprocessing step that transforms a dataset.
Steps are chained by
Experiment(a typical pipeline isbalance -> encode -> scale -> split -> finalize). A step receives a mutableDatasetObject, edits asnapshot()of its dataframe, and writes the result back withupdate(). A step that splits the data may return a tuple of datasets (e.g. train and test).- Parameters:
seed (int | None)
- abstractmethod transform(input)[source]#
Apply the transformation to a dataset.
- Parameters:
input (DatasetObject) – A mutable dataset to transform in place (or clone).
- Returns:
The transformed dataset, or several datasets when the step splits the input (e.g. into trainset and testset).
- Return type:
DatasetObject or tuple of DatasetObject