Package statechum.analysis.learning.experiments.PairSelection.Cav2014

Examples of statechum.analysis.learning.experiments.PairSelection.Cav2014.LearnerMarkovPassive.learnMachine()


                            if (learnerInitConfiguration.graph != null)
                            {
                              learnerInitConfiguration.graph.clearColours();learnerInitConfiguration.graph.getInit().setColour(JUConstants.RED);
                              LearnerGraph.copyGraphs(learnerInitConfiguration.graph,learner.getTentativeAutomaton());
                            }
                            LearnerGraph graphLearnt = learner.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
                            outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk,  constructFSM(graphLearnt)});
                          }
                          catch(AskedToTerminateException e)
                          {
                            outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgTerminate});
View Full Code Here


                             
                            };
                            if (learnerInitConfiguration.config.getAskQuestions()) // only generate initial traces if we are permited to ask questions.
                              learner.init(learner.GenerateInitialTraces(learnerInitConfiguration.config.getErlangInitialTraceLength()),0,0);
                            System.out.println("random trace generation complete");
                            LearnerGraph graphLearnt = learner.learnMachine(),
                                graphWithTrimmedLabels = new LearnerGraph(learnerInitConfiguration.config);
                           
                            if (learnerInitConfiguration.config.getErlangStripModuleNamesFromFunctionsInNonGenModules())
                              convertLabelsToStrings(graphLearnt,graphWithTrimmedLabels);
                            else
View Full Code Here

                            if (learnerInitConfiguration.graph != null)
                            {
                              learnerInitConfiguration.graph.clearColours();learnerInitConfiguration.graph.getInit().setColour(JUConstants.RED);
                              LearnerGraph.copyGraphs(learnerInitConfiguration.graph,learner.getTentativeAutomaton());
                            }
                            LearnerGraph graphLearnt = learner.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
                            outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk,  constructFSM(graphLearnt)});
                          }
                          catch(AskedToTerminateException e)
                          {
                            outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgTerminate});
View Full Code Here

                             
                            };
                            if (learnerInitConfiguration.config.getAskQuestions()) // only generate initial traces if we are permited to ask questions.
                              learner.init(learner.GenerateInitialTraces(learnerInitConfiguration.config.getErlangInitialTraceLength()),0,0);
                            System.out.println("random trace generation complete");
                            LearnerGraph graphLearnt = learner.learnMachine(),
                                graphWithTrimmedLabels = new LearnerGraph(learnerInitConfiguration.config);
                           
                            if (learnerInitConfiguration.config.getErlangStripModuleNamesFromFunctionsInNonGenModules())
                              convertLabelsToStrings(graphLearnt,graphWithTrimmedLabels);
                            else
View Full Code Here

    System.out.println("Alphabet of "+pta.getCache().getAlphabet().size()+" : "+pta.getCache().getAlphabet());

    final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
    LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);
   
    LearnerGraph actualAutomaton = learnerOfPairs.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
    LearnerGraph edsm2Outcome = new EDSMReferenceLearner(learnerEval,ptaCopy,1).learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
    System.out.println("Outcome states: "+edsm2Outcome.getStateNumber());
    Visualiser.updateFrame(actualAutomaton, edsm2Outcome);
    Visualiser.waitForKey();
   
View Full Code Here

    System.out.println("Alphabet of "+pta.getCache().getAlphabet().size()+" : "+pta.getCache().getAlphabet());

    final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
    LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);
   
    LearnerGraph actualAutomaton = learnerOfPairs.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
    LearnerGraph edsm2Outcome = new EDSMReferenceLearner(learnerEval,ptaCopy,1).learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
    System.out.println("Outcome states: "+edsm2Outcome.getStateNumber());
    Visualiser.updateFrame(actualAutomaton, edsm2Outcome);
    Visualiser.waitForKey();
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.