Examples of generateRandomPosNeg()


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

      // For the purpose of generating long traces, we construct as many traces as there are states but these traces have to be rather long,
      // that is, length of traces will be (random(pathLength)+1)*sequencesPerChunk/states and the number of traces generated will be the same as the number of states.
      final int tracesToGenerate = 20;//PairQualityLearner.makeEven(states*traceQuantity*3);
      final Random rnd = new Random(seed*31+attempt);
     
      generator.generateRandomPosNeg(tracesToGenerate, 1, false, new RandomLengthGenerator() {
                 
          @Override
          public int getLength() {
            return  6;//10*(rnd.nextInt(pathLength)+1)*sequencesPerChunk/tracesToGenerate;
          }
 
View Full Code Here

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

        // The total number of elements in test sequences (alphabet*states*traceQuantity) will be distributed around (random(pathLength)+1). The total size of PTA is a product of these two.
        // For the purpose of generating long traces, we construct as many traces as there are states but these traces have to be rather long,
        // that is, length of traces will be (random(pathLength)+1)*sequencesPerChunk/states and the number of traces generated will be the same as the number of states.
        final int tracesToGenerate = makeEven(traceQuantity);
        final Random rnd = new Random(seed*31+attempt);
        generator.generateRandomPosNeg(tracesToGenerate, 1, false, new RandomLengthGenerator() {
                   
            @Override
            public int getLength() {
              return (rnd.nextInt(pathLength)+1)*lengthMultiplier;
            }
 
View Full Code Here

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

              RandomPathGenerator randomPaths = new RandomPathGenerator(deterministicGraph,randomGenerator.getRandom(entryA.getKey()),
                  extraLength+config.getGdScoreComputationAlgorithm_RandomWalk_ExtraLength(),state,matrixForward.pathroutines.computeAlphabet());
              if (config.getGdScoreComputationAlgorithm_RandomWalk_PathLength() > 0)
                randomPaths.setPathLength(config.getGdScoreComputationAlgorithm_RandomWalk_PathLength());
              randomPaths.generateRandomPosNeg(config.getGdScoreComputationAlgorithm_RandomWalk_NumberOfSequences(), 1,false);
              graphwalk=new GraphAndWalk(deterministicGraph,randomPaths.getAllSequences(0));
            }
            break;
          case SCORE_TESTSET:
            graphwalk=new GraphAndWalk(deterministicGraph,deterministicGraph.wmethod.computeNewTestSet(state, config.getGdScoreComputationAlgorithm_TestSet_ExtraStates()));
View Full Code Here

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

   
    Visualiser.waitForKey();
    */
    final RandomPathGenerator generator = new RandomPathGenerator(cvsGraph,new Random(0),5,null);
    final int posOrNegPerChunk = 45;
    generator.generateRandomPosNeg(posOrNegPerChunk*2,1);

    System.out.println(generator.getAllSequences(0).getData(new FilterPredicate()
    {
      @Override
      public boolean shouldBeReturned(Object name) {
View Full Code Here

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

              RandomPathGenerator randomPaths = new RandomPathGenerator(deterministicGraph,randomGenerator.getRandom(entryA.getKey()),
                  extraLength+config.getGdScoreComputationAlgorithm_RandomWalk_ExtraLength(),state,matrixForward.pathroutines.computeAlphabet());
              if (config.getGdScoreComputationAlgorithm_RandomWalk_PathLength() > 0)
                randomPaths.setPathLength(config.getGdScoreComputationAlgorithm_RandomWalk_PathLength());
              randomPaths.generateRandomPosNeg(config.getGdScoreComputationAlgorithm_RandomWalk_NumberOfSequences(), 1,false);
              graphwalk=new GraphAndWalk(deterministicGraph,randomPaths.getAllSequences(0));
            }
            break;
          case SCORE_TESTSET:
            graphwalk=new GraphAndWalk(deterministicGraph,deterministicGraph.wmethod.computeNewTestSet(state, config.getGdScoreComputationAlgorithm_TestSet_ExtraStates()));
View Full Code Here

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

    @Override
    public void runTheExperiment()
    {
      int sampleSize = (graph.getStateNumber()*4);
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      rpg.generateRandomPosNeg(sampleSize, 2)
      //Collection<List<String>> tests = graph.wmethod.getFullTestSet(1);
      config.setDebugMode(true);
      config.setAskQuestions(true);
      config.setSpeculativeQuestionAsking(true);
      config.setMinCertaintyThreshold(2);
View Full Code Here

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

   
    Visualiser.waitForKey();
    */
    final RandomPathGenerator generator = new RandomPathGenerator(cvsGraph,new Random(0),5,null);
    final int posOrNegPerChunk = 45;
    generator.generateRandomPosNeg(posOrNegPerChunk*2,1);

    System.out.println(generator.getAllSequences(0).getData(new FilterPredicate()
    {
      @Override
      public boolean shouldBeReturned(Object name) {
View Full Code Here

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

    assert origAlphabet.equals(markov.pathroutines.computeAlphabet());
    assert origAlphabet.equals(markovD.pathroutines.computeAlphabet());
    assert origAlphabet.equals(edsm.pathroutines.computeAlphabet());
    final RandomPathGenerator generator = new RandomPathGenerator(cvsGraph,new Random(0),5,null);
    final int posOrNegPerChunk = 50;
    generator.generateRandomPosNeg(posOrNegPerChunk*2,1);
    Collection<List<Label>> sequences = cvsGraph.wmethod.getFullTestSet(1);//generator.getAllSequences(0).getData(PTASequenceEngine.truePred);

    PTASequenceEngine walkEngine = new PTA_FSMStructure(cvsGraph,null);
    SequenceSet ptaWalk = walkEngine.new SequenceSet();ptaWalk.setIdentity();
    ptaWalk = ptaWalk.cross(sequences);
View Full Code Here

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

    @Override
    public void runTheExperiment()
    {
      int sampleSize = (graph.getStateNumber()*4);
      RandomPathGenerator rpg = new RandomPathGenerator(graph, new Random(100),5,null);// the seed for Random should be the same for each file
      rpg.generateRandomPosNeg(sampleSize, 2)
      //Collection<List<String>> tests = graph.wmethod.getFullTestSet(1);
      config.setDebugMode(true);
      config.setAskQuestions(true);
      config.setSpeculativeQuestionAsking(true);
      config.setMinCertaintyThreshold(2);
View Full Code Here

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

    assert origAlphabet.equals(markov.pathroutines.computeAlphabet());
    assert origAlphabet.equals(markovD.pathroutines.computeAlphabet());
    assert origAlphabet.equals(edsm.pathroutines.computeAlphabet());
    final RandomPathGenerator generator = new RandomPathGenerator(cvsGraph,new Random(0),5,null);
    final int posOrNegPerChunk = 50;
    generator.generateRandomPosNeg(posOrNegPerChunk*2,1);
    Collection<List<Label>> sequences = cvsGraph.wmethod.getFullTestSet(1);//generator.getAllSequences(0).getData(PTASequenceEngine.truePred);

    PTASequenceEngine walkEngine = new PTA_FSMStructure(cvsGraph,null);
    SequenceSet ptaWalk = walkEngine.new SequenceSet();ptaWalk.setIdentity();
    ptaWalk = ptaWalk.cross(sequences);
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.