Main Functions
1. clean_data()
Purpose:
This function cleans the input dataset by removing missing values and outliers.
Inputs:
data: Input dataset (data frame).
Outputs:
- Cleaned dataset (data frame).
2. feature_scaling()
Purpose:
This function performs feature scaling on numerical features of the dataset.
Inputs:
data: Input dataset (data frame).method: Scaling method (e.g., Min-Max scaling, Standardization).
Outputs:
- Scaled dataset (data frame).
3. encode_categorical()
Purpose:
This function encodes categorical variables into numerical representations.
Inputs:
data: Input dataset (data frame).
Outputs:
- Dataset with encoded categorical variables (data frame).
4. split_data()
Purpose:
This function splits the dataset into training and testing sets.
Inputs:
data: Input dataset (data frame).test_size: Size of the testing set (default is 0.2).
Outputs:
- Training dataset (data frame).
- Testing dataset (data frame).