Git Product home page Git Product logo

syntheticjohn / instacart_order_classification Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 16.75 MB

Predict which products Instacart users will reorder using classification algorithms (logistic regression, random forest and gradient boosting)

License: MIT License

Jupyter Notebook 99.93% Python 0.07%
classification logistic-regresion random-forest gradient-boosting xgboost roc-curve amazon-web-services aws-ec2 postgresql sklearn

instacart_order_classification's Introduction

Predicting Product Re-Orders On Instacart

Predict which products Instacart users will reorder using classification algorithms (logistic regression, random forest and gradient boosting)

Project overview:

  • Predicted which products each Instacart user will buy in the next order given a history of orders using classification algorithms and engineering time-based features to optimize F1 score
  • The ~8 million product orders from Kaggle were stored in postgreSQL
  • Trained, evaluated and compared logistic regression, random forest and gradient boosted trees models
  • XGBoost was selected as the final model and trained on the full training data on AWS, and performed an F1 of 0.440 on the test set
  • Results visualized with Tableau

This repo includes:

  • instacart_proprocessing.py: data preprocessing
  • instacart_modeling_subsample.ipynb: feature engineering and modeling on subsample of data
  • instacart_modeling.ipynb: feature engineering and final modeling on entire training data
  • instacart_order_predictions_slides.pdf: pdf of project presentation slides

Note 1: The proprocessing python script is designed to run where postgresql has already been setup and pre-stored with the instacart data (sourced from: kaggle.com/c/instacart-market-basket-analysis/data)
Note 2: Some data files were excluded from the data folder due to github's size limitation

instacart_order_classification's People

Contributors

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