Package statechum.model.testset

Examples of statechum.model.testset.PTA_FSMStructure


    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


    Set<Label> alphabet =  coregraph.learnerCache.getAlphabet();
    List<List<Label>> stateCover = coregraph.pathroutines.computeStateCover(initialState);
    characterisationSet = computeWSet_reducedmemory(coregraph);if (characterisationSet.isEmpty()) characterisationSet.add(Arrays.asList(new Label[]{}));
    transitionCover = crossWithSet(stateCover,alphabet);transitionCover.addAll(stateCover);

    PTASequenceEngine engine = new PTA_FSMStructure(coregraph,initialState);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(stateCover);
   
    partialPTA.cross(characterisationSet);
    for(int i=0;i<=numberOfExtraStates;i++)
View Full Code Here

    System.out.println(pr.getPosprecision()+", "+pr.getPosrecall()+", "+pr.getNegprecision()+", "+pr.getNegrecall());
  }
 
  public static PosNegPrecisionRecall compare(LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(specfsm.wmethod.getFullTestSet(1));
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
View Full Code Here

    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
 
  public static PosNegPrecisionRecall compare(Collection<List<Label>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
    PTASequenceEngine engine = new PTA_FSMStructure(specfsm,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(tests);
    precRec.crossWith(engine);return precRec.getPosNegPrecisionRecallNum();
  }
View Full Code Here

    final RandomPathGenerator generator = new RandomPathGenerator(cvsGraph,new Random(0),5,null);
    final int posOrNegPerChunk = 50;
    generator.generateRandomPosNeg(posOrNegPerChunk*2,1);
    Collection<List<String>> 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

  }
 
  @Test
  public final void testPrecisionRecall0()
  {
    PTASequenceEngine en = new PTA_FSMStructure(fsm,null);
    SequenceSet seq = en.new SequenceSet();
    seq.crossWithSet(labelList(new String[] {"a"})); // appending anything to an empty sequence produces an empty sequence.
    TestPTASequenceEngine.vertifyPTA(en, 1, new String[][] {
        new String[] {}
    },fsm.config);
View Full Code Here

  @Test
  public final void testPrecisionRecall1()
  {
    // this graph gives the labelling to the sequences I add to the set of sequences with partialPTA.cross below.
    LearnerGraph mach = buildLearnerGraph("A-a->A-b-#B","testPrecisionRecall1",config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, // +
        new String[]{"b"}      // -
      },config));
View Full Code Here

  @Test
  public final void testPrecisionRecall2a()
  {
    LearnerGraph mach = buildLearnerGraph("A-a->A-b-#B","testPrecisionRecall2a",config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"},// +
        new String[]{"b"},      // -
        new String[]{"a", "b"// -, FP
View Full Code Here

  /** Same as 2a but using a different state as an initial state. */
  @Test
  public final void testPrecisionRecall2b()
  {
    LearnerGraph mach = buildLearnerGraph("A-a->A-b-#B","testPrecisionRecall2b",config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, // +
        new String[]{"b"}, // -
        new String[]{"a", "b"} // -, FP
View Full Code Here

 
  @Test
  public final void testPrecisionRecall3()
  {
    LearnerGraph mach = buildLearnerGraph("A-a->A-b-#B","testPrecisionRecall3",config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach,null);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","a","b"}, // -
        new String[]{"b"}, // -
        new String[]{"a", "b"} //, FP
View Full Code Here

TOP

Related Classes of statechum.model.testset.PTA_FSMStructure

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.