MODEL'S CODE

Data Cleaning & Pre-Processing

1. Importing Necessary Libraries

1. Importing Necessary Libraries

2. Reading the Dataset

2. Reading the Dataset

3. Separating Categorical and Numerical Data

3. Separating Categorical and Numerical Data

4. Checking for Missing Values

4. Checking for Missing Values

5. Number of Unique Values in Each Column

5. Number of Unique Values in Each Column

6. Handling Rare Instances in 'Transmission'

6. Handling Rare Instances in 'Transmission'

7. Handling Rare Instances in 'Fuel Type'

7. Handling Rare Instances in 'Fuel Type'

8. Range of the Label (Price)

8. Range of the Label (Price)

9. Label Encoding and One-Hot Encoding

9. Label Encoding and One-Hot Encoding

10. Train Test Split

10. Train Test Split

11. Feature Scaling

11. Feature Scaling

PCA

12. Principal Component Analysis (PCA)

12. Principal Component Analysis (PCA)

13. Explained Variance

13. Explained Variance

Simple Models

14. Importing Simple Models

14. Importing Simple Models

15. Training and Performance Evaluation

15. Training and Performance Evaluation

16. Comparison Between Different Simple Models

16. Comparison Between Different Simple Models

Ensemble Models

17. Importing Ensemble Models

17. Importing Ensemble Models

18. Training Ensemble Models

18. Training Ensemble Models

19. Comparison Between Different Ensemble Models

19. Comparison Between Different Ensemble Models

Testing the Models

20. Creating a New Instance and Preprocessing

20. Creating a New Instance and Preprocessing

21. Prediction by Simple Models

21. Prediction by Simple Models

22. Prediction by Ensemble Models

22. Prediction by Ensemble Models

23. Saving the Models for Future Use

23. Saving the Models for Future Use