Giter VIP home page Giter VIP logo

rp-growth's Introduction

RP-growth

Implementation of RP-growth in Python from the paper "Discovering Recurring Patterns in Time Series"

Example

  1. Create a Transaction Database from your data. Transaction databases have the following format: tdb = { 1: ["a", "b", "g"], 2: ["a", "c", "d"], 3: ["a", "b", "e", "f"], 4: ["a", "b", "c", "d"], 5: ["c", "d", "e", "f", "g"], 6: ["e", "f", "g"], 7: ["a", "b", "c", "g"], 9: ["c", "d"], 10: ["c", "d", "e", "f"], 11: ["a", "b", "e", "f"], 12: ["a", "b", "c", "d", "e", "f", "g"], 14: ["a", "b", "g"], }
  • Each row represents a transaction which has a timestamps and events/items that occurred in this transaction
  • Transactions need to be equally spaced, e.g., every month/day/hour
  • Empty transactions are skipped
  • Items/Events need to be hashable
  1. Create an instance of the PatternFinder class pattern_finder = PatternFinder(tdb, per, min_ps, min_rec)
  • tdb: the transaction database
  • per (period): maximum distance between two consecutive occurrences of an item to be counted periodic
  • minPS (minimum support): minimum number of items in a given recurrence
  • minRec (minimum recurrence): minimum number of recurrences
  1. Get the patterns patterns = pattern_finder.find_recurring_patterns()

References

This repository is based on the following paper: Kiran, R., Shang, H., Toyoda, M., & Kitsuregawa, M. (2015). Discovering Recurring Patterns in Time Series. 18th International Conference on Extending Database Technology. ISBN:978-3-89318-067-7

Link: https://openproceedings.org/2015/conf/edbt/paper-23.pdf

rp-growth's People

Contributors

kgerov avatar

Stargazers

Gary Feng avatar

Watchers

James Cloos avatar  avatar

Forkers

garyfeng

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.