Package statechum.analysis.learning.MarkovUniversalLearner

Examples of statechum.analysis.learning.MarkovUniversalLearner.MarkovOutcome


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


    Map<Trace, MarkovOutcome> markovMatrix = markov.getMarkov(predictForward);
    Map<Label,MarkovOutcome> outgoing_red_probabilities=MarkovUniversalLearner.predictTransitionsFromState(markovMatrix,origInverse,predictForward,red,alphabet,pathLenBeyondCurrentState,markov.getChunkLen(),null);
    Map<Label,MarkovOutcome> outgoing_blue_probabilities=MarkovUniversalLearner.predictTransitionsFromState(markovMatrix,origInverse,predictForward,blue,alphabet,pathLenBeyondCurrentState,markov.getChunkLen(),null);
    for(Entry<Label,MarkovOutcome> entry:outgoing_red_probabilities.entrySet())
    {
      MarkovOutcome outcomeBlue = outgoing_blue_probabilities.get(entry.getKey());
      if (outcomeBlue == null && entry.getValue() == MarkovOutcome.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,predictForward,markov,red,blue,alphabet,pathBeyond,stepNumber-1);
        }
        ++scoreCurrentFanout;
      }
    }
     
    for(Entry<Label,MarkovOutcome> entry:outgoing_blue_probabilities.entrySet())
    {
      MarkovOutcome outcomeRed = outgoing_red_probabilities.get(entry.getKey());
      if (outcomeRed == null && entry.getValue() == MarkovOutcome.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

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

    Map<Trace, MarkovOutcome> markovMatrix = markov.getMarkov(predictForward);
    Map<Label,MarkovOutcome> outgoing_red_probabilities=MarkovUniversalLearner.predictTransitionsFromState(markovMatrix,origInverse,predictForward,red,alphabet,pathLenBeyondCurrentState,markov.getChunkLen(),null);
    Map<Label,MarkovOutcome> outgoing_blue_probabilities=MarkovUniversalLearner.predictTransitionsFromState(markovMatrix,origInverse,predictForward,blue,alphabet,pathLenBeyondCurrentState,markov.getChunkLen(),null);
    for(Entry<Label,MarkovOutcome> entry:outgoing_red_probabilities.entrySet())
    {
      MarkovOutcome outcomeBlue = outgoing_blue_probabilities.get(entry.getKey());
      if (outcomeBlue == null && entry.getValue() == MarkovOutcome.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,predictForward,markov,red,blue,alphabet,pathBeyond,stepNumber-1);
        }
        ++scoreCurrentFanout;
      }
    }
     
    for(Entry<Label,MarkovOutcome> entry:outgoing_blue_probabilities.entrySet())
    {
      MarkovOutcome outcomeRed = outgoing_red_probabilities.get(entry.getKey());
      if (outcomeRed == null && entry.getValue() == MarkovOutcome.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.MarkovOutcome

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.