Vedakeerthi / Flight_Fare_Prediction

An end-to-end flight fare prediction model deployed as a web application

Home Page:https://medium.com/@vedakeerthi2002/end-to-end-flight-fare-prediction-f8c3ffecd005

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flight fare prediction

Table of Content

Demo

Synopsis

Flight fare prediction project is based on predicting the price of the flight ticket based on different features, this features includes, the airline in which you might travel, the date of journey, the place from where your journey begins source, the place where you reach destination, the route which you might take to reach your destination, this route also specifies the number of stops the airline stops inbetween the destination , the time for depature, the time of arrival, the time taken for you to travel from the source to the destination, and finally the price for the travel.

So based on the given data,

Independent variable (X) : Airline, Date_of_journey, Source, Destination, Route, Dep_Time, Arrival_Time, Duration, Total_Stops, Additional_Info

Dependent variable (Y) : Price

Based on the given data we can identify this as a regression problem, so we can use various machine learning problems to solve this problems which are as follows:

  • Linear regression
  • Lasso regression
  • Ridge regression
  • Decision tree regressor
  • Random forest regressor

I have declared this problem with random forest regression, since linear regression model doesn't gave me much accuracy.

Machine learning model : Random forest regressor (sklearn)

Data preprocessing : Pandas

Data visualization : Matplotlib, Seaborn

Web framework : Flask

Model deployment : Heroku platform

Appendix

The requirement for developing this model is present in the requirements.txt file.

The development of the model is present in the main.ipynb file.

The pickle file of the model for deployment is present in flight fare prediction folder.

The flask framework for the web app development is made in the app.py file.

The templates for the framework is done in html and css and the file is located in the templates folder.

Links

Directory Tree

├── template
│   ├── home.html
    ├── style
        ├── css
            ├── stylesheet.css
├── Procfile
├── README.md
├── Data_Train.xlsx
├── model-gif.gif
├── app.py
├── main.ipynb
|── Flight_fare_prediciton.pkl
├── requirements.txt

Color Reference

Color Hex
Body of the web page #6767bd #6767bd
Border of the web page #000000 #000000
Font color for head, h3 #ffffff #ffffff
Submit button border #808080 #808080
Submit button color #6767bd #6767bd

Features

  • Live prediction analysis.
  • Fullscreen mode supports in mobile, pc.
  • Cross platform can be used on multiple operating system.

Run Locally

Clone the project

  git clone https://github.com/Vedakeerthi/FLIGHT_FARE_PREDICTION.git

Install dependencies

  pip install -r requirements.txt

Start the server

  python app.py

Run the app on server by the local link provided

License

MIT License

Technology Used

python   scikit_learn   flask   gunicorn  

About

An end-to-end flight fare prediction model deployed as a web application

https://medium.com/@vedakeerthi2002/end-to-end-flight-fare-prediction-f8c3ffecd005

License:MIT License


Languages

Language:Jupyter Notebook 98.9%Language:Python 0.6%Language:HTML 0.4%Language:CSS 0.1%Language:Procfile 0.0%