Examples of clearColours()


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()

      LearnerGraph pta=new LearnerGraph(config);
      for(List<Label> seq:sPlus)
        pta.paths.augmentPTA(seq,true,false,null);
      for(List<Label> seq:sMinus)
        pta.paths.augmentPTA(seq,false,false,null);
      pta.clearColours();
      new MarkovClassifier(m, pta).updateMarkov(false);// construct Markov chain
      // For Markov, we do not need to learn anything at all - our Markov matrix contains enough information to classify paths and hence compare it to the reference graph.
      ConfusionMatrix mat = DiffExperiments.classifyAgainstMarkov(testSet, referenceGraph, m);
      DifferenceToReferenceLanguageBCR differenceBCRMarkov = new DifferenceToReferenceLanguageBCR(mat);
     
View Full Code Here

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

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

                              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()

                                LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> verticesToMergeInitialMerge = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
                                int scoreInitialMerge = ptaInitial.pairscores.computePairCompatibilityScore_general(null, pairsListInitialMerge, verticesToMergeInitialMerge);
                                assert scoreInitialMerge >= 0;
                                ptaToUseForInference = MergeStates.mergeCollectionOfVertices(ptaInitial, null, verticesToMergeInitialMerge);
                                final CmpVertex vertexWithMostTransitions = MarkovPassivePairSelection.findVertexWithMostTransitions(ptaToUseForInference,MarkovClassifier.computeInverseGraph(ptaInitial));
                                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));
                               
                              }
                              ptaToUseForInference.clearColours();
View Full Code Here

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

                                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));
                               
                              }
                              ptaToUseForInference.clearColours();
                              EDSM_MarkovLearner learner = new EDSM_MarkovLearner(learnerInitConfiguration,ptaToUseForInference,0) {

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

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

                            LearnerGraph pta=new LearnerGraph(learnerInitConfiguration.config);
                            for(List<Label> seq:sPlus)
                              pta.paths.augmentPTA(seq,true,false,null);
                            for(List<Label> seq:sMinus)
                              pta.paths.augmentPTA(seq,false,false,null);
                            pta.clearColours();
                            ReferenceLearner learner = new ReferenceLearner(learnerInitConfiguration,null,pta,false) {

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

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

                            LearnerGraph pta=new LearnerGraph(learnerInitConfiguration.config);
                            for(List<Label> seq:sPlus)
                              pta.paths.augmentPTA(seq,true,false,null);
                            for(List<Label> seq:sMinus)
                              pta.paths.augmentPTA(seq,false,false,null);
                            pta.clearColours();
                            KTailsReferenceLearner learner = new KTailsReferenceLearner(learnerInitConfiguration,pta,true,1) {

                              @Override
                              public Stack<PairScore> ChooseStatePairs(LearnerGraph graph)
                              {
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);
        new MarkovClassifier(m, pta).updateMarkov(false);
        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()

        else
          pta.paths.augmentPTA(generator.getAllSequences(0));

        final MarkovModel m= new MarkovModel(chunkLen,true,true);
        new MarkovClassifier(m, pta).updateMarkov(false);
        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
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.