Examples of learnMachine()


Examples of statechum.analysis.learning.observers.Learner.learnMachine()

    config.setDebugMode(false);
    //l.setPairsMergedPerHypothesis(0);
    //l.setGeneralisationThreshold(1);
    //l.setCertaintyThreshold(5);
    testConfig.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);
    LearnerGraph learntStructureA = new LearnerGraph(l.learnMachine(buildSet(plus), buildSet(minus)),expected.config);
    // Now do the same with ptasets instead of real sets
    PTASequenceSet plusPTA = new PTASequenceSet();plusPTA.addAll(buildSet(plus));PTASequenceSet minusPTA = new PTASequenceSet();minusPTA.addAll(buildSet(minus));
    LearnerGraph learntStructureB = new LearnerGraph(l.learnMachine(plusPTA, minusPTA),expected.config);
    Assert.assertNull(WMethod.checkM(learntStructureA, learntStructureB));
    LearnerGraph learntMachineNoRejects = new LearnerGraph(expected.config);
View Full Code Here

Examples of statechum.analysis.learning.observers.Learner.learnMachine()

    //l.setCertaintyThreshold(5);
    testConfig.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);
    LearnerGraph learntStructureA = new LearnerGraph(l.learnMachine(buildSet(plus), buildSet(minus)),expected.config);
    // Now do the same with ptasets instead of real sets
    PTASequenceSet plusPTA = new PTASequenceSet();plusPTA.addAll(buildSet(plus));PTASequenceSet minusPTA = new PTASequenceSet();minusPTA.addAll(buildSet(minus));
    LearnerGraph learntStructureB = new LearnerGraph(l.learnMachine(plusPTA, minusPTA),expected.config);
    Assert.assertNull(WMethod.checkM(learntStructureA, learntStructureB));
    LearnerGraph learntMachineNoRejects = new LearnerGraph(expected.config);
    AbstractPathRoutines.removeRejectStates(learntStructureA,learntMachineNoRejects);
    Assert.assertNull(WMethod.checkM(learntMachineNoRejects, expected));
  }
View Full Code Here

Examples of statechum.analysis.learning.observers.Learner.learnMachine()

        innerLearner.addObserver(PickNegativesVisualiser.this);
        Learner mainDecorator = new AutoAnswers(innerLearner);
        if (conf.labelDetails != null)
          mainDecorator = new SmtLearnerDecorator(mainDecorator,conf.labelDetails);
            if (whomToNotify != null) whomToNotify.threadStarted();
            DirectedSparseGraph learnt = mainDecorator.learnMachine(sPlus, sMinus).pathroutines.getGraph();
            if(conf.config.isGenerateTextOutput())
              OutputUtil.generateTextOutput(learnt);
            if(conf.config.isGenerateDotOutput())
              OutputUtil.generateDotOutput(learnt);
           
View Full Code Here

Examples of statechum.analysis.learning.observers.Learner.learnMachine()

    config.setDebugMode(false);
    //l.setPairsMergedPerHypothesis(0);
    //l.setGeneralisationThreshold(1);
    //l.setCertaintyThreshold(5);
    testConfig.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);
    LearnerGraph learntStructureA = new LearnerGraph(l.learnMachine(buildSet(plus), buildSet(minus)),expected.config);

    // Now do the same with ptasets instead of real sets
    PTASequenceSet plusPTA = new PTASequenceSet();plusPTA.addAll(buildSet(plus));PTASequenceSet minusPTA = new PTASequenceSet();minusPTA.addAll(buildSet(minus));
    LearnerGraph learntStructureB = new LearnerGraph(l.learnMachine(plusPTA, minusPTA),expected.config);
    //Visualiser.updateFrame(learntStructureA, expected);
View Full Code Here

Examples of statechum.analysis.learning.observers.Learner.learnMachine()

    testConfig.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);
    LearnerGraph learntStructureA = new LearnerGraph(l.learnMachine(buildSet(plus), buildSet(minus)),expected.config);

    // Now do the same with ptasets instead of real sets
    PTASequenceSet plusPTA = new PTASequenceSet();plusPTA.addAll(buildSet(plus));PTASequenceSet minusPTA = new PTASequenceSet();minusPTA.addAll(buildSet(minus));
    LearnerGraph learntStructureB = new LearnerGraph(l.learnMachine(plusPTA, minusPTA),expected.config);
    //Visualiser.updateFrame(learntStructureA, expected);
    Assert.assertNull(WMethod.checkM(learntStructureA, learntStructureB));
    LearnerGraph learntMachineNoRejects = new LearnerGraph(expected.config);
    AbstractPathRoutines.removeRejectStates(learntStructureA,learntMachineNoRejects);
    Assert.assertNull(WMethod.checkM(learntMachineNoRejects, expected));
View Full Code Here

Examples of statechum.analysis.learning.observers.LearningConvergenceObserver.learnMachine()

    learnerConfig.config.setTransitionMatrixImplType(STATETREE.STATETREE_SLOWTREE);
    //learnerConfig.config.setScoreForAutomergeUponRestart(1);
    ErlangOracleLearner learner = new ErlangOracleLearner(null,learnerConfig);
    Learner learnerAndObserver = new LearningConvergenceObserver(learner);
    learner.GenerateInitialTraces();
    LearnerGraph locker = learnerAndObserver.learnMachine();
    Assert.assertEquals(6,locker.getStateNumber());
    Assert.assertEquals(11,locker.pathroutines.computeAlphabet().size());
    Assert.assertEquals(51,locker.pathroutines.countEdges());
   
    List<Double> observedConvergence = ((LearningConvergenceObserver)learnerAndObserver).progressObserved;
View Full Code Here

Examples of statechum.analysis.learning.observers.LearningConvergenceObserver.learnMachine()

    learnerConfig.config.setTransitionMatrixImplType(STATETREE.STATETREE_SLOWTREE);
    //learnerConfig.config.setScoreForAutomergeUponRestart(1);
    ErlangOracleLearner learner = new ErlangOracleLearner(null,learnerConfig);
    Learner learnerAndObserver = new LearningConvergenceObserver(learner);
    learner.GenerateInitialTraces();
    LearnerGraph locker = learnerAndObserver.learnMachine();
    Assert.assertEquals(6,locker.getStateNumber());
    Assert.assertEquals(11,locker.pathroutines.computeAlphabet().size());
    Assert.assertEquals(51,locker.pathroutines.countEdges());
   
    List<Double> observedConvergence = ((LearningConvergenceObserver)learnerAndObserver).progressObserved;
View Full Code Here

Examples of statechum.analysis.learning.observers.LearningConvergenceObserver.learnMachine()

    learnerConfig.config.setTransitionMatrixImplType(STATETREE.STATETREE_SLOWTREE);
    //learnerConfig.config.setScoreForAutomergeUponRestart(1);
    ErlangOracleLearner learner = new ErlangOracleLearner(null,learnerConfig);
    Learner learnerAndObserver = new LearningConvergenceObserver(learner);
    learner.GenerateInitialTraces();
    LearnerGraph locker = learnerAndObserver.learnMachine();
    Assert.assertEquals(6,locker.getStateNumber());
    Assert.assertEquals(11,locker.pathroutines.computeAlphabet().size());
    Assert.assertEquals(51,locker.pathroutines.countEdges());
   
    List<Double> observedConvergence = ((LearningConvergenceObserver)learnerAndObserver).progressObserved;
View Full Code Here

Examples of statechum.analysis.learning.observers.QuestionAndRestartCounter.learnMachine()

    innerLearner.addObserver(viz);
    innerLearner.setGraphNameSuffix(tracesFile);
    innerLearner.getTentativeAutomaton().getLayoutOptions().showNegatives = false;
    QuestionAndRestartCounter counter = new QuestionAndRestartCounter(innerLearner);
   
    LearnerGraph result = counter.learnMachine();
   
    if (innerLearner.getTentativeAutomaton().config.getErlangDisplayStatistics())
    {
      System.out.println("STATISTICS: "+counter.getQuestionCounter()+" questions, "+counter.getRestarts()+" restarts");
    }
View Full Code Here

Examples of statechum.analysis.learning.observers.QuestionAndRestartCounter.learnMachine()

    innerLearner.addObserver(viz);
    innerLearner.setGraphNameSuffix(tracesFile);
    innerLearner.getTentativeAutomaton().getLayoutOptions().showNegatives = false;
    QuestionAndRestartCounter counter = new QuestionAndRestartCounter(innerLearner);
   
    LearnerGraph result = counter.learnMachine();
   
    if (innerLearner.getTentativeAutomaton().config.getErlangDisplayStatistics())
    {
      System.out.println("STATISTICS: "+counter.getQuestionCounter()+" questions, "+counter.getRestarts()+" restarts");
    }
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.