Skip to content

The shortest yet efficient implementation of famous frequent sequence mining algorithm PrefixSpan in Python 🐍 .

License

Notifications You must be signed in to change notification settings

akshungupta/PrefixSpan-py

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

The shortest yet efficient PrefixSpan implementation in Python, in only 20 lines in core part.

Usage

Just replace the variable db with your own sequences, and variable minsup with your own minimum support threshold.

Features

Based on state-of-the-art PrefixSpan algorithm. Mining top-k patterns is also supported.

Tip

I strongly encourage using PyPy instead of CPython to run the script for best performance. In my own experience, it is 9x times faster in average.

About

The shortest yet efficient implementation of famous frequent sequence mining algorithm PrefixSpan in Python 🐍 .

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%