Passive Learning using Learnlib example

123 views
Skip to first unread message

Teck Ping Khoo

unread,
May 16, 2019, 3:59:46 AM5/16/19
to LearnLib Q&A
Hi 

I tried to find guides on how to use passive learning (eg RPNI) using learnlib but I could not find any. 

1. Assuming I have an input file containing positive and negative words. What should the format of the input file be? 
2. Is it possible to run the jar file directly on the input file using command line?

Thanks!
Teck Ping

Carlos Diego Nascimento Damasceno

unread,
May 16, 2019, 5:06:30 AM5/16/19
to Teck Ping Khoo, LearnLib Q&A
Teck Ping,

I've played a little with the RPNI implementation for Mealy machines in LearnLib and, to do that, I basically followed the Javadoc as reference.
If you check there, you I'll see that LearnLib has an inteface named PassiveLearningAlgorithm that is implemented by the classes with the RPNI for Mealy machines and DFAs.
In the latter class, we have another interface named PassiveAcceptorLearner that specifies methods to add positive and negative samples.
Using these methods, I managed to to add samples and compute my Meay machines.

--
You received this message because you are subscribed to the Google Groups "LearnLib Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to learnlib-qa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/learnlib-qa/70b62490-80c3-4360-a2cf-35d6c5250c10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Regards, 

Carlos Diego N. Damasceno, MSc
PhD candidate @ ICMC - USP

Markus Frohme

unread,
May 16, 2019, 1:04:25 PM5/16/19
to Teck Ping Khoo, LearnLib Q&A
Dear Teck,


Diego already mentioned all the relavant methods you need for running your passive learning setup. However, there have been a few requests lately regarding how to use the passive learning interfaces, so I created a small example [0] that learns a simple hypothesis given positive and negative samples.

Regarding you second question: Most of the LearnLib/AutomataLib code is intended as library code, so there is no "standalone" application that you can run from the commandline. However, you can write a small main method (similar to what the examples do) that

* reads the training set depending on the format you use,
* runs the passive learning algorithms of LearnLib,
* displays the hypothesis in the format you need

and create an executable JAR (e.g. via the maven-shade-plugin) that runs your main method.


Hope this helps,
Markus

[0] - https://github.com/LearnLib/learnlib/blob/develop/examples/src/main/java/de/learnlib/examples/passive/Example1.java

Teck Ping Khoo

unread,
Jul 3, 2019, 12:17:19 AM7/3/19
to LearnLib Q&A
Thanks Markus and Diego, I will explore the suggestions. 

Regards
Teck Ping


On Friday, May 17, 2019 at 1:04:25 AM UTC+8, Markus Frohme wrote:
Dear Teck,


Diego already mentioned all the relavant methods you need for running your passive learning setup. However, there have been a few requests lately regarding how to use the passive learning interfaces, so I created a small example [0] that learns a simple hypothesis given positive and negative samples.

Regarding you second question: Most of the LearnLib/AutomataLib code is intended as library code, so there is no "standalone" application that you can run from the commandline. However, you can write a small main method (similar to what the examples do) that

* reads the training set depending on the format you use,
* runs the passive learning algorithms of LearnLib,
* displays the hypothesis in the format you need

and create an executable JAR (e.g. via the maven-shade-plugin) that runs your main method.


Hope this helps,
Markus

[0] - https://github.com/LearnLib/learnlib/blob/develop/examples/src/main/java/de/learnlib/examples/passive/Example1.java


On Thu, May 16, 2019 at 12:59:46AM -0700, Teck Ping Khoo wrote:
> Hi
>
> I tried to find guides on how to use passive learning (eg RPNI) using
> learnlib but I could not find any.
>
> 1. Assuming I have an input file containing positive and negative words.
> What should the format of the input file be?
> 2. Is it possible to run the jar file directly on the input file using
> command line?
>
> Thanks!
> Teck Ping
>
> --
> You received this message because you are subscribed to the Google Groups "LearnLib Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to learn...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages