GithubHelp home page GithubHelp logo

meshalalamr / flight-price-prediction Goto Github PK

View Code? Open in Web Editor NEW
44.0 1.0 19.0 20 MB

Predicting flight ticket prices using a random forest regression model based on scraped data from Kayak. A Kayak scraper is also provided.

Jupyter Notebook 100.00%
web-scraping data-science regression flight-price-prediction artificial-intelligence machine-learning random-forest-regression kayak kayak-scraper

flight-price-prediction's Introduction

flight-price-prediction

SDAIA Bootcamp project 2 - web scraping/linear regression.

This project aims to predict ticket prices for upcoming flights to help customers in selecting the optimum time for travel and the cheapest flight to the desired destination. A random forest regression model is applied to forecast the flight prices based on data scraped from Kayak.

Table of Contents

Project Proposal

The project proposal can be found here.

Project MVP

The project MVP can be found here.

Scraping

The Kayak Scraper Notebook can be found here.

Here's a demo of the scraper in action (played at 2x speed):

scraper (1)

The scraped data can be found here.

image

In total, the data consists of 55,363 rows and 7 columns.

Analysis and Results

The project notebook can be found here.

Selected features are:

  • Source (4 Sources were selected for this project)
  • Destination (4 Destinations were selected for this project)
  • Total Stops
  • Average Price per Airline
  • Duration
  • Price (Target)

Correlation of features:

image

Experimenting with different models:

image

The final selected model is the random forest regression model with:

Metric Score
MAE 61.87
MSE 40409.87
RMSE 201.02

Therefore, the final model is able to predict flight ticket prices within around โ‰ˆ $61.87.

The final model can be found here.

image

Presentation

The presentation can be found here.

Mobile App

We've also developed an app on Android that finds the average estimated prices for a selected route and month based on our scraped data.

image image

Below, a demo of the mobile app is shown:

flight-pred-app

Authors

flight-price-prediction's People

Contributors

meshalalamr avatar norahalkhalifah avatar

Stargazers

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