Giter Site home page Giter Site logo

flight-price-prediction's Introduction

banner Python version GitHub last commit (branch) GitHub Repo Size Tyep of ML Static Badge

Table of Contents:

Problem Statement

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.

Data Source

Methods

  • Exploratory Data Analysis
  • Data Visualization
  • Feature Engineering
  • One Hot Encoding
  • Hyperparameter Tuning
  • Pickling
  • Model Deployment

Tech Stack

  • Python (Refer to requirements.txt for the packages used in this project)
  • Heroku (for deployment)

Quick Glance At The Results

Information about the dataset:

Info

Price vs Airline:

Price Vs Airline Inference: Jet Airways has the most outliers in terms of price.

Price vs Destination:

Price vs Destination Inference: New Delhi has the most outliers and Kolkata has the least.

Months vs Number of flights:

Months vs Number of flights Inference: May has the most number of flights

Type of Airline vs Number of Flights

Airline vs Number of Flights Inference: Jet Airways has the most flight boarded

Correlation between all features:

Correlation Heatmap

Feature Importance:

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

Limitations And What Can Be Improved

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

Explore the notebook here

App Deployed On Heroku

Demo GIF

Further Readings

๐Ÿ”— How Airlines Price Their Flights

๐Ÿ”— Why are flights so expensive right now?

๐Ÿ”— Google Flights

๐Ÿ”— Airfare Prediction Tools

๐Ÿ”— Flight Price Predictor Tools and Apps

flight-price-prediction's People

Contributors

aliya032 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.