Examples of clearColours()


Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

        PaperUAS.computePTASize(selectionID+" with unique "+uniqueFromInitial+" : ", pta, referenceGraph);
      }*/
      //Visualiser.updateFrame(referenceGraph, pta);
      //Visualiser.waitForKey();
     
      pta.clearColours();
     
      if (!onlyUsePositives)
      {
        assert pta.getStateNumber() > pta.getAcceptStateNumber() : "graph with only accept states but onlyUsePositives is not set";
        Map<Label,Set<Label>> infeasiblePairs = PairQualityLearner.computeInfeasiblePairs(referenceGraph);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

                            final MarkovModel m= new MarkovModel(3,true,true);

                            new MarkovClassifier(m, pta).updateMarkov(false);// construct Markov chain if asked for.
                            final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklistingIncludeMissingPrefixes();
                         
                            pta.clearColours();
                            EDSM_MarkovLearner learner = new EDSM_MarkovLearner(learnerInitConfiguration,pta,0) {

                              @Override
                              public Stack<PairScore> ChooseStatePairs(LearnerGraph graph)
                              {
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

          pta.paths.augmentPTA(generator.getAllSequences(0));// the PTA will have very few reject-states because we are generating few sequences and hence there will be few negative sequences.
          // In order to approximate the behaviour of our case study, we need to compute which pairs are not allowed from a reference graph and use those as if-then automata to start the inference.
         
        //pta.paths.augmentPTA(referenceGraph.wmethod.computeNewTestSet(referenceGraph.getInit(),1));
       
        pta.clearColours();
        synchronized (AbstractLearnerGraph.syncObj) {
          //PaperUAS.computePTASize(selectionID+" attempt: "+attempt+" with unique: ", pta, referenceGraph);
        }
       
        if (!onlyUsePositives)
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

        assert sPlus.size() > 0;
        assert sMinus.size() > 0;
        final MarkovUniversalLearner m= new MarkovUniversalLearner(chunkLen);
        m.createMarkovLearner(sPlus, sMinus);
       
        pta.clearColours();
        synchronized (AbstractLearnerGraph.syncObj) {
          //PaperUAS.computePTASize(selectionID+" attempt: "+attempt+" with unique: ", pta, referenceGraph);
        }
       
        if (!onlyUsePositives)
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

    */
    //DifferentFSMException diff = WMethod.checkM(ptaExpected, ptaExpected.getInit(), pta, pta.getInit(), WMethod.VERTEX_COMPARISON_KIND.NONE);Assert.assertNull(diff);
    final MarkovModel m= new MarkovModel(chunkLen,true,true,true);

    new MarkovClassifier(m, pta).updateMarkov(false);
    pta.clearColours();

    assert pta.getStateNumber() == pta.getAcceptStateNumber() : "graph with negatives but onlyUsePositives is set";
     
    final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
    LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

    LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> verticesToMergeInitialMerge = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int scoreInitialMerge = pta.pairscores.computePairCompatibilityScore_general(null, pairsListInitialMerge, verticesToMergeInitialMerge);
    assert scoreInitialMerge >= 0;
    final LearnerGraph ptaAfterInitialMerge = MergeStates.mergeCollectionOfVertices(pta, null, verticesToMergeInitialMerge);
    final CmpVertex vertexWithMostTransitions = MarkovPassivePairSelection.findVertexWithMostTransitions(ptaAfterInitialMerge,MarkovClassifier.computeInverseGraph(pta));
    ptaAfterInitialMerge.clearColours();ptaAfterInitialMerge.getInit().setColour(null);vertexWithMostTransitions.setColour(JUConstants.RED);
    ptaClassifier = new MarkovClassifier(m,ptaAfterInitialMerge);// rebuild the classifier
    LearnerGraphND inverseOfPtaAfterInitialMerge = MarkovClassifier.computeInverseGraph(ptaAfterInitialMerge);
    //System.out.println("Centre vertex: "+vertexWithMostTransitions+" "+MarkovPassivePairSelection.countTransitions(ptaAfterInitialMerge, inverseOfPtaAfterInitialMerge, vertexWithMostTransitions));
   
    // These have been recorded, there is no specific reason for the numbers to be as they are. We need them for regression testing.
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

   
        final MarkovModel m= new MarkovModel(chunkLen,true,true);

        new MarkovClassifier(m, pta).updateMarkov(false);// construct Markov chain if asked for.
       
        pta.clearColours();

        if (!onlyUsePositives)
          assert pta.getStateNumber() > pta.getAcceptStateNumber() : "graph with only accept states but onlyUsePositives is not set";
        else
          assert pta.getStateNumber() == pta.getAcceptStateNumber() : "graph with negatives but onlyUsePositives is set";
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

          assert scoreInitialMerge >= 0;
          ptaToUseForInference = MergeStates.mergeCollectionOfVertices(pta, null, verticesToMergeInitialMerge);
          final CmpVertex vertexWithMostTransitions = MarkovPassivePairSelection.findVertexWithMostTransitions(ptaToUseForInference,MarkovClassifier.computeInverseGraph(pta));
          if (useMostConnectedVertexToStartLearning)
          {
            ptaToUseForInference.clearColours();ptaToUseForInference.getInit().setColour(null);vertexWithMostTransitions.setColour(JUConstants.RED);
          }
          LearnerGraphND inverseOfPtaAfterInitialMerge = MarkovClassifier.computeInverseGraph(ptaToUseForInference);
          System.out.println("Centre vertex: "+vertexWithMostTransitions+" number of transitions: "+MarkovPassivePairSelection.countTransitions(ptaToUseForInference, inverseOfPtaAfterInitialMerge, vertexWithMostTransitions));
        }
       
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

        assert sPlus.size() > 0;
        assert sMinus.size() > 0;
        final MarkovModel m= new MarkovModel(chunkLen,true,true);
        m.createMarkovLearner(sPlus, sMinus,false);
       
        pta.clearColours();
        synchronized (AbstractLearnerGraph.syncObj) {
          //PaperUAS.computePTASize(selectionID+" attempt: "+attempt+" with unique: ", pta, referenceGraph);
        }
       
        if (!onlyUsePositives)
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraph.clearColours()

        LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> verticesToMergeInitialMerge = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
        int scoreInitialMerge = pta.pairscores.computePairCompatibilityScore_general(null, pairsListInitialMerge, verticesToMergeInitialMerge);
        assert scoreInitialMerge >= 0;
        final LearnerGraph ptaAfterInitialMerge = MergeStates.mergeCollectionOfVertices(pta, null, verticesToMergeInitialMerge);
        final CmpVertex vertexWithMostTransitions = MarkovPassivePairSelection.findVertexWithMostTransitions(ptaAfterInitialMerge,MarkovClassifier.computeInverseGraph(pta));
        ptaAfterInitialMerge.clearColours();ptaAfterInitialMerge.getInit().setColour(null);vertexWithMostTransitions.setColour(JUConstants.RED);
        ptaClassifier = new MarkovClassifier(m,ptaAfterInitialMerge);// rebuild the classifier
        LearnerGraphND inverseOfPtaAfterInitialMerge = MarkovClassifier.computeInverseGraph(ptaAfterInitialMerge);
        System.out.println("Centre vertex: "+vertexWithMostTransitions+" "+MarkovPassivePairSelection.countTransitions(ptaAfterInitialMerge, inverseOfPtaAfterInitialMerge, vertexWithMostTransitions));
       
        //learnerEval.config.setGeneralisationThreshold(1);
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.