Skip to main content

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: simple dfa

Metadata

Release files for stmlearn 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stmlearn 0.0.3
File Size Uploaded Provenance Actions
stmlearn-0.0.3.tar.gz 53.6 kB Without provenance Details for stmlearn-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stmlearn 0.0.3
File Interpreter ABI Platform Actions
stmlearn-0.0.3-py3-none-any.whl Python 3 none any Details for stmlearn-0.0.3-py3-none-any.whl

Total release size: 135.6 kB

Release files / stmlearn-0.0.3.tar.gz

Download URL stmlearn-0.0.3.tar.gz
Size 53.6 kB
Tags Source
SHA-256 checksum
How to use checksums
533ee5060a8e7afd492944987366c98005b368b3ef69718127136574448ee00a
BLAKE2b-256 checksum
How to use checksums
3cef1da7ed30302ffe1a0082564f44d25742d983f77671e2c6b3eaba08802948
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / stmlearn-0.0.3-py3-none-any.whl

Download URL stmlearn-0.0.3-py3-none-any.whl
Size 82.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b23502b255a4323248afe01fda314ae468be996d67c853d80040db3d2babdf09
BLAKE2b-256 checksum
How to use checksums
5e2096334440f942beee1ffc9b77a3b6c2527052d03765c2826d1748afd10f90
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for stmlearn 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page