Package statechum.analysis.learning.MarkovModel.MarkovMatrixEngine

Examples of statechum.analysis.learning.MarkovModel.MarkovMatrixEngine.PredictionForSequence


      }

      @Override
      public void nodeEntered(PTAExplorationNode currentNode,  LinkedList<PTAExplorationNode> pathToInit)
      {
        PredictionForSequence prediction = (PredictionForSequence)currentNode.getState();
        if (pathToInit.size() == WLength && prediction.prediction == MarkovOutcome.positive)
        {
          long countInPTA=prediction.occurrence.firstElem;
          if (countInPTA > maxCount.longValue())
            maxCount.set(countInPTA);
        }
      }

      @Override
      public void leafEntered(PTAExplorationNode currentNode,  LinkedList<PTAExplorationNode> pathToInit)
      {
        nodeEntered(currentNode, pathToInit);
      }

      @Override
      public void nodeLeft(@SuppressWarnings("unused") PTAExplorationNode currentNode, @SuppressWarnings("unused") LinkedList<PTAExplorationNode> pathToInit)
      {
        // nothing to do here.
      }

    };
    exploration.walkThroughAllPaths();
System.out.println("maxcount = "+maxCount);

    final Map<Long,List<List<Label>>> thresholdToInconsistency = new TreeMap<Long,List<List<Label>>>();
    exploration = new PTAExploration<Boolean>(model.markovMatrix) {
      @Override
      public Boolean newUserObject() {
        return null;
      }

      @Override
      public void nodeEntered(PTAExplorationNode currentNode,  LinkedList<PTAExplorationNode> pathToInit)
      {
        PredictionForSequence prediction = (PredictionForSequence)currentNode.getState();
        if (pathToInit.size() == WLength && prediction.prediction == MarkovOutcome.positive)
        {
          long countInPTA=prediction.occurrence.firstElem;
          if (countInPTA < maxCount.longValue()/2) // paths that are very common are likely to be present from a number of different states and as such not very good for discriminating between them.
          {
View Full Code Here


        inFirst = false;
      else
        inFirst = fromState.isAccept();
     
     
      PredictionForSequence prediction = model.markovMatrix.getPrediction(list);
      if(prediction == null)
        inSecond= false;
      else
        inSecond = prediction.prediction == MarkovOutcome.positive;
      if(inFirst && inSecond)
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.MarkovModel.MarkovMatrixEngine.PredictionForSequence

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.