Examples of expectNextElement()


Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

  public void copyLogIntoAnotherLog(String logFileName)
  {
    try {
      final LearnerSimulator simulator = new LearnerSimulator(new java.io.FileInputStream(logFileName),true);
      final LearnerEvaluationConfiguration evalData = simulator.readLearnerConstructionData();
      final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
      final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
      simulator.setNextElement(nextElement);
 
      RPNILearner learner2 = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,evalData.config,null,null))
      {
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

          evalData.config.setIgnoreDepthInTheChoiceOfRepresentatives(true);evalData.config.setIgnoreVertexAttributesInLogReplay(true);
        }
        else
          Assert.fail("unknown type of log file");

    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
    if (evalData.labelDetails != null)
    {
      initial.plus.addAll(evalData.labelDetails.getSPlus());initial.minus.addAll(evalData.labelDetails.getSMinus());
    }
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

    //defaultConfig.setRejectPositivePairsWithScoresLessThan(1);
    assert converter != null : "we expect this methods to be used with large graphs and Array matrix types hence converter must be set";
    outcome.learnerInitConfiguration = simulator.readLearnerConstructionData(defaultConfig);
    outcome.learnerInitConfiguration.setLabelConverter(converter);
   
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    outcome.initial = simulator.readInitialData(nextElement);
    inputStream.close();
    return outcome;
  }
 
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

    //defaultConfig.setRejectPositivePairsWithScoresLessThan(1);
    assert converter != null : "we expect this methods to be used with large graphs and Array matrix types hence converter must be set";
    outcome.learnerInitConfiguration = simulator.readLearnerConstructionData(defaultConfig);
    outcome.learnerInitConfiguration.setLabelConverter(converter);
   
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    outcome.initial = simulator.readInitialData(nextElement);
    inputStream.close();
    return outcome;
  }
 
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

    //defaultConfig.setRejectPositivePairsWithScoresLessThan(1);
    assert converter != null : "we expect this methods to be used with large graphs and Array matrix types hence converter must be set";
    outcome.learnerInitConfiguration = simulator.readLearnerConstructionData(defaultConfig);
    outcome.learnerInitConfiguration.setLabelConverter(converter);
   
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    outcome.initial = simulator.readInitialData(nextElement);
    inputStream.close();
    return outcome;
  }
 
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

public class Test_CheckLearnerAgainstLog {
  public void check(String logFileName) throws FileNotFoundException
  {
    final LearnerSimulator simulator = new LearnerSimulator(new java.io.FileInputStream(logFileName),true);
    final LearnerEvaluationConfiguration eval1 = simulator.readLearnerConstructionData();
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(ELEM_KINDS.ELEM_INIT.name());
    final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
    simulator.setNextElement(nextElement);
    RPNIBlueFringeLearner learner2 = new RPNIBlueFringeLearnerTestComponentOpt(null,eval1.config)
    {
      @Override
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

    //defaultConfig.setRejectPositivePairsWithScoresLessThan(1);
    assert converter != null : "we expect this methods to be used with large graphs and Array matrix types hence converter must be set";
    outcome.learnerInitConfiguration = simulator.readLearnerConstructionData(defaultConfig);
    outcome.learnerInitConfiguration.setLabelConverter(converter);
   
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    outcome.initial = simulator.readInitialData(nextElement);
    inputStream.close();
    return outcome;
  }
 
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

    final java.io.FileInputStream inputStream = new java.io.FileInputStream(argPTAFileName);
    final LearnerSimulator simulator = new LearnerSimulator(inputStream,true,converter);
    Configuration defaultConfig = Configuration.getDefaultConfiguration().copy();
    paper.learnerInitConfiguration = simulator.readLearnerConstructionData(defaultConfig);
    paper.learnerInitConfiguration.setLabelConverter(converter);
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
    inputStream.close();
    return initial;
  }
 
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

    try {
      Configuration config = Configuration.getDefaultConfiguration().copy();
      final java.io.FileInputStream inputStream = new java.io.FileInputStream(logFileName);
      final LearnerSimulator simulator = new LearnerSimulator(inputStream,true,null);// not using a converter
      final LearnerEvaluationConfiguration evalData = simulator.readLearnerConstructionData(config);
      final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
      final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
      simulator.setNextElement(nextElement);
 
      RPNILearner learner2 = new RPNIUniversalLearner(null,new LearnerEvaluationConfiguration(null,null,evalData.config,null,null))
      {
View Full Code Here

Examples of statechum.analysis.learning.observers.LearnerSimulator.expectNextElement()

          evalData.config.setIgnoreDepthInTheChoiceOfRepresentatives(true);evalData.config.setIgnoreVertexAttributesInLogReplay(true);
        }
        else
          Assert.fail("unknown type of log file");

    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
    if (evalData.labelDetails != null)
    {
      initial.plus.addAll(evalData.labelDetails.getSPlus());initial.minus.addAll(evalData.labelDetails.getSMinus());
    }
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.