/** * checks whether the classifier can handle the given percentage of missing * predictors * * @param type the class type * @param percent the percentage of missing predictors * @param allowFail if true a fail statement may be executed * @return true if the classifier can handle it */ protected boolean checkMissingPredictors(int type, int percent, boolean allowFail) { boolean[] result; result = m_Tester.canHandleMissing(m_NominalPredictors[type], m_NumericPredictors[type], m_StringPredictors[type], m_DatePredictors[type], m_RelationalPredictors[type], m_multiInstanceHandler, type, true, false, percent); if (allowFail) { if (!result[0] && !result[1]) { fail("Error handling " + percent + "% missing predictors (" + getClassTypeString(type) + " class)!"); } } return result[0]; }
/** * checks whether the classifier can handle the given percentage of missing * class labels * * @param type the class type * @param percent the percentage of missing class labels * @param allowFail if true a fail statement may be executed * @return true if the classifier can handle it */ protected boolean checkMissingClass(int type, int percent, boolean allowFail) { boolean[] result; result = m_Tester.canHandleMissing(m_NominalPredictors[type], m_NumericPredictors[type], m_StringPredictors[type], m_DatePredictors[type], m_RelationalPredictors[type], m_multiInstanceHandler, type, false, true, percent); if (allowFail) { if (!result[0] && !result[1]) { fail("Error handling " + percent + "% missing class labels (" + getClassTypeString(type) + " class)!"); } } return result[0]; }
/** * checks whether the classifier can handle the given percentage of missing * class labels * * @param type the class type * @param percent the percentage of missing class labels * @param allowFail if true a fail statement may be executed * @return true if the classifier can handle it */ protected boolean checkMissingClass(int type, int percent, boolean allowFail) { boolean[] result; result = m_Tester.canHandleMissing(m_NominalPredictors[type], m_NumericPredictors[type], m_StringPredictors[type], m_DatePredictors[type], m_RelationalPredictors[type], m_multiInstanceHandler, type, false, true, percent); if (allowFail) { if (!result[0] && !result[1]) { fail("Error handling " + percent + "% missing class labels (" + getClassTypeString(type) + " class)!"); } } return result[0]; }
/** * checks whether the classifier can handle the given percentage of missing * predictors * * @param type the class type * @param percent the percentage of missing predictors * @param allowFail if true a fail statement may be executed * @return true if the classifier can handle it */ protected boolean checkMissingPredictors(int type, int percent, boolean allowFail) { boolean[] result; result = m_Tester.canHandleMissing(m_NominalPredictors[type], m_NumericPredictors[type], m_StringPredictors[type], m_DatePredictors[type], m_RelationalPredictors[type], m_multiInstanceHandler, type, true, false, percent); if (allowFail) { if (!result[0] && !result[1]) { fail("Error handling " + percent + "% missing predictors (" + getClassTypeString(type) + " class)!"); } } return result[0]; }
boolean handleMissingPredictors = canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, true, false, 20)[0]; if (handleMissingPredictors) { canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, true, false, 100); boolean handleMissingClass = canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, false, true, 20)[0]; if (handleMissingClass) { canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, false, true, 100);
boolean handleMissingPredictors = canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, true, false, 20)[0]; if (handleMissingPredictors) { canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, true, false, 100); boolean handleMissingClass = canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, false, true, 20)[0]; if (handleMissingClass) { canHandleMissing(PNom, PNum, PStr, PDat, PRel, multiInstance, classType, false, true, 100);