Python state machine learning library
Project description
STMLearn
STMLearn is a python library which implements several active state machine learning algorithms. This library is currently under active development, and things may change at any time. If you want to use this for anything important right now you would probably be better off with LearnLib :)
Learning algorithms:
at the moment L* and TTT are supported for DFAs and Mealy machines.
Algorithm | DFA | Mealy machine |
---|---|---|
L* | ✔️ | ✔ |
TTT | ✔️ | ✔ |
Equivalence checking methods:
The following equivalence checking methods are available, or will be soon:
- W-method
- Smart W-method (early stopping etc.)
- Random walk
- Brute force
Simple example:
# Set up a SUL using regex
sm = RegexMachine('(bb)*(aa)*(bb)*')
# We are using the brute force equivalence checker
eqc = BFEquivalenceChecker(sm, max_depth=15)
# Set up the teacher, with the system under learning and the equivalence checker
teacher = Teacher(sm, eqc)
# Set up the learner who only talks to the teacher
learner = LStarDFALearner(teacher)
# Get the learners hypothesis
hyp = learner.run()
# Draw the learned dfa
hyp.render_graph(tempfile.mktemp('.gv'))
For the SUL described by the regular expression (bb)*(aa)*(bb)*
the following dfa is learned:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stmlearn-0.0.3.tar.gz
.
File metadata
- Download URL: stmlearn-0.0.3.tar.gz
- Upload date:
- Size: 53.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 533ee5060a8e7afd492944987366c98005b368b3ef69718127136574448ee00a |
|
MD5 | 6428101c3ff56a6820d1e33a2282dde2 |
|
BLAKE2b-256 | 3cef1da7ed30302ffe1a0082564f44d25742d983f77671e2c6b3eaba08802948 |
File details
Details for the file stmlearn-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: stmlearn-0.0.3-py3-none-any.whl
- Upload date:
- Size: 82.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b23502b255a4323248afe01fda314ae468be996d67c853d80040db3d2babdf09 |
|
MD5 | b3f751b937517674bf0e36d78c06a439 |
|
BLAKE2b-256 | 5e2096334440f942beee1ffc9b77a3b6c2527052d03765c2826d1748afd10f90 |