- Overview/Problem Statement
- Dataset
- File Structure
- Major Packages/Libraries Used
- Installation/Working Environment
- Building the Web App
- Model Deployment on Heroku Platform
- App Implementation
- Drawbacks and Future Scope
- Credits
- Ever wondered how much a flight would cost you while making travel plans? This ML model tries to predict the flight fare using regression techniques.
- For this problem, Linear Regression, RandomForest and XgBoost algorithms were implemented, RandomForest giving the best results.
- The dataset was taken from MachineHack and is available on Kaggle.
- The dataset contains the following features: Airline, Date of Journey, Source, Destination, Route, Departure Time, Arrival Time, Duration of Flight, Total Stops and Additional Information.
- Dateset Link
├── static
│ ├── flight.jpg
├── templates
│ ├── index.html
├── Flight_Test.xlsx
├── Flight_Train.xlsx
├── Notebook.ipynb
├── Procfile
├── README.md
├── app.py
├── flight.pkl
├── requirements.txt
- pandas
- numpy
- sci-kit learn
- matplotlib
- seaborn
- Flask
- gunicorn
Follow the instructions if you want to run the app from your local computer.
- The app is written using Python 3.8.5. You can download it from here.You can also download Anaconda which is a distribution of python from here. I would recommend downloading anaconda since it is very useful as it comes with a lot of python libraries, Jupyter and Spyder IDE.
- Once you are done with the installation, you can clone this repository to your computer and install the required packages and libraries using the following line of code through the command prompt where your local environment is setup.
pip install -r requirements.txt
- The web-app was developed using flask micro web framework which is written in python, suitable for small scale projects such as this one. For more information you can check the offical flask website by clicking here
- Basic HTML was needed for designing the web-app and to make sure it was responsive to user inputs.
- You will have to create a account in order to deploy the model. Login to your account and go to the deploy section.
- Connect to your github repository and deploy the model manually or through Heroku CLI.
- Link: FlightFarePrediction
- The app asks for user to enter their preffered airline, Date of Journey which includes (Departure date and time, Arrival date and time), place they are travellng from, destination and number of stoppages. Based on these inputs, flight fare is predicted.
- The data used for training and testing purpose of model was of 2019 only.
- The model doesn't take into consideration the seasonal effects on flight fare. Maybe flights in winter season have a higher fare cost in India.
- Some of the flights have been out of business in the current scenario such as Jet Airways.
- The dataset only contained travel details from 5-6 different cities of India.
- The app's front end has room for improvement using CSS or other styling techniques.
- More algorithms can be used for more accurate results.
I would like to thank Krish Naik for hosting this problem statement on his youtube channel and Amar Mandal whose work was taken as inspiration for successful completion of this project.