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:
- target
str
Indicates whether the data represents features (“X”) or the target variable (“y”).
- data
Union
[pd.DataFrame
,pd.Series
,np.ndarray
] The data to be preprocessed.
- target
- Returns:
Union
[pd.DataFrame
,pd.Series
,np.ndarray
]The preprocessed data.
- Raises:
ValueError
If the target is neither “X” nor “y”.