}
@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();
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.
{