- Problem Statement
- Data Source
- Methods
- Tech Stack
- Quick Glance At The Results
- Limitations And What Can Be Improved
- Explore The Notebook
- App Deployed On Heorku
This project's objective is to enhance travel planning by forecasting ticket prices for upcoming flights. By leveraging a random forest regression model, it assists travelers in making informed decisions by identifying the most cost-effective flights and optimal travel times. The model is constructed using Kaggle-sourced data.
Predictions about flight prices are generated using a set of key features. These include airline type, arrival and departure times, flight duration, source and destination locations, among others. Through the analysis of these factors, the model provides insights into flight pricing patterns, aiding travelers in planning their journeys effectively.
- Exploratory Data Analysis
- Data Visualization
- Feature Engineering
- One Hot Encoding
- Hyperparameter Tuning
- Pickling
- Model Deployment
- Python (Refer to requirements.txt for the packages used in this project)
- Heroku (for deployment)
Information about the dataset:
Price vs Airline:
Inference: Jet Airways has the most outliers in terms of price.
Price vs Destination:
Inference: New Delhi has the most outliers and Kolkata has the least.
Months vs Number of flights:
Inference: May has the most number of flights
Type of Airline vs Number of Flights
Inference: Jet Airways has the most flight boarded
Correlation between all features:
Feature Importance:
From the above figure, we can see that the total stops and duration of the flight are the most useful in predicting the target variable, the price.
When then built the model and obtained the following results before and after the hyperparameter tuning:
MAE | MSE | RMSE | |
---|---|---|---|
Before Hyperparameter Tuning | 1171.53 | 4357560.02 | 2087.47 |
After Hyperparameter Tuning | 1163.22 | 4043245.02 | 2010.78 |
-
Data Timeframe: This project relies on pre-pandemic data, which might not accurately reflect current market dynamics. Incorporating real-time data spanning more than 7 years could yield more precise predictions. Additionally, including factors like fuel prices and global events (e.g., conflicts, pandemics, economic recessions) could enrich the model's predictive capabilities.
-
Data Enrichment: Gathering data through web scraping via tools like Selenium from diverse airline websites can provide a more comprehensive and up-to-date dataset. This could enhance the accuracy of predictions by capturing a broader range of flight prices.
-
Algorithm Diversification: Exploring multiple machine learning algorithms beyond the current random forest regression model could lead to more refined predictions. By testing different algorithms, the project's predictive accuracy might be further improved.
-
Enhanced User Experience: The front-end design of the application could be enhanced to provide users with a more intuitive and user-friendly interface. A visually appealing and user-centric design can enhance the project's overall usability.
-
Model Interpretability: Improving the interpretability of the model's predictions can empower users with insights into how different features influence flight prices. This could help travelers make more informed decisions based on their preferences.
Explore the notebook here
๐ How Airlines Price Their Flights
๐ Why are flights so expensive right now?
๐ Google Flights