Skip to main content

No project description provided

Project description

Automata Learning Routine for Auto-Twin

Description

Module developed within the Auto-Twin Horizon EU project perform an automata learning experiment with data extracted from a System Knowledge Graph (SKG), store the resulting model in the SKG, and create semantic links between the learned features and the existing nodes representing the system.

Authors:

Name E-mail address
Lestingi Livia livia.lestingi@polimi.it

Requirements

Dependencies are listed in the environment.yml file.

Module Structure

This module acts as an orchestrator of the following submodules:

  • lsha: Automata learning component, specifically implementing algorithm L*_SHA for Stochastic Hybrid Automata (SHA) learning;
  • skg_connector: Component performing queries on the SKG to extract data and store the newly created model;
  • sha2dt_semantic_mapper: Component identifying the semantic links between learned features and the existing representation of the System Under Learning (e.g., between an edge of the learned automaton and the sensor that triggers it).

Upon cloning the repository, run the following commands to initialize the submodules:

git submodule init	
git submodule update

Note that it is necessary to run git submodule update everytime submodules must synchronize with the corresponding repositories.

Configuration

The configuration file for the skg_connector module (config.ini), by default, is set up as follows:

  • instance: name of the .ini file containing the information necessary to connect to the SKG (mainly URI, user, and password). By default, this points to the local.ini file pointing to a local Neo4j instance with password 12345678. Should a connection to a connection to a differently parameterized instance be needed, a new file with the same structure as local.ini must be added to the same folder, and parameter instance accordingly.
  • schema.name: identifier of the use case targeted by the automata learning experiment. By default, this is set to legoFactory, but it can be changed to any value from the schema folder.

Note that the following must be added to your local PYTHONPATH environment variable:

How to use

The automata_learner script contains an example of a learning procedure for testing purposes:

  • function learn_automaton takes as input:
    • the pov, i.e., a string out of 'item', 'resource', 'plant';
    • the start date of the time window for events, e.g., '2023-11-04-13-0-0';
    • the end date of the time window for events, e.g., '2023-11-04-14-2-0';
    • The learned automaton will be saved in resources/learned_sha.
  • function delete_automaton deletes nodes representing the learned automaton from the SKG, if there already exists one with the same name;
  • function store_automaton stores the learned automaton into the SKG;
  • function write_semantic_links identifies and stores the semantic links between the learned automaton and existing SKG nodes.

Copyright © 2024 Livia Lestingi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autotwin_autlib-0.1.5.tar.gz (148.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autotwin_autlib-0.1.5-py3-none-any.whl (193.3 kB view details)

Uploaded Python 3

File details

Details for the file autotwin_autlib-0.1.5.tar.gz.

File metadata

  • Download URL: autotwin_autlib-0.1.5.tar.gz
  • Upload date:
  • Size: 148.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for autotwin_autlib-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5c24a835fdbeae568eb81aca7db1026692b91670ff3cdf587e1b14c405abef53
MD5 c0a3b6b59d513ef87574738fd01aed1e
BLAKE2b-256 085cc49121fa848e87fe62a9467f49976aaf5258736663d9616a9765a75727c5

See more details on using hashes here.

File details

Details for the file autotwin_autlib-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for autotwin_autlib-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d1e9b8d010218b4f004288a53f2bd6597ba2095fcaf448ad5ea9ebb7d470c46b
MD5 1413d1cc5889989c9d5a799841d19d0e
BLAKE2b-256 1d9c45af2f6c21964f505786d76e2a33776b82234bd3bb528764f3fe2097f7a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page