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);
    simulator.setNextElement(nextElement);

    Learner learner2 = null;
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(largePTAFileName);
    final LearnerSimulator simulator = new LearnerSimulator(inputStream,true);
    Configuration defaultConfig = Configuration.getDefaultConfiguration();
    PaperUAS paper = new PaperUAS();
    paper.learnerInitConfiguration = simulator.readLearnerConstructionData(defaultConfig);
    final org.w3c.dom.Element nextElement = simulator.expectNextElement(StatechumXML.ELEM_INIT.name());
    final ProgressDecorator.InitialData initial = simulator.readInitialData(nextElement);
    inputStream.close();

    Configuration learnerConf = paper.learnerInitConfiguration.config.copy();learnerConf.setTransitionMatrixImplType(trTypeFinal);
        FileReader listOptReader = new FileReader(largePTALogsDir+pairsToUse);
View Full Code Here

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()

    try {
      Configuration config = Configuration.getDefaultConfiguration().copy();
      final java.io.FileInputStream inputStream = new java.io.FileInputStream(logFileName);
      final LearnerSimulator simulator = new LearnerSimulator(inputStream,true);
      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

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.