Examples of Learner


Examples of statechum.analysis.learning.observers.Learner

                    innerLearner = new Test_Orig_RPNIBlueFringeLearnerTestComponent(ErlangOracleVisualiser.this, conf.config);
                } else {
                    innerLearner = new ErlangOracleLearner(ErlangOracleVisualiser.this, conf);// at this point ifthenSequences will always be null.
                }
                innerLearner.addObserver(ErlangOracleVisualiser.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

Examples of statechum.analysis.learning.observers.Learner

    {
      initial.plus.addAll(evalData.labelDetails.getSPlus());initial.minus.addAll(evalData.labelDetails.getSMinus());
    }
    simulator.setNextElement(nextElement);

    Learner learner2 = null;

    if (logFileName.contains(Configuration.LEARNER.LEARNER_BLUEFRINGE_DEC2007.name()))
    {// have to patch the learner.
     
      learner2 = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,evalData.config,null,null))
View Full Code Here

Examples of statechum.analysis.learning.observers.Learner

              }
              else
                innerLearner = new RPNIUniversalLearner(PickNegativesVisualiser.this, conf);// at this point ifthenSequences will always be null.
       
        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

Examples of statechum.analysis.learning.observers.Learner

  public static void main(String[] args)
  {
    QSMTool tool = new QSMTool();tool.loadConfig(args[0]);
    if (tool.showLTL)
    {
      Learner l = new RPNIUniversalLearner(null,tool.learnerInitConfiguration);
      LTL_to_ba ba = new LTL_to_ba(tool.learnerInitConfiguration.config);ba.ltlToBA(tool.learnerInitConfiguration.ltlSequences, l.init(tool.sPlus, tool.sMinus));
      Visualiser.updateFrame(ba.augmentGraph(new LearnerGraph(tool.learnerInitConfiguration.config)), null);
    }
    else
      tool.runExperiment();
  }
View Full Code Here

Examples of statechum.analysis.learning.observers.Learner

    for(String [] path:plus)
      assert AbstractOracle.USER_ACCEPTED == expected.paths.tracePathPrefixClosed(Arrays.asList(path));
    for(String [] path:minus)
      assert AbstractOracle.USER_ACCEPTED != expected.paths.tracePathPrefixClosed(Arrays.asList(path));
    // Visualiser.getVisualiser()
    Learner l = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,testConfig,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          List<String> question, @SuppressWarnings("unused") int valueForNoRestart,
          @SuppressWarnings("unused") List<Boolean> acceptedElements,
          @SuppressWarnings("unused") PairScore pairBeingMerged,
          @SuppressWarnings("unused"final Object [] moreOptions)
      {
        return new Pair<Integer,String>(expected.paths.tracePathPrefixClosed(question),null);
      }
    };
    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);
    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.