Package statechum.analysis.learning.observers

Examples of statechum.analysis.learning.observers.LearnerSimulator


  public static InitialConfigurationAndData loadInitialAndPopulateInitialConfiguration(String argPTAFileName, Configuration configToUse, ConvertALabel converter) throws IOException
  {
    InitialConfigurationAndData outcome = new InitialConfigurationAndData();
   
    final java.io.FileInputStream inputStream = new java.io.FileInputStream(argPTAFileName);
    final LearnerSimulator simulator = new LearnerSimulator(inputStream,true,converter);
    Configuration defaultConfig = configToUse.copy();
    //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


  public static InitialConfigurationAndData loadInitialAndPopulateInitialConfiguration(String argPTAFileName, Configuration configToUse, ConvertALabel converter) throws IOException
  {
    InitialConfigurationAndData outcome = new InitialConfigurationAndData();
   
    final java.io.FileInputStream inputStream = new java.io.FileInputStream(argPTAFileName);
    final LearnerSimulator simulator = new LearnerSimulator(inputStream,true,converter);
    Configuration defaultConfig = configToUse.copy();
    //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

  {// this part is nested in order to ensure that an instance of LearnerSimulator
   // goes out of scope and is garbage collected as soon as possible. It holds a great deal
   // of Xerces objects used for recording execution traces that is not used in this test but takes
   // a lot of memory.
    final java.io.FileInputStream inputStream = new java.io.FileInputStream(argPTAFileName);
    final LearnerSimulator simulator = new LearnerSimulator(inputStream,true,converter);
    Configuration defaultConfig = Configuration.getDefaultConfiguration().copy();
    //defaultConfig.setRejectPositivePairsWithScoresLessThan(1);
    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

TOP

Related Classes of statechum.analysis.learning.observers.LearnerSimulator

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.