/** * Checks whether the scheme can build models incrementally. * * @return index 0 is true if the clusterer can train incrementally */ protected boolean[] updateableClusterer() { boolean[] result = new boolean[2]; print("updateable clusterer..."); if (m_Clusterer instanceof UpdateableClusterer) { println("yes"); result[0] = true; } else { println("no"); result[0] = false; } return result; }
/** * Checks whether the scheme can handle zero training instances. * * @param nominalPredictor if true use nominal predictor attributes * @param numericPredictor if true use numeric predictor attributes * @param stringPredictor if true use string predictor attributes * @param datePredictor if true use date predictor attributes * @param relationalPredictor if true use relational predictor attributes * @param multiInstance whether multi-instance is needed * @return index 0 is true if the test was passed, index 1 is true if test was * acceptable */ protected boolean[] canHandleZeroTraining(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance) { print("handle zero training instances"); printAttributeSummary(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance); print("..."); Vector<String> accepts = new Vector<String>(); accepts.addElement("train"); accepts.addElement("value"); int numTrain = 0, missingLevel = 0; boolean predictorMissing = false; return runBasicTest(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance, missingLevel, predictorMissing, numTrain, accepts); }
boolean relationalPredictor, boolean multiInstance, boolean predictorMissing) { print("clusterer doesn't alter original datasets"); printAttributeSummary(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance); print("..."); int numTrain = getNumInstances(), missingLevel = 20; print("Problem during training"); println(": " + ex.getMessage() + "\n"); println("Here is the dataset:\n");
/** * Checks whether the scheme says it can handle instance weights. * * @return true if the clusterer handles instance weights */ protected boolean[] weightedInstancesHandler() { boolean[] result = new boolean[2]; print("weighted instances clusterer..."); if (m_Clusterer instanceof WeightedInstancesHandler) { println("yes"); result[0] = true; } else { println("no"); result[0] = false; } return result; }
/** * Checks whether the scheme can handle zero training instances. * * @param nominalPredictor if true use nominal predictor attributes * @param numericPredictor if true use numeric predictor attributes * @param stringPredictor if true use string predictor attributes * @param datePredictor if true use date predictor attributes * @param relationalPredictor if true use relational predictor attributes * @param multiInstance whether multi-instance is needed * @return index 0 is true if the test was passed, index 1 is true if test was * acceptable */ protected boolean[] canHandleZeroTraining(boolean nominalPredictor, boolean numericPredictor, boolean stringPredictor, boolean datePredictor, boolean relationalPredictor, boolean multiInstance) { print("handle zero training instances"); printAttributeSummary(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance); print("..."); Vector<String> accepts = new Vector<String>(); accepts.addElement("train"); accepts.addElement("value"); int numTrain = 0, missingLevel = 0; boolean predictorMissing = false; return runBasicTest(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance, missingLevel, predictorMissing, numTrain, accepts); }
boolean relationalPredictor, boolean multiInstance, boolean predictorMissing) { print("clusterer doesn't alter original datasets"); printAttributeSummary(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance); print("..."); int numTrain = getNumInstances(), missingLevel = 20; print("Problem during training"); println(": " + ex.getMessage() + "\n"); println("Here is the dataset:\n");
/** * Checks whether the scheme handles multi-instance data. * * @return true if the clusterer handles multi-instance data */ protected boolean[] multiInstanceHandler() { boolean[] result = new boolean[2]; print("multi-instance clusterer..."); if (m_Clusterer instanceof MultiInstanceCapabilitiesHandler) { println("yes"); result[0] = true; } else { println("no"); result[0] = false; } return result; }
print("100% "); print("missing"); if (predictorMissing) { print(" predictor"); print(" values"); printAttributeSummary(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance); print("..."); Vector<String> accepts = new Vector<String>(); accepts.addElement("missing");
/** * Checks whether the scheme can build models incrementally. * * @return index 0 is true if the clusterer can train incrementally */ protected boolean[] updateableClusterer() { boolean[] result = new boolean[2]; print("updateable clusterer..."); if (m_Clusterer instanceof UpdateableClusterer) { println("yes"); result[0] = true; } else { println("no"); result[0] = false; } return result; }
print("100% "); print("missing"); if (predictorMissing) { print(" predictor"); print(" values"); printAttributeSummary(nominalPredictor, numericPredictor, stringPredictor, datePredictor, relationalPredictor, multiInstance); print("..."); Vector<String> accepts = new Vector<String>(); accepts.addElement("missing");
/** * Checks whether the scheme says it can handle instance weights. * * @return true if the clusterer handles instance weights */ protected boolean[] weightedInstancesHandler() { boolean[] result = new boolean[2]; print("weighted instances clusterer..."); if (m_Clusterer instanceof WeightedInstancesHandler) { println("yes"); result[0] = true; } else { println("no"); result[0] = false; } return result; }
/** * Checks whether the scheme handles multi-instance data. * * @return true if the clusterer handles multi-instance data */ protected boolean[] multiInstanceHandler() { boolean[] result = new boolean[2]; print("multi-instance clusterer..."); if (m_Clusterer instanceof MultiInstanceCapabilitiesHandler) { println("yes"); result[0] = true; } else { println("no"); result[0] = false; } return result; }
/** * tests for a serialVersionUID. Fails in case the scheme doesn't declare a * UID. * * @return index 0 is true if the scheme declares a UID */ protected boolean[] declaresSerialVersionUID() { boolean[] result = new boolean[2]; print("serialVersionUID..."); result[0] = !SerializationHelper.needsUID(m_Clusterer.getClass()); if (result[0]) { println("yes"); } else { println("no"); } return result; }
/** * tests for a serialVersionUID. Fails in case the scheme doesn't declare a * UID. * * @return index 0 is true if the scheme declares a UID */ protected boolean[] declaresSerialVersionUID() { boolean[] result = new boolean[2]; print("serialVersionUID..."); result[0] = !SerializationHelper.needsUID(m_Clusterer.getClass()); if (result[0]) { println("yes"); } else { println("no"); } return result; }
/** * Checks whether the scheme can take command line options. * * @return index 0 is true if the clusterer can take options */ protected boolean[] canTakeOptions() { boolean[] result = new boolean[2]; print("options..."); if (m_Clusterer instanceof OptionHandler) { println("yes"); if (m_Debug) { println("\n=== Full report ==="); Enumeration<Option> enu = ((OptionHandler) m_Clusterer).listOptions(); while (enu.hasMoreElements()) { Option option = enu.nextElement(); print(option.synopsis() + "\n" + option.description() + "\n"); } println("\n"); } result[0] = true; } else { println("no"); result[0] = false; } return result; }
/** * Checks whether the scheme can take command line options. * * @return index 0 is true if the clusterer can take options */ protected boolean[] canTakeOptions() { boolean[] result = new boolean[2]; print("options..."); if (m_Clusterer instanceof OptionHandler) { println("yes"); if (m_Debug) { println("\n=== Full report ==="); Enumeration<Option> enu = ((OptionHandler) m_Clusterer).listOptions(); while (enu.hasMoreElements()) { Option option = enu.nextElement(); print(option.synopsis() + "\n" + option.description() + "\n"); } println("\n"); } result[0] = true; } else { println("no"); result[0] = false; } return result; }