Package statechum.analysis.learning.MarkovUniversalLearner

Examples of statechum.analysis.learning.MarkovUniversalLearner.UpdatableOutcome


    }
    for(Entry<Label,CmpVertex> state:states.entrySet())
    {
      for(Label label:graph.getCache().getAlphabet())
      {
        UpdatableOutcome transition = m.get_Markov_model().get(new Trace(Arrays.asList(new Label[]{state.getKey(),label})));
        if (transition != null)
          if (transition == UpdatableOutcome.positive) outcome.transitionMatrix.get(state.getValue()).put(label,states.get(label));
      }
    }   
View Full Code Here


    long scoreCurrentFanout = 0, score = 0;
    Map<Label,UpdatableOutcome> outgoing_red_probabilities=Markov.predictTransitionsFromState(origInverse,red,alphabet,pathLenBeyondCurrentState,Markov.getChunkLen());
    Map<Label,UpdatableOutcome> outgoing_blue_probabilities=Markov.predictTransitionsFromState(origInverse,blue,alphabet,pathLenBeyondCurrentState,Markov.getChunkLen());
    for(Entry<Label,UpdatableOutcome> entry:outgoing_red_probabilities.entrySet())
    {
      UpdatableOutcome outcomeBlue = outgoing_blue_probabilities.get(entry.getKey());
      if (outcomeBlue == null && entry.getValue() == UpdatableOutcome.negative)
        ++scoreCurrentFanout; // red negative, blue absent, hence the two are consistent
      if (outcomeBlue == entry.getValue()) // or if the two are consistent
      {
        if (stepNumber > 1)
        {
          LinkedList<Label> pathBeyond = new LinkedList<Label>(pathLenBeyondCurrentState);pathBeyond.add(entry.getKey());
          score+=comparePredictedFanouts(graph,origInverse,Markov,red,blue,alphabet,pathBeyond,stepNumber-1);
        }
        ++scoreCurrentFanout;
      }
    }
     
    for(Entry<Label,UpdatableOutcome> entry:outgoing_blue_probabilities.entrySet())
    {
      UpdatableOutcome outcomeRed = outgoing_red_probabilities.get(entry.getKey());
      if (outcomeRed == null && entry.getValue() == UpdatableOutcome.negative)
        ++scoreCurrentFanout; // blue negative, red absent, hence the two are consistent
      if (outcomeRed == entry.getValue()) // or if the two are consistent
      {
        if (stepNumber > 1)
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.MarkovUniversalLearner.UpdatableOutcome

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.