Skip to content

Passive Learning of Stochastic Automata

Edi Muškardin edited this page Sep 20, 2021 · 4 revisions

Alergia

Alergia (and its input-output variant IOAlergia) is a passive automata learning algorithms suited for learning Markov Chains and Markov decision processes.
Following paper describes both algorithms and served as basis for our implementation.

Data Format

Alergia is a passive algorithm, meaning that it will learn the automaton that conforms to the provided data. In this section, we will show the how to preprocess data so that it can be used with our implementation.

AALpy has several most often used functions that process data from files, so that the data can be used for Algeria.

Input data format for Markov Chain learning

Input data for Markov Chain(MC) learning is a list of sequences over which MC will be constructed.
Algorithm dictates that all sequences should start with the same symbol.

Note that all sequences should start with the same element. To learn MC with AALpy, pass the data in the following format (list of lists of symbols):

[(Input)*]; eg. [[1,2,3],[1,3],[1,2,3,4],...]

HINT: If not all entries in your data start with the same symbol, prepend them with a placeholder start symbol, such as '$'

Input data format for MDP learning

Input data for Markov Decision Process(MDP) learning is a list of input-output sequences.
Algorithm dictates that all sequences should start with the same output symbol, followed by input-output pairs.

Note that all sequences should start with the same element. If that is not the case for your data, simply prepend them with some placeholder symbol. To learn MC with AALpy, pass the data in the following format:

[[Output, (Input, Output)*]]; eg. [[O, (I,O), (I,O)], [O, (I1,O2),...))]]

NOTE: In each entry, first element is an output, followed by input-output tuples. If input-output pairs are not in tuples, IOAlergia will throw an error.

Clone this wiki locally