specless.inference.edsm.AutomataInferenceAlgorithm
- class specless.inference.edsm.AutomataInferenceAlgorithm(binary_location: str = 'dfasat/flexfringe', output_directory: str = './')[source]
Bases:
InferenceAlgorithm
The inference algorithm for inferring an automaton from a list of Traces, where trace is defined as a sequence of symbols, i.e. a set of strings. For example, ${a, b, c}$
- Parameters:
InferenceAlgorithm (_type_) – _description_
Methods
Draws the dot file data in a way compatible with a jupyter / IPython notebook
Draws the initial (prefix-tree) model
Draws the final, learned model
calls the flexfringe binary given the data in the training file
Attributes
the output filename for the unlearned, initial model, as this is a different from the inputted "output-dir".
the output filename for the fully learned model, as this is a different from the inputted "output-dir"
The output filepath for the results of learning the model
- draw_IPython(filename: str) None [source]
Draws the dot file data in a way compatible with a jupyter / IPython notebook
- Parameters:
filename (str) – The learned model dot file data
- infer(dataset: BaseDataset, get_help: bool = False, record_time: bool = True, go_fast: bool = False, **kwargs) Specification | Exception [source]
calls the flexfringe binary given the data in the training file
- Parameters:
dataset (Dataset) – dataset that contains the path to the training data
get_help (bool, optional) – Whether or not to print the flexfringe usage help memu. Defaults to False.
record_time (bool, optional) – _description_. Defaults to True.
go_fast (bool, optional) – optimizes this call to make it as fast as possible, at the expensive of usability. use for benchmarking / Hyperparam optimization. Defaults to False.
kwargs (dict, optional) – controlling the learning process
- Raises:
Exception – _description_
- Return type:
Union[Specification, Exception]
- property initial_model_filepath: str
the output filename for the unlearned, initial model, as this is a different from the inputted “output-dir”. In this case, it will be a prefix tree from the given learning data.
- Returns:
The initial model filepath.
- Return type:
str
- property learned_model_filepath: str
the output filename for the fully learned model, as this is a different from the inputted “output-dir”
- Returns:
The learned model filepath.
- Return type:
str
- property output_filepath: str
The output filepath for the results of learning the model