learner
Passive RPNI learners for deterministic Mealy and Moore machines.
RPNIMealyLearner
Bases: SupervisedLearner
Learn a Mealy machine from full input/output traces using AALpy RPNI.
Inputs and outputs must each select exactly one list column, with one trace per row. Lists contain ordered scalar symbols (strings, booleans, integers, or finite floats). Nulls are not supported. Input and output words must have equal lengths.
Prefix expansion is handled internally. Contradictory traces are rejected.
AALpy's default input-incomplete learning is retained: prediction raises
ValueError for undefined transitions rather than inventing outputs.
RPNIMooreLearner
Bases: SupervisedLearner
Learn a Moore machine, including its initial-state output.
Accepts the same ordered scalar-word representation as
RPNIMealyLearner, but every output word must contain exactly one more
symbol than its input word. The first output labels the initial state;
subsequent outputs label states reached after each input. In particular,
an empty input word requires one output symbol.
Prediction returns symbol lists including the initial output. Undefined
transitions raise ValueError; input completion is not enabled.