Examples of generatePosNeg()


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

       final Collection<List<Label>> wMethod = graphReference.wmethod.getFullTestSet(1);
       int wPos=0;
       for(List<Label> seq:wMethod) if (graphReference.paths.tracePathPrefixClosed(seq) == AbstractOracle.USER_ACCEPTED) wPos++;
       System.out.println("before rnd: "+wMethod.size()+" sequences, "+wPos+" positives");
       RandomPathGenerator pathGen = new RandomPathGenerator(graphReference,new Random(0),5,graphReference.getInit());
       pathGen.generatePosNeg(2*(wMethod.size()-wPos), 1);
       wMethod.addAll(pathGen.getExtraSequences(0).getData());
       System.out.println("after rnd: "+wMethod.size()+" sequences");
      
      
       DrawGraphs gr = new DrawGraphs();
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

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

       final Collection<List<Label>> wMethod = graphReference.wmethod.getFullTestSet(1);
       int wPos=0;
       for(List<Label> seq:wMethod) if (graphReference.paths.tracePathPrefixClosed(seq) == AbstractOracle.USER_ACCEPTED) wPos++;
       System.out.println("before rnd: "+wMethod.size()+" sequences, "+wPos+" positives");
       RandomPathGenerator pathGen = new RandomPathGenerator(graphReference,new Random(0),5,graphReference.getInit());
       pathGen.generatePosNeg(2*(wMethod.size()-wPos), 1);
       wMethod.addAll(pathGen.getExtraSequences(0).getData());
       System.out.println("after rnd: "+wMethod.size()+" sequences");
      
      
       DrawGraphs gr = new DrawGraphs();
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.