Skip to main content

YouChoose is an open source recommendation library built on PyTorch.

Project description

YouChoose

Build Status Coverage Status Code style: black Codacy Badge Documentation Status

Project Overview

In this project I seek to analyze transaction data released by Instacart in 2017 as part of a Kaggle competition. The following is directly from the competition overview.

Instacart’s data science team plays a big part in providing this delightful shopping experience. Currently they use transactional data to develop models that predict which products a user will buy again, try for the first time, or add to their cart next during a session. Recently, Instacart open sourced this data - see their blog post on 3 Million Instacart Orders, Open Sourced. In this competition, Instacart is challenging the Kaggle community to use this anonymized data on customer orders over time to predict which previously purchased products will be in a user’s next order.

Submissions are evaluated based on the mean F1 score. The format of submissions need to follow the following format.

For each order_id in the test set, you should predict a space-delimited list of product_ids for that order. If you wish to predict an empty order, you should submit an explicit 'None' value. You may combine 'None' with product_ids. The spelling of 'None' is case sensitive in the scoring metric. The file should have a header and look like the following:

order_id,products
17,1 2
34,None
137,1 2 3

Project Set-Up

Virtual Environment

The best way to run the code is to use a python virtual environment. This will require that you have python3 and git already installed on your system. To begin, run python3 -m venv project-name to create a virtual environment in a folder called project-name. Now run cd project-name to change directories.

Install with PIP

pip install -U youchoose

Install From Source

The following command is then run to clone the repository.

git clone https://github.com/csmithchicago/YouChoose.git

source bin/activate
cd youchoose
pip install -r requirements.txt

Data Download

The transaction data can be downloaded in a zip file from Instacart at the following link. After downloading the unzipped data should be placed in ./data/external/.

This can also be done by running python ./youchoose/data_gen/get_instacart_data.py from the command line. This will download the files and place them in the correct folder.

Project Organization

. ├── data │   ├── external │   │   └── instacart_2017_05_01 │   ├── interim │   ├── processed │   └── raw ├── docs │   └── source ├── notebooks ├── references ├── reports │   └── figures ├── src.egg-info ├── tests │   └── data └── youchoose ├── data │   ├── ingestion │   └── processing ├── data_gen │   └── queries ├── evaluate ├── extraction ├── interaction ├── recommender ├── utils └── visualization


Project References

  • "The Instacart Online Grocery Shopping Dataset 2017", Accessed from Instacart on 06-16-2019*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youchoose-0.1.0.tar.gz (15.6 kB view hashes)

Uploaded Source

Built Distribution

youchoose-0.1.0-py3-none-any.whl (21.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page