Package statechum.model.testset

Examples of statechum.model.testset.PTA_computePrecisionRecall.crossWith()


    engine = new PTA_FSMStructure(mach,null);
    partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b"}, // +
      },config));
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",1, precComputer.resultTP);
    assertEquals("false negatives",0, precComputer.resultFN);assertEquals("false positives",0, precComputer.resultFP);
    assertEquals("positives relevant",1, precComputer.pos_Rel);assertEquals("negatives relevant",0, precComputer.neg_Rel);
    assertEquals("positives retrieved",1, precComputer.pos_Ret);assertEquals("negatives retrieved",0, precComputer.neg_Ret);
  }
View Full Code Here


    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b"}, // +
      },config));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
   
    engine = new PTA_FSMStructure(mach,null);
    partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, // +
View Full Code Here

    engine = new PTA_FSMStructure(mach,null);
    partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a"}, // +
      },config));
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",1, precComputer.resultTP);
    assertEquals("false negatives",0, precComputer.resultFN);assertEquals("false positives",0, precComputer.resultFP);
    assertEquals("positives relevant",1, precComputer.pos_Rel);assertEquals("negatives relevant",0, precComputer.neg_Rel);
    assertEquals("positives retrieved",1, precComputer.pos_Ret);assertEquals("negatives retrieved",0, precComputer.neg_Ret);
  }
View Full Code Here

    SequenceSet partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b"}, // +
      },config));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
   
    engine = new PTA_FSMStructure(mach,null);
    partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b"}, // +
View Full Code Here

    engine = new PTA_FSMStructure(mach,null);
    partialPTA = engine.new SequenceSet();partialPTA.setIdentity();
    partialPTA = partialPTA.cross(TestFSMAlgo.buildSet(new String[][] {
        new String[] {"a","a","a","b"}, // +
      },config));
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
    assertEquals("false negatives",0, precComputer.resultFN);assertEquals("false positives",0, precComputer.resultFP);
    assertEquals("positives relevant",0, precComputer.pos_Rel);assertEquals("negatives relevant",0, precComputer.neg_Rel);
    assertEquals("positives retrieved",0, precComputer.pos_Ret);assertEquals("negatives retrieved",0, precComputer.neg_Ret);
  }
View Full Code Here

    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"}
      },config));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
    assertEquals("false negatives",0, precComputer.resultFN);assertEquals("false positives",0, precComputer.resultFP);
    assertEquals("positives relevant",0, precComputer.pos_Rel);assertEquals("negatives relevant",0, precComputer.neg_Rel);
    assertEquals("positives retrieved",0, precComputer.pos_Ret);assertEquals("negatives retrieved",0, precComputer.neg_Ret);
View Full Code Here

    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"}
      },config));
    PTA_computePrecisionRecall precComputer = new PTA_computePrecisionRecall(fsm);
    precComputer.crossWith(engine);
    precComputer.crossWith(engine);
    assertEquals("true negatives",0, precComputer.resultTN);assertEquals("true positives",0, precComputer.resultTP);
    assertEquals("false negatives",0, precComputer.resultFN);assertEquals("false positives",0, precComputer.resultFP);
    assertEquals("positives relevant",0, precComputer.pos_Rel);assertEquals("negatives relevant",0, precComputer.neg_Rel);
    assertEquals("positives retrieved",0, precComputer.pos_Ret);assertEquals("negatives retrieved",0, precComputer.neg_Ret);
  }
View Full Code Here

   
    // Second, we run them on both graphs
   
    PosNegPrecisionRecall bruteForcePR = computePrecisionRecall(graph, sequences);
    PTA_computePrecisionRecall precRec = new PTA_computePrecisionRecall(graph);
    precRec.crossWith(sequences);
    PosNegPrecisionRecall actualPR = precRec.getPosNegPrecisionRecallNum();
   
    // Third, we compare precision/recall computed in two different ways
   
    assertEquals("pos precision",bruteForcePR.getPosprecision(), actualPR.getPosprecision(),Configuration.fpAccuracy);
View Full Code Here

   
    PTA_computePrecisionRecall precRec = null;
   
    {
      precRec = new PTA_computePrecisionRecall(markovD);
      precRec.crossWith(walkEngine);PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      final String name = "Markov";
      System.out.println(name+": +precision "+result.getPosprecision()+" +recall: "+result.getPosrecall());
      System.out.println(name+": -precision "+result.getNegprecision()+" -recall: "+result.getNegrecall());
      System.out.println(name+": =precision "+result.getPrecision()+" =recall: "+result.getRecall());
    }
View Full Code Here

      System.out.println(name+": =precision "+result.getPrecision()+" =recall: "+result.getRecall());
    }

    {
      precRec = new PTA_computePrecisionRecall(edsm);
      precRec.crossWith(walkEngine);PosNegPrecisionRecall result = precRec.getPosNegPrecisionRecallNum();
      final String name = "EDSM";
      System.out.println(name+": +precision "+result.getPosprecision()+" +recall: "+result.getPosrecall());
      System.out.println(name+": -precision "+result.getNegprecision()+" -recall: "+result.getNegrecall());
      System.out.println(name+": =precision "+result.getPrecision()+" =recall: "+result.getRecall());
    }
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.