Skip to content

this repository contains main project of Rahnema college machine learning bootcamp

Notifications You must be signed in to change notification settings

RozhanMk/Taxi-demand-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taxi demand prediction

this repository contains the main project of Rahnema College's machine learning boot camp. The purpose of this project is to predict the demand of 263 zones of NYC in the future (for any time interval). As part of this plan, the team seeks to identify areas with higher travel demand to increase the number of available drivers in those locations. Incentivizing drivers is a marketing initiative, and predicting demand during different time frames is crucial for implementing this process.

To understand the general idea check our presentation

Dataset

TLC NYC dataset contains trip data about 12,672,737 trips which are made between 263 different zones in NYC. The trip records include fields capturing pick-up and drop-off dates/times, pick-up and drop-off locations, trip distances, itemized fares, rate types, payment types, and driver-reported passenger counts. The pick-up and drop-off contains the date and time for each trip respectively which are about trips made between 2023/1/1 to 2023/4/30 and the times follow the HH:MM:SS format.

Demand dataset

We created a demand dataset based on this definition for each timestamp and LocationID:

Feature Selection

We added these features to the demand dataset:

Features Extra info
Weather temperature and icon from weather API
Cyclical time daily and weekly
Rolling window feature rolling std and rolling mean
Demand lags daily and weekly lags
PULocationID target encoding
Borough
Week day

Base Model

We transformed multiple multivariate time series problems into a supervised learning problem. So we can use XGBoost.

Final Model

We used simple deep learning with dense layers and we got the best result:

How to run

  1. Clone the repo:
  git clone https://github.com/RozhanMk/Taxi-demand-prediction
  cd Taxi-demand-prediction

Before you run this API, you must get your API key from https://www.visualcrossing.com/weather/weather-data-services and put it in weather API file.

  1. Run Django:
   cd Deploy
   python3 -m venv venv
   source venv/bin/activate
   pip install -r requirements.txt
   python3 manage.py runserver 

Team Members

About

this repository contains main project of Rahnema college machine learning bootcamp

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published