Package statechum.analysis.learning.observers

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();
            LearnerGraph graph = mainDecorator.learnMachine(sPlus, sMinus);
            if (graph != null)
            {
              DirectedSparseGraph learnt = graph.pathroutines.getGraph();
              if(conf.config.isGenerateTextOutput())
                OutputUtil.generateTextOutput(learnt,"textOutput.txt");
View Full Code Here


    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

    //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

        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

    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

    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

                    mainDecorator = new SmtLearnerDecorator(mainDecorator, conf.labelDetails);
                }
                if (whomToNotify != null) {
                    whomToNotify.threadStarted();
                }
                LearnerGraph graph = mainDecorator.learnMachine(sPlus, sMinus);
                if (graph != null) {
                    DirectedSparseGraph learnt = graph.pathroutines.getGraph();
                    if (conf.config.isGenerateTextOutput()) {
                        OutputUtil.generateTextOutput(learnt, "textOutput.txt");
                    }
View Full Code Here

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

    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

    //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

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.