/** * tests whether classifier handles data containing only a class attribute * * @see CheckClassifier#canHandleOnlyClass(boolean, boolean, boolean, boolean, * boolean, int) * @see CheckClassifier#testsPerClassType(int, boolean, boolean, boolean) */ public void testOnlyClass() { boolean[] result; int i; for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) { // does the classifier support this type of class at all? if (!canPredict(i)) { continue; } result = m_Tester.canHandleOnlyClass(m_NominalPredictors[i], m_NumericPredictors[i], m_StringPredictors[i], m_DatePredictors[i], m_RelationalPredictors[i], i); if (!result[0] && !result[1]) { fail("Error handling data containing only the class!"); } } }
/** * tests whether classifier handles data containing only a class attribute * * @see CheckClassifier#canHandleOnlyClass(boolean, boolean, boolean, boolean, * boolean, int) * @see CheckClassifier#testsPerClassType(int, boolean, boolean, boolean) */ public void testOnlyClass() { boolean[] result; int i; for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) { // does the classifier support this type of class at all? if (!canPredict(i)) { continue; } result = m_Tester.canHandleOnlyClass(m_NominalPredictors[i], m_NumericPredictors[i], m_StringPredictors[i], m_DatePredictors[i], m_RelationalPredictors[i], i); if (!result[0] && !result[1]) { fail("Error handling data containing only the class!"); } } }
canHandleOnlyClass(PNom, PNum, PStr, PDat, PRel, classType);
canHandleOnlyClass(PNom, PNum, PStr, PDat, PRel, classType);