Package statechum.analysis.learning.MarkovUniversalLearner

Examples of statechum.analysis.learning.MarkovUniversalLearner.ConsistencyChecker


    Map<Trace, MarkovOutcome> MarkovMatrix = m.getMarkov(predictForwardOrSideways);
    int attemptToUpdateMarkov=0;
    long scoreAfterBigMerge=-1,earlierScoreAfterBigMerge=-1;
    int WLength = 1;
    Map<CmpVertex,LearnerGraph> pathsFromEachStateInGraph = PairQualityLearner.constructPathsFromEachState(graph,directionForwardOrInverse);//,!directionForwardOrInverse);
    ConsistencyChecker checker = new
        MarkovUniversalLearner.DifferentPredictionsInconsistencyNoBlacklisting();
        //MarkovUniversalLearner.DifferentPredictionsInconsistency();
        //MarkovUniversalLearner.InconsistencyNullVsPredicted();
   
    List<List<Label>> whatToMerge = null;
View Full Code Here


 
  public static LearnerGraph formLoops(LearnerGraph graph, MarkovUniversalLearner m,boolean directionForwardOrInverse)
  {
    Map<CmpVertex,LearnerGraph> pathsFromEachStateInGraph = PairQualityLearner.constructPathsFromEachState(graph,directionForwardOrInverse);
    LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> verticesToMerge = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    ConsistencyChecker checker = new MarkovUniversalLearner.DifferentPredictionsInconsistency();
    final long genScoreThreshold = 1;
    int nrOfMergers=0;
    List<StatePair> pairsToMerge = new LinkedList<StatePair>();
    for(Entry<CmpVertex,Map<Label,CmpVertex>> entry:graph.transitionMatrix.entrySet())
      for(Entry<Label,CmpVertex> transition:entry.getValue().entrySet())
View Full Code Here

    Map<CmpVertex,LearnerGraph> pathsFromEachStateInGraph = PairQualityLearner.constructPathsFromEachState(graph,directionForwardOrInverse);
    List<StatePair> pairsList = PairQualityLearner.buildVerticesToMergeForPath(pathsFromEachStateInGraph,directionForwardOrInverse,pathsOfInterest);
    LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>> verticesToMerge = new LinkedList<AMEquivalenceClass<CmpVertex,LearnerGraphCachedData>>();
    int score = graph.pairscores.computePairCompatibilityScore_general(null, pairsList, verticesToMerge);
    LearnerGraph merged = MergeStates.mergeCollectionOfVertices(graph, null, verticesToMerge);// after merging all paths of interest, we get this graph.
    ConsistencyChecker checker = new MarkovUniversalLearner.DifferentPredictionsInconsistency();
    final long genScoreThreshold = 1;
    int nrOfMergers=0;
    List<StatePair> pairsToMerge = new LinkedList<StatePair>();
    for(Entry<CmpVertex,Map<Label,CmpVertex>> entry:merged.transitionMatrix.entrySet())
      for(Entry<Label,CmpVertex> transition:entry.getValue().entrySet())
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 MarkovUniversalLearner.InconsistencyNullVsPredicted();
    @SuppressWarnings("rawtypes")
    AbstractLearnerGraph Inverse_Graph = MarkovUniversalLearner.computeInverseGraph(result, predictForward);
    for(Entry<CmpVertex,Collection<Label>> entry:labelsAdded.entrySet())
      if (!entry.getValue().isEmpty())
      {
View Full Code Here

    int genScore = graphPTA.pairscores.computePairCompatibilityScore_general(null, constructPairsToMergeBasedOnSetsToMerge(graphPTA.transitionMatrix.keySet(),verticesToMergeBasedOnInitialPTA), verticesToMerge);
    LearnerGraph graph = MergeStates.mergeCollectionOfVertices(graphPTA, null, verticesToMerge);
   
    Set<CmpVertex> tr=graph.transform.trimGraph(10, graph.getInit()).transitionMatrix.keySet();
    boolean predictForwardOrInverse = true;
    ConsistencyChecker checker = new MarkovUniversalLearner.DifferentPredictionsInconsistency();

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

     */

    int attemptToUpdateMarkov=0;
    boolean computeForward = true;
    double scoreAfterBigMerge=1;
    ConsistencyChecker checker = new MarkovUniversalLearner.DifferentPredictionsInconsistency(graph);
        //InconsistencyNullVsPredicted(graph);
    Set<Label> alphabet = trimmedReference.pathroutines.computeAlphabet();
    do
    {
      long maxCount = 0;
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 MarkovUniversalLearner.InconsistencyNullVsPredicted(original);
    @SuppressWarnings("rawtypes")
    AbstractLearnerGraph Inverse_Graph = MarkovUniversalLearner.computeInverseGraph(result, predictForward);
    for(Entry<CmpVertex,Collection<Label>> entry:labelsAdded.entrySet())
      if (!entry.getValue().isEmpty())
      {
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.MarkovUniversalLearner.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.