@@ -60,13 +60,14 @@ def EDSM_score(part: Dict[GsmNode, GsmNode]):
6060 return learned_model
6161
6262
63- def run_k_tails (data , automaton_type , k , input_completeness = None , print_info = True ) -> Union [DeterministicAutomaton , None ]:
63+ def run_k_tails (data , automaton_type , k , input_completeness = None , print_info = True ) -> Union [
64+ DeterministicAutomaton , None ]:
6465 """
6566 Runs k-tails.
6667
6768 Args:
68- data: sequence of input sequences and corresponding label. Eg. [[(i1,i2,i3, ...), label], ...]
69- automaton_type: either 'dfa', ' mealy', 'moore'. Note that for 'mealy' machine learning, data has to be prefix-closed.
69+ data: sequence of input-output traces
70+ automaton_type: either 'mealy' or 'moore'. Note that the data has to be prefix-closed.
7071 k: depth until which to check node compatibility
7172 input_completeness: either None, 'sink_state', or 'self_loop'. If None, learned model could be input incomplete,
7273 sink_state will lead all undefined inputs form some state to the sink state, whereas self_loop will simply create
@@ -85,12 +86,11 @@ def run_k_tails(data, automaton_type, k, input_completeness=None, print_info=Tru
8586
8687 internal_automaton_type = 'moore' if automaton_type != 'mealy' else automaton_type
8788
88-
8989 score = ScoreWithKTail (ScoreCalculation (GsmNode .deterministic_compatible ), k )
9090
9191 learned_model = run_GSM (data , output_behavior = internal_automaton_type ,
9292 transition_behavior = "nondeterministic" ,
93- score_calc = score , data_format = 'labeled_sequences ' , instrumentation = print_level )
93+ score_calc = score , data_format = 'io_traces ' , instrumentation = print_level )
9494
9595 if not learned_model .is_input_complete ():
9696 if not input_completeness :
0 commit comments