Package statechum.analysis.learning

Examples of statechum.analysis.learning.PairScore


  /** Tests comparison of a pair to other pairs. All values are equal. */
  @Test
  public void TestCreateComparePairs1()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),0,0),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),0,0),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,0);

    List<PairScore> pairs = Arrays.asList(new PairScore[]{pairB,pairC});
    testClassifier.buildSetsForComparatorsThatDoNotDependOnFiltering(pairs, tentativeGraph);
    int [] buffer= new int[2];
    testClassifier.comparePairWithOthers(pairA, pairs,buffer,0);
View Full Code Here


  /** Tests comparison of a pair to other pairs. The case of domination. */
  @Test
  public void TestCreateComparePairs2()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,0),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),0,0),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,0);

    List<PairScore> pairs = Arrays.asList(new PairScore[]{pairB,pairC});
    testClassifier.buildSetsForComparatorsThatDoNotDependOnFiltering(pairs, tentativeGraph);
    int [] buffer= new int[2];
    testClassifier.comparePairWithOthers(pairA, pairs,buffer,0);
View Full Code Here

  /** Tests comparison of a pair to other pairs. The case of dominates or equals and that of being dominated */
  @Test
  public void TestCreateComparePairs3()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,-1),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),1,0),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,0);

    List<PairScore> pairs = Arrays.asList(new PairScore[]{pairB,pairC});
    testClassifier.buildSetsForComparatorsThatDoNotDependOnFiltering(pairs, tentativeGraph);
    int [] buffer= new int[2];
    testClassifier.comparePairWithOthers(pairA, pairs,buffer,0);
View Full Code Here

  /** Tests comparison of a pair to other pairs. The case of dominates or equals and that of being dominated. Checks that values can be recorded at an offset. */
  @Test
  public void TestCreateComparePairs3a()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,-1),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),1,0),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,0);

    List<PairScore> pairs = Arrays.asList(new PairScore[]{pairB,pairC});
    testClassifier.buildSetsForComparatorsThatDoNotDependOnFiltering(pairs, tentativeGraph);
    int [] buffer= new int[]{9,8,7,6};
    testClassifier.comparePairWithOthers(pairA, pairs,buffer,1);
View Full Code Here

  /** Tests comparison of a pair to other pairs. Tests that contradictory responses are flagged. */
  @Test
  public void TestCreateComparePairs4()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,0),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),0,1),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),2,0);

    List<PairScore> pairs = Arrays.asList(new PairScore[]{pairB,pairC});
    testClassifier.buildSetsForComparatorsThatDoNotDependOnFiltering(pairs, tentativeGraph);
    int [] buffer= new int[2];
    testClassifier.comparePairWithOthers(pairA, pairs,buffer,0);
View Full Code Here

  /** Tests comparison of a pair to other pairs. Tests that contradictory responses are flagged. */
  @Test
  public void TestCreateComparePairs5()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,0),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),0,1),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),2,0);

    List<PairScore> pairs = Arrays.asList(new PairScore[]{pairA,pairC});
    testClassifier.buildSetsForComparatorsThatDoNotDependOnFiltering(pairs, tentativeGraph);
    int [] buffer= new int[2];
    testClassifier.comparePairWithOthers(pairB, pairs,buffer,0);
View Full Code Here

  /** Tests comparison of a pair to other pairs, taking into account if-then conditions. */
  @Test
  public void TestCreateComparePairs6()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,-1),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),0,0),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,1),
      pairD=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),1,0);

    WekaDataCollector dataCollector = new WekaDataCollector();
    List<PairRank> assessors = new ArrayList<PairRank>(20);
    assessors.add(dataCollector.new PairRank("statechum score")
    {// 1
View Full Code Here

            CmpVertex currentBlueState = BlueEntry.getValue();
           
            int numberOfCompatiblePairs = 0;
            for(CmpVertex oldRed:reds)
            {
              PairScore pair = obtainPair(currentBlueState,oldRed,decisionProcedure);
              if (pair.getScore() >= coregraph.config.getGeneralisationThreshold())
              {
                coregraph.pairsAndScores.add(pair);
                ++numberOfCompatiblePairs;
                if (GlobalConfiguration.getConfiguration().isAssertEnabled() && coregraph.config.getDebugMode()) PathRoutines.checkPTAConsistency(coregraph, currentBlueState);
              }
View Full Code Here

  /** Tests comparison of a pair to other pairs, taking into account if-then conditions. */
  @Test
  public void TestCreateComparePairs7()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    final PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,1),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),1,1),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,0),
      pairD=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),1,0);

    WekaDataCollector dataCollector = new WekaDataCollector();
    List<PairRank> assessors = new ArrayList<PairRank>(20);
    assessors.add(dataCollector.new PairRank("statechum score")
    {// 1
View Full Code Here

  /** Tests comparison of a pair to other pairs, taking into account if-then conditions. */
  @Test
  public void TestCreateComparePairs6_arrayTooSmall()
  {
    // Using test data from testSplitSetOfPairsIntoRightAndWrong3, pairs A and B are right and C is wrong.
    final PairScore
      pairA = new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("A2"),1,-1),
      pairB=new PairScore(tentativeGraph.findVertex("B1"), tentativeGraph.findVertex("B2"),0,0),
      pairC=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),0,1),
      pairD=new PairScore(tentativeGraph.findVertex("A1"), tentativeGraph.findVertex("B2"),1,0);

    final WekaDataCollector dataCollector = new WekaDataCollector();
    List<PairRank> assessors = new ArrayList<PairRank>(20);
    assessors.add(dataCollector.new PairRank("statechum score")
    {// 1
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.PairScore

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.