library.phases.phases_implementation.feature_analysis.feature_transformation.feature_transformation_factory module¶
- class library.phases.phases_implementation.feature_analysis.feature_transformation.feature_transformation_factory.FeatureTransformation(dataset: Dataset)[source]¶
Bases:
object
- get_categorical_features_encoded(features: list[str], encode_y: bool = True) None | dict [source]¶
Encodes the categorical features for the training, validation and test sets
- Parameters:
features (list[str]) – The features to encode
encode_y (bool) – Whether to encode the target variable
- Returns:
X_train_encoded (pd.DataFrame) – The training set
X_val_encoded (pd.DataFrame) – The validation set
X_test_encoded (pd.DataFrame) – The test set
y_train_encoded (pd.Series) – The training set
y_val_encoded (pd.Series) – The validation set
y_test_encoded (pd.Series) – The test set
encoding_map (dict) – The encoding map