this means that if you use pathToHead the number of the instances that you'd get is much smaller that the original test size (969 is suspiciously small; there might be a bug somewhere ... ). Hence testing on the result of pathToHead is not realistic. Therefore, we should never use it in the testing (hence always use clf.node.getTestingInstances).
I'm arguing that this line in
test
function of theConstrainedClassifier
creates conceptual issues for testing constrained classifiers.Consider the output of two lines from ER example:
this means that if you use
pathToHead
the number of the instances that you'd get is much smaller that the original test size (969 is suspiciously small; there might be a bug somewhere ... ). Hence testing on the result ofpathToHead
is not realistic. Therefore, we should never use it in the testing (hence always useclf.node.getTestingInstances
).