{// For all frames and all seeds
Runnable interactiveRunner = new Runnable() {
@Override
public void run() {
ConfusionMatrix matrix = DiffExperiments.classify(wMethod, graphReference,
new RPNIBlueFringe(learnerConfig,useOptimizedMerge,null,null).learn(collectionOfTraces.get(UAVAllSeeds).tracesForUAVandFrame.get(UAVAllSeeds).get(frame),true));
uas_outcome.add(new Pair<Integer,String>(frame,"S"),matrix.BCR());
uas_S.add(frame,matrix.BCR());
}
};
if (threadNumber > 1) outcomes.add(executorService.submit(interactiveRunner));else interactiveRunner.run();
}
for(final String seed:collectionOfTraces.keySet())
if (!seed.equals(UAVAllSeeds))
{// Just for all frames of the a single seed
Runnable interactiveRunner = new Runnable() {
@Override
public void run() {
ConfusionMatrix matrix = DiffExperiments.classify(wMethod, graphReference,
new RPNIBlueFringe(learnerConfig,useOptimizedMerge,null,null).learn(collectionOfTraces.get(UAVAllSeeds).tracesForUAVandFrame.get(seed).get(frame),true));
uas_outcome.add(new Pair<Integer,String>(frame,"A"),matrix.BCR());
uas_A.add(frame,matrix.BCR());
}
};
if (threadNumber > 1) outcomes.add(executorService.submit(interactiveRunner));else interactiveRunner.run();
}
for(final String UAV:collectionOfTraces.get(UAVAllSeeds).tracesForUAVandFrame.keySet())
if (!UAV.equals(UAVAllSeeds) && !UAV.equals(UAVAll))
for(final String seed:collectionOfTraces.keySet())
if (!seed.equals(UAVAllSeeds))
{
Runnable interactiveRunner = new Runnable() {
@Override
public void run() {
ConfusionMatrix matrix = DiffExperiments.classify(wMethod, graphReference,
new RPNIBlueFringe(learnerConfig,useOptimizedMerge,null,null).learn(collectionOfTraces.get(UAV).tracesForUAVandFrame.get(seed).get(frame),true));
uas_outcome.add(new Pair<Integer,String>(frame,"U"),matrix.BCR());
uas_U.add(frame,matrix.BCR());
}
};
if (threadNumber > 1) outcomes.add(executorService.submit(interactiveRunner));else interactiveRunner.run();
}
if (threadNumber <= 1)
{
uas_outcome.drawInteractive(gr);
uas_A.drawInteractive(gr);
uas_S.drawInteractive(gr);
uas_U.drawInteractive(gr);
progress.next();
}
}
for(int i=0;i<5;++i)
{
final int arg=i;
Runnable interactiveRunner = new Runnable() {
@Override
public void run() {
Configuration tmpConf = learnerConfig.copy();tmpConf.setGeneralisationThreshold(arg);
ConfusionMatrix matrix = DiffExperiments.classify(wMethod, graphReference,new RPNIBlueFringe(tmpConf,useOptimizedMerge,null,null).learn(collectionOfTraces.get(UAVAllSeeds).tracesForUAVandFrame.get(UAVAllSeeds).get(maxFrameNumber),false));
uas_threshold.add(arg, matrix.BCR());
}
};
if (threadNumber > 1)
outcomes.add(executorService.submit(interactiveRunner));