Giter Site home page Giter Site logo

supermarket_optimization's Introduction

Supermarket Optimization

This script identifies association rules based on existing records of buyer’s transactions at a supermarket. The input is a whitespace delimited data file, where each row records the SKU numbers of items in a single transaction. The script finds the most common items sold together. The set size for the common items is defined in the variable item_set_size, and a parameter sigma defines the minimum number of occurances of each set to return. Default values are 3 for item_set_size and 4 for sigma.

Usage

From the command line, run the script on the default dataset (retail_25k.dat) and using the default values for item_set_size = 3 and sigma = 4 using the command

python supermarket_optimization.py

An alternate dataset and different values for the model parameters can be specified by adding arguments (the order must be filename, item_set_size, sigma), such as

python supermarket_optimization.py retail_25k.dat 3 4

See the Python script for commented code and the Jupyter notebook for expected output.

Example Output

Running the script on the retail_25k.dat dataset with item_set_size = 3 and sigma = 4 results in the file output.csv.

supermarket_optimization's People

Stargazers

 avatar

Watchers

James Cloos avatar Greg Rafferty avatar

Forkers

inetkenya

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.