public static WekaDataCollector createDataCollector(final int ifDepth)
{
WekaDataCollector classifier = new WekaDataCollector();
List<PairRank> assessors = new ArrayList<PairRank>(20);
assessors.add(classifier.new PairRank("conventional score")
{// 1
@Override
public long getValue(PairScore p) {
return measurementsForCurrentStack(p).compatibilityScore;
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("statechum score")
{// 2
@Override
public long getValue(PairScore p) {
return p.getScore();
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("size of tree rooted at Blue")
{// 3
@Override
public long getValue(PairScore p) {
return treeRootedAt(p.getQ());
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("Number of alternatives with same red")
{// 4
@Override
public long getValue(PairScore p) {
return measurementsForCurrentStack(p).nrOfAlternatives;
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("Depth of Blue")
{// 5
@Override
public long getValue(PairScore p) {
return p.getQ().getDepth();
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("Depth of Red")
{// 6
@Override
public long getValue(PairScore p) {
return p.getR().getDepth();
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("Statechum score is above zero")
{// 7
@Override
public long getValue(PairScore p) {
return p.getScore() > 0?1:0;
}
@Override
public boolean isAbsolute() {
return true;
}
});
assessors.add(classifier.new PairRank("state identifiers Red")
{// 8
@Override
public long getValue(PairScore p) {
return p.getR().getIntegerID();
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("state identifiers Blue")
{// 9
@Override
public long getValue(PairScore p) {
return p.getQ().getIntegerID();
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("proximity of the red and blue by depth")
{// 10
@Override
public long getValue(PairScore p) {
return p.getQ().getDepth()-p.getR().getDepth();
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("difference between conventional scores divided by 3")
{// 11
@Override
public long getValue(PairScore p) {
return measurementsForCurrentStack(p).compatibilityScore/3;
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("whether red and blue are adjacent")
{// 12
@Override
public long getValue(PairScore p) {
return measurementsForCurrentStack(p).adjacent? 1:0;
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("number of new outgoing transitions from blue")
{// 13
@Override
public long getValue(PairScore p) {
Map<Label,CmpVertex> redTransitions = tentativeGraph().transitionMatrix.get(p.getR());
int counter = 0;
for(Label lbl:tentativeGraph().transitionMatrix.get(p.getQ()).keySet())
if (!redTransitions.containsKey(lbl))
counter++;
return counter;
}
@Override
public boolean isAbsolute() {
return false;
}
});
assessors.add(classifier.new PairRank("number of new outgoing transitions from red")
{// 14
@Override
public long getValue(PairScore p) {
Map<Label,CmpVertex> redTransitions = tentativeGraph().transitionMatrix.get(p.getQ());
int counter = 0;