/** * Tests whether the classifier can handle class attributes as Nth attribute. * In case of multi-instance classifiers it performs no tests, since the * multi-instance data has a fixed format (bagID,bag,class). * * @see CheckClassifier#canHandleClassAsNthAttribute(boolean, boolean, * boolean, boolean, boolean, boolean, int, int) * @see CheckClassifier#testsPerClassType(int, boolean, boolean, boolean) */ public void testClassAsNthAttribute() { int i; // multi-Instance data has fixed format! if (m_multiInstanceHandler) { return; } for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) { // does the classifier support this type of class at all? if (!canPredict(i)) { continue; } // first attribute m_handleClassAsFirstAttribute[i] = checkClassAsNthAttribute(i, 0); // second attribute m_handleClassAsSecondAttribute[i] = checkClassAsNthAttribute(i, 1); } }
/** * Tests whether the classifier can handle class attributes as Nth attribute. * In case of multi-instance classifiers it performs no tests, since the * multi-instance data has a fixed format (bagID,bag,class). * * @see CheckClassifier#canHandleClassAsNthAttribute(boolean, boolean, * boolean, boolean, boolean, boolean, int, int) * @see CheckClassifier#testsPerClassType(int, boolean, boolean, boolean) */ public void testClassAsNthAttribute() { int i; // multi-Instance data has fixed format! if (m_multiInstanceHandler) { return; } for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) { // does the classifier support this type of class at all? if (!canPredict(i)) { continue; } // first attribute m_handleClassAsFirstAttribute[i] = checkClassAsNthAttribute(i, 0); // second attribute m_handleClassAsSecondAttribute[i] = checkClassAsNthAttribute(i, 1); } }