Package statechum.analysis.learning.MarkovClassifier

Examples of statechum.analysis.learning.MarkovClassifier.ConsistencyChecker


        final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
        LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

        LearnerGraph trimmedReference = MarkovPassivePairSelection.trimUncoveredTransitions(pta,referenceGraph);
       
        final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklisting();
        long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(referenceGraph, m, checker, false);
       
        learnerOfPairs = new LearnerMarkovPassive(learnerEval,referenceGraph,pta);learnerOfPairs.setMarkovModel(m);

        learnerOfPairs.setScoreComputationOverride(new RedPriorityOverBluePairSelectionRoutine(m));
View Full Code Here


        final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
        LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

        LearnerGraph trimmedReference = MarkovPassivePairSelection.trimUncoveredTransitions(pta,referenceGraph);
       
        final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklisting();
        long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(referenceGraph, m, checker, false);
       
        learnerOfPairs = new LearnerMarkovPassive(learnerEval,referenceGraph,pta);learnerOfPairs.setMarkovModel(m);

        learnerOfPairs.setScoreComputationOverride(new RedPriorityOverBluePairSelectionRoutine(m));
View Full Code Here

       
        final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
        LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

        LearnerGraph trimmedReference = MarkovPassivePairSelection.trimUncoveredTransitions(pta,referenceGraph);
        final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklistingIncludeMissingPrefixes();
        long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(trimmedReference, m, checker,false);

        LearnerGraph ptaToUseForInference = pta;
        Collection<Set<CmpVertex>> verticesToMergeBasedOnInitialPTA=null;
               
View Full Code Here

    LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> verticesToMerge = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int genScore = ptaClassifier.graph.pairscores.computePairCompatibilityScore_general(null, constructPairsToMergeBasedOnSetsToMerge(ptaClassifier.graph.transitionMatrix.keySet(),verticesToMergeBasedOnInitialPTA), verticesToMerge);
    LearnerGraph graph = MergeStates.mergeCollectionOfVertices(ptaClassifier.graph, null, verticesToMerge);
   
    Set<CmpVertex> tr=graph.transform.trimGraph(10, graph.getInit()).transitionMatrix.keySet();
    ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistency();

    constructPairsToMergeBasedOnSetsToMerge(graph.transitionMatrix.keySet(),verticesToMergeBasedOnInitialPTA);   
    for(CmpVertex v0:tr)
      for(CmpVertex v1:tr)
        if (v0 != v1)
View Full Code Here

        final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
        LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

        // now use pathsToMerge to compute which states can/cannot be merged together.
        LearnerGraph trimmedReference = MarkovPassivePairSelection.trimUncoveredTransitions(pta,referenceGraph);
        final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklisting();
        //long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(trimmedReference, m, checker,false);
        //System.out.println("Inconsistency of trimmed reference : "+inconsistencyForTheReferenceGraph);
       
        //if (inconsistencyForTheReferenceGraph != 53)
        //  break;// ignore automata where we get good results.
View Full Code Here

    // transitions in the vicinity of the added ones. For instance, where a path has been folded in with some transitions sticking out, those new ones
    // may be inconsistent with predictions, based on the transitions in the red part of the graph.

    // mapping map to store all paths leave each state in different length
    double tentativeScore=0;
    ConsistencyChecker checker = new MarkovClassifier.InconsistencyNullVsPredicted();
    MarkovClassifier resultClassifier = new MarkovClassifier(cl.model,result);
    for(Entry<CmpVertex,Collection<Label>> entry:labelsAdded.entrySet())
      if (!entry.getValue().isEmpty())
      {
        double numberOfInconsistencies = resultClassifier.checkFanoutInconsistency(entry.getKey(),checker,false);
View Full Code Here

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

      final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklistingIncludeMissingPrefixes();
      //long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(trimmedReference, m, checker,false);

      MarkovClassifier ptaClassifier = new MarkovClassifier(m,pta);
      final List<List<Label>> pathsToMerge=ptaClassifier.identifyPathsToMerge(checker);
      // These vertices are merged first and then the learning start from the root as normal.
View Full Code Here

        final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
        LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

        // now use pathsToMerge to compute which states can/cannot be merged together.
        LearnerGraph trimmedReference = trimUncoveredTransitions(pta,referenceGraph);
        final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklisting();
        //long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(trimmedReference, m, checker,false);
        //System.out.println("Inconsistency of trimmed reference : "+inconsistencyForTheReferenceGraph);
       
        //if (inconsistencyForTheReferenceGraph != 53)
        //  break;// ignore automata where we get good results.
View Full Code Here

     
      final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
      LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

      LearnerGraph trimmedReference = MarkovPassivePairSelection.trimUncoveredTransitions(pta,referenceGraph);
      final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklistingIncludeMissingPrefixes();
      long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(trimmedReference, m, checker,false);

      LearnerGraph ptaToUseForInference = pta;
      Collection<Set<CmpVertex>> verticesToMergeBasedOnInitialPTA=null;
             
View Full Code Here

       
        final Configuration deepCopy = pta.config.copy();deepCopy.setLearnerCloneGraph(true);
        LearnerGraph ptaCopy = new LearnerGraph(deepCopy);LearnerGraph.copyGraphs(pta, ptaCopy);

//        LearnerGraph trimmedReference = MarkovPassivePairSelection.trimUncoveredTransitions(pta,referenceGraph);
        final ConsistencyChecker checker = new MarkovClassifier.DifferentPredictionsInconsistencyNoBlacklistingIncludeMissingPrefixes();
//        long inconsistencyForTheReferenceGraph = MarkovClassifier.computeInconsistency(trimmedReference, m, checker,false);

        LearnerGraph ptaToUseForInference = pta;
        Collection<Set<CmpVertex>> verticesToMergeBasedOnInitialPTA=null;
               
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.MarkovClassifier.ConsistencyChecker

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.