Package statechum.analysis.learning.observers.ProgressDecorator

Examples of statechum.analysis.learning.observers.ProgressDecorator.LearnerEvaluationConfiguration


  public void testAuto3()
  {
    config.setGdFailOnDuplicateNames(false);
    config.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);

    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          @SuppressWarnings("unused"List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here


  public void testAuto4()
  {
    config.setGdFailOnDuplicateNames(false);
    config.setLearnerIdMode(IDMode.POSITIVE_NEGATIVE);

    RPNILearner learner = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,config,null,null))
    {
      @Override
      public Pair<Integer,String> CheckWithEndUser(
          @SuppressWarnings("unused"LearnerGraph model,
          @SuppressWarnings("unused"List<Label> question, @SuppressWarnings("unused") int responseForNoRestart,
View Full Code Here

     
    public RPNIBlueFringe(final Configuration conf, boolean optimisedMerge, final List<PairOfPaths> lw, final List<PairOfPaths> lc)
    {
      listOfPairsToWrite = lw;useOptimizedMerge = optimisedMerge;
      if (lc != null) listOfPairsToCheckAgainstIterator = lc.iterator();else listOfPairsToCheckAgainstIterator = null;
      final LearnerEvaluationConfiguration bfLearnerInitConfiguration = new LearnerEvaluationConfiguration(conf);bfLearnerInitConfiguration.ifthenSequences = PaperUAS.this.learnerInitConfiguration.ifthenSequences;
      config = bfLearnerInitConfiguration.config;// our config is a copy of the one supplied as an argument.
      config.setAskQuestions(false);
      learner = new DummyLearner(new RPNIUniversalLearner(null, bfLearnerInitConfiguration))
      {
        @Override
View Full Code Here

      config.setMinCertaintyThreshold(2);
      //config.setAskQuestions(false);
      //config.setKlimit(2);
      //config.setLearnerScoreMode(Configuration.ScoreMode.KTAILS);
      config.setLearnerScoreMode(Configuration.ScoreMode.CONVENTIONAL);
      LearnerEvaluationConfiguration evaluationConfiguration = new LearnerEvaluationConfiguration(null,null,config,null,null);
      evaluationConfiguration.setLabelConverter(experiment.getLabelConverter());
      Learner l = new AccuracyTrackerDecorator(new RPNIUniversalLearner(null,evaluationConfiguration)
      {
        @Override
        public Pair<Integer,String> CheckWithEndUser(
            @SuppressWarnings("unused"LearnerGraph model,
View Full Code Here

      LearnerGraph ifthen = Transform.buildIfThenAutomata(learnerInitConfiguration.ifthenSequences, lr.init(sPlus, sMinus),
          learnerInitConfiguration.config).toArray(new LearnerGraph[0])[0];
      Visualiser.updateFrame(ifthen, null);
      Visualiser.waitForKey();
      */
      RPNILearner l = new RPNIUniversalLearner(null, new LearnerEvaluationConfiguration(null,null,learnerInitConfiguration.config,learnerInitConfiguration.ifthenSequences,null));
      //AccuracyTrackerDecorator atd = new  AccuracyTrackerDecorator(new MachineOracleDecorator(l,targetMachine),targetMachine);
      AccuracyTrackerDecorator atd = new  AccuracyTrackerDecorator(l,targetMachine);
      //atd.init(sPlus, sMinus);
      OutputUtil.generateDotOutput(targetMachine.pathroutines.getGraph(),"dotOutput.dot");
      Learner autoAns = new AutoAnswers(atd);
View Full Code Here

   */
  public RPNIBlueFringeVariability(final LearnerEvaluationConfiguration evaluationConfiguration, boolean optimisedMerge, final List<PairOfPaths> lw, final List<PairOfPaths> lc)
  {
    listOfPairsToWrite = lw;useOptimizedMerge = optimisedMerge;
    if (lc != null) listOfPairsToCheckAgainstIterator = lc.iterator();else listOfPairsToCheckAgainstIterator = null;
    final LearnerEvaluationConfiguration bfLearnerInitConfiguration = new LearnerEvaluationConfiguration(evaluationConfiguration.config);
    bfLearnerInitConfiguration.ifthenSequences = evaluationConfiguration.ifthenSequences;
    bfLearnerInitConfiguration.setLabelConverter(evaluationConfiguration.getLabelConverter());
    config = bfLearnerInitConfiguration.config;// our config is a copy of the one supplied as an argument.
    config.setAskQuestions(false);
    learner = new DummyLearner(new RPNIUniversalLearner(null, bfLearnerInitConfiguration))
    {
     
View Full Code Here

        java.io.FileInputStream is = null;java.io.FileOutputStream os = null;
        try
        {
          is = new java.io.FileInputStream(sourceFile);
          LearnerSimulator simulator = new LearnerSimulator(is,true,null);// not using a converter
          LearnerEvaluationConfiguration evaluationData = simulator.readLearnerConstructionData(null);
          evaluationData.config.setGdFailOnDuplicateNames(false);evaluationData.graphNumber=graphsInFile;
          final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
          final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
          simulator.setNextElement(nextElement);
          Configuration recorderConfig = evaluationData.config.copy();recorderConfig.setCompressLogs(true);recorderConfig.setGdMaxNumberOfStatesInCrossProduct(0);
View Full Code Here

      QSMTool.cmdOperation+" "+lbl("B")+" "+SmtLabelRepresentation.OP_DATA.POST+ " somePostcondB"}));

    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    dumper.topElement.appendChild(dumper.writeLearnerEvaluationConfiguration(
        new LearnerEvaluationConfiguration(graph,testData,config,ltl,labels)));dumper.close();
   
    xmlData = output.toString();
  }
View Full Code Here

  /** Success. */
  @Test
  public final void testLearnerEvaluation1()
  {
    LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    LearnerEvaluationConfiguration cnf=loader.readLearnerEvaluationConfiguration(loader.expectNextElement(StatechumXML.ELEM_EVALUATIONDATA.name()),config);
    WMethod.checkM(cnf.graph, graph);
    Assert.assertEquals(testData, cnf.testSet);
    Assert.assertEquals(config, cnf.config);
    Assert.assertEquals(cnf.config, cnf.graph.config);
    Assert.assertEquals(ltl,cnf.ifthenSequences);
View Full Code Here

  @Test
  public final void testLearnerEvaluation2()
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    RecordProgressDecorator dumper = new RecordProgressDecorator(null,output,1,config,false);
    Element learnerConfig = dumper.writeLearnerEvaluationConfiguration(new LearnerEvaluationConfiguration(graph,testData,anotherconfig,ltl,labels));
    Element configToRemove = (Element)StatechumXML.getChildWithTag(learnerConfig,Configuration.configXMLTag).item(0);
    learnerConfig.removeChild(configToRemove);
   
    dumper.topElement.appendChild(learnerConfig);dumper.close();xmlData = output.toString();
   
    LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false,converter);
    LearnerEvaluationConfiguration cnf=loader.readLearnerEvaluationConfiguration(loader.expectNextElement(StatechumXML.ELEM_EVALUATIONDATA.name()),anotherconfig);
    WMethod.checkM(cnf.graph, graph);
    Assert.assertEquals(testData, cnf.testSet);
    Assert.assertEquals(anotherconfig, cnf.config);
    Assert.assertEquals(cnf.config, cnf.graph.config);
    Assert.assertEquals(ltl,cnf.ifthenSequences);
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.observers.ProgressDecorator.LearnerEvaluationConfiguration

Copyright © 2018 www.massapicom. 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.