PrefixSpan Scala
The shortest yet efficient implementation of the famous sequential pattern mining algorithm PrefixSpan in Scala.
Install / Use
npx skills add chuanconggao/PrefixSpan-scalaInstalls into whichever agent you are using.
README
The shortest yet efficient implementation of PrefixSpan in Scala. You can find the Python 3 version here.
Usage
scala PrefixSpan (frequent | top-k) <threshold> [<minlen>=1] [<maxlen>=maxint]
- Sequences are read from standard input. Each sequence is integers separated by space, like this example:
0 1 2 3 4
1 1 1 3 4
2 1 2 2 0
1 1 1 2 2
- The patterns and their respective frequencies are printed to standard output.
Features
Outputs traditional single-item sequential patterns, where gaps are allowed between items.
- Mining top-k patterns is also supported, with respective optimizations.
- You can also limit the length of mined patterns. Note that setting maximum pattern length properly can significantly speedup the algorithm.
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
