Examples of cross()


Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

 
  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();
  }
 
  public static PosNegPrecisionRecall compare(Collection<List<String>> tests, LearnerGraph specfsm, LearnerGraph imp){
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(imp);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

 
  public static PosNegPrecisionRecall compare(Collection<List<String>> 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();
  }
/*
  private static void printTests(Collection<List<String>> tests){
    for (List<String> list : tests) {
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

    PTASequenceEngine engine = null;
    if (!useNegatives)
    {
      PTASequenceEngine positives = new PTASequenceEngine();positives.init(new Automaton());
      SequenceSet initSeq = positives.new SequenceSet();initSeq.setIdentity();
      initSeq.cross(engineArg.getData());
      engine = positives;
    }
    else
      engine = engineArg;
   
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  public final void testPrecisionRecall1()
  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("A-a->A-b-#B","testPrecisionRecall1"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, new String[]{"b"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(3, precComputer.pos_relret);assertEquals(1, precComputer.neg_relret);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  public final void testPrecisionRecall2()
  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("A-a->A-b-#B","testPrecisionRecall2"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);
    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"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(3, precComputer.pos_relret);assertEquals(1, precComputer.neg_relret);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  public final void testPrecisionRecall3()
  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("A-a->A-b-#B","testPrecisionRecall3"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);
    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"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(4, precComputer.pos_relret);assertEquals(2, precComputer.neg_relret);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  public final void testPrecisionRecall4()
  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("AM-a->BM-a->AM\nBM-b->CM-a->DM","testPrecisionRecall4"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);
    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", "c"}, new String[]{"a", "b", "a"}
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(5, precComputer.pos_relret);assertEquals(2, precComputer.neg_relret);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  public final void testPrecisionRecall5() // long test sequence (which exists) which is rejected part-way
  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall5"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","b","b","c","c"},
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(2, precComputer.pos_relret);assertEquals(0, precComputer.neg_relret);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  public final void testPrecisionRecall6() // long test sequence (which does not exist) which is rejected part-way
  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall6"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);
    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","b","b","c","c","d"},
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    assertEquals(2, precComputer.pos_relret);assertEquals(1, precComputer.neg_relret);
View Full Code Here

Examples of statechum.model.testset.PTASequenceEngine.SequenceSet.cross()

  {
    LearnerGraph mach = new LearnerGraph(TestFSMAlgo.buildGraph("AM-a->AM-b->AM-c->AM","testPrecisionRecall_ign1"),config);
    PTASequenceEngine engine = new PTA_FSMStructure(mach);

    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a"},
      }));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
   
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.