Giter Site home page Giter Site logo

flight-price-prediction's Introduction

Project Title

Flight Price Prediction

Travelling through flights has become an integral part of today's lifestyle as more and more are opting for fster travelling oprions. The flight ticket prices increase or decrease every now and then depending on various factors such as timings of the flight, destination, duration, festive seasons etc. Therefore having some basic idea of the flight fares before planning the trip will surely help many people save money and time.

The main goal is to predict the price of the flights based on different factors available in the dataset.

Screenshot

Alt text

Heroku Link

https://flight---price---prediction.herokuapp.com/

Dataset Link

https://www.kaggle.com/nikhilmittal/flight-fare-prediction-mh

Installation

  • Create a new environment

  • Copy the downloaded files or clone the files from github to your environment

  • pip3 install -r requirements.txt

  • python app.py

EDA

  • Seperated hour, minutes, day and month from date and time related columns

  • Crated a new column which shows the day part like morning, noon etc

  • Removed outliers using IQR

  • Replaced hours that were greater than 24 like {25:1,26:2,27:3} etc

Model creation

  • Encoded categorical variables using category encoders

  • Used Linear Regression and Lasso as a baseline model which gave and r2 of 62.71% and RMSE of 2582

  • Used RandomForest Regressor and LightGBM Regressor for increasing the performance

  • Used optuna for tuning RandomForest and LightGBM

  • Chose LightGBM Regressor as the best model with test r2 of 86.74%, MAE of 1097.25 and RMSE of 1539.56

Model Explainability

  • Used Shap for Model Explainability

Alt text

Future Improvements

  • UI

  • If you set the arrival date and time which is less than the departure date and time, the model still gives an output which should be improved

flight-price-prediction's People

Contributors

xx-craziness-xx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.