MMM.preprocess#

MMM.preprocess(target, data)#

Preprocess the provided data according to the specified target.

This method applies preprocessing methods to the data (“X” or “y”), which are specified in the preprocessing_methods property of this object. It iteratively applies each method in the appropriate list (either for “X” or “y”) to the data.

Parameters:
targetstr

Indicates whether the data represents features (“X”) or the target variable (“y”).

dataUnion[pd.DataFrame, pd.Series, np.ndarray]

The data to be preprocessed.

Returns:
Union[pd.DataFrame, pd.Series, np.ndarray]

The preprocessed data.

Raises:
ValueError

If the target is neither “X” nor “y”.