Skip to content

Supervised ML - Regression Using Python This dataset was extracted and uploaded for the purpose of experimenting with and learning regression models for time prediction. There is also a lot of room for data cleaning, outliers in the data, and plenty of data to work with for more realistic model training, testing, and validation.

Notifications You must be signed in to change notification settings

Navjotkhatri/NYC-Taxi-Trip-Time-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 

Repository files navigation

NYC Taxi Trip Time Prediction

Project Overview

The NYC Taxi Trip Time Prediction project aims to develop a machine learning regression model to predict the duration of a taxi trip in New York City based on various input features such as pickup and dropoff locations, time of day, and distance of the trip. The project utilizes historical data on taxi trips in NYC and applies regression algorithms to achieve accurate predictions. The goal is to improve the efficiency and convenience of taxi services by providing more accurate estimates of trip duration for both passengers and drivers.

Python Pandas NumPy Matplotlib Seaborn

Jupyter Notebook Google Colab GitHub

Linear Regression Lasso Regression XGBoost Elastic Net Regression LightGBM

Key Findings

  • Important factors influencing taxi trip duration include pickup and dropoff locations, time of day, and distance of the trip.
  • Vendor 2 is slightly more popular than Vendor 1 with a similar number of trips.
  • Trip duration is shortest at 6 AM and longest during peak hours at 3 PM.
  • Average trip duration increases from Monday to Thursday and then decreases until Sunday.
  • Taxi trips with a higher number of passengers tend to have longer durations.
  • There is a positive correlation between trip distance and trip duration.
Model MAE MSE RMSE MAPE R2 Accuracy
Linear Regression 3.95 25.78 5.07 17.70 0.55 82.29
Lasso Regression 3.95 25.79 5.07 17.72 0.55 82.27
Ridge Regression 3.95 25.78 5.07 17.70 0.55 82.29
Elastic Net Regression 3.95 25.78 5.07 17.70 0.55 82.29
LightGBM 2.84 14.69 3.83 12.96 0.74 87.07
XGboost 2.88 15.01 3.87 13.06 0.73 86.93

Tools and Skills

  • Python: Coding and implementing machine learning algorithms.
  • Pandas: Data manipulation and preprocessing.
  • NumPy: Numerical computations.
  • Matplotlib and Seaborn: Data visualization.
  • Scikit-learn: Implementing machine learning models.

Takeaways

  • Effective data preprocessing and feature engineering are crucial for accurate predictive models.
  • Machine learning models like LightGBM can achieve high accuracy in predicting taxi trip durations.
  • Exploratory data analysis is essential for understanding underlying patterns and trends in the data.

Acknowledgments

This project was completed as part of the Data Science Trainee program at AlmaBetter.

LinkedIn

About

Supervised ML - Regression Using Python This dataset was extracted and uploaded for the purpose of experimenting with and learning regression models for time prediction. There is also a lot of room for data cleaning, outliers in the data, and plenty of data to work with for more realistic model training, testing, and validation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published