Examples of generatePosNeg()


Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

   
    {
      Collection<List<Label>> sequences =new LinkedHashSet<List<Label>>();
      RandomPathGenerator rpg = new RandomPathGenerator(from, new Random(0),4, from.getInit());// the seed for Random should be the same for each file
      long startTime = System.nanoTime();
      rpg.generatePosNeg((graphComplexity+1)*states , 1);
      outcome.setValue(LONG_V.DURATION_RAND,System.nanoTime()-startTime);
      sequences.addAll(rpg.getAllSequences(0).getData(PTASequenceEngine.truePred));
      sequences.addAll(rpg.getExtraSequences(0).getData(PTASequenceEngine.truePred));
      Pair<Double,Long> randSeq = compareLang(from, to, sequences);
      outcome.setValue(LONG_V.DURATION_RAND, outcome.getValue(LONG_V.DURATION_RAND)+randSeq.secondElem);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 4*graph.getStateNumber();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.
      /*
      RPNIBlueFringeLearner l = new RPNIBlueFringeLearnerTestComponentOpt(null,config)
      {
        @Override
        protected Pair<Integer,String> checkWithEndUser(
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

   
    int size = 4*graph.getStateNumber();
    RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5);// the seed for Random should be the same for each file
    int percentPerChunk = 10;
    int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
    rpg.generatePosNeg(nrPerChunk , 100/percentPerChunk);
   
    RPNIBlueFringeLearnerTestComponentOpt l = new RPNIBlueFringeLearnerTestComponentOpt(null,config)
    {
      @Override
      protected Pair<Integer,String> checkWithEndUser(
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 4*graph.getStateNumber();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined. 
     
      RPNIBlueFringeLearner l = null;
     
      if (useAmber)
      {
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    protected void buildSets()
    {
      loadGraph();
      int size = graph.paths.getGraph().getEdges().size()*4;// FIXME: this one ignores parallel edges
        RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),3);// the seed for Random should be the same for each file
      rpg.generatePosNeg(size, experiment.getStageNumber());
      pta = rpg.getAllSequences(percent);
    }
  }
 
  public static Collection<List<String>> getPositiveStrings(DirectedSparseGraph graph, Collection<List<String>> samples){
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    /** This method is executed on an executor thread. */
    public void runTheExperiment()
    {
      int sampleSize = (graph.getStateNumber()*4);
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5);// the seed for Random should be the same for each file
      rpg.generatePosNeg(sampleSize, 2)
      Collection<List<String>> tests = rpg.getAllSequencesPercentageInterval(0).getData();
      LearnerAccuracyTracker l = new LearnerAccuracyTracker(null,config, graph, tests)
      {
        @Override
        protected Pair<Integer,String> checkWithEndUser(
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 4*graph.getStateNumber();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.
      /*
      RPNIBlueFringeLearner l = new RPNIBlueFringeLearnerTestComponentOpt(null,config)
      {
        @Override
        protected Pair<Integer,String> checkWithEndUser(
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 2*graph.pathroutines.countEdges();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.  */
      LearnerEvaluationConfiguration evaluationConfiguration = new LearnerEvaluationConfiguration(null,null,config,null,null);
      evaluationConfiguration.setLabelConverter(experiment.getLabelConverter());
      RPNILearner learner = new RPNIUniversalLearner(null,evaluationConfiguration)
      {
        @Override
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

    {
      int size = 2*graph.pathroutines.countEdges();
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      int percentPerChunk = 10;
      int nrPerChunk = size/(100/percentPerChunk);nrPerChunk+=nrPerChunk % 2;// make the number even
      rpg.generatePosNeg(2*nrPerChunk , 100/percentPerChunk);// 2* reflects the fact that nrPerChunk denotes the number of elements in both chunks (positive and negative) combined.  */
      LearnerEvaluationConfiguration evaluationConfiguration = new LearnerEvaluationConfiguration(null,null,config,null,null);
      evaluationConfiguration.setLabelConverter(experiment.getLabelConverter());
      RPNILearner learner = new RPNIUniversalLearner(null,evaluationConfiguration)
      {
        @Override
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.RandomPathGenerator.generatePosNeg()

   
    {
      Collection<List<Label>> sequences =new LinkedHashSet<List<Label>>();
      RandomPathGenerator rpg = new RandomPathGenerator(from, new Random(0),4, from.getInit());// the seed for Random should be the same for each file
      long startTime = System.nanoTime();
      rpg.generatePosNeg((graphComplexity+1)*states , 1);
      outcome.setValue(LONG_V.DURATION_RAND,System.nanoTime()-startTime);
      sequences.addAll(rpg.getAllSequences(0).getData(PTASequenceEngine.truePred));
      sequences.addAll(rpg.getExtraSequences(0).getData(PTASequenceEngine.truePred));
      Pair<Double,Long> randSeq = compareLang(from, to, sequences);
      outcome.setValue(LONG_V.DURATION_RAND, outcome.getValue(LONG_V.DURATION_RAND)+randSeq.secondElem);
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.