Example #1
0
  /**
   * tests whether the Kernel alters the training set during training.
   *
   * @see CheckKernel#datasetIntegrity(boolean, boolean, boolean, boolean, boolean, boolean, int,
   *     boolean, boolean)
   * @see CheckKernel#testsPerClassType(int, boolean, boolean)
   */
  public void testDatasetIntegrity() {
    boolean[] result;
    int i;

    for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) {
      // does the Kernel support this type of class at all?
      if (!canPredict(i)) continue;

      result =
          m_Tester.datasetIntegrity(
              m_NominalPredictors[i],
              m_NumericPredictors[i],
              m_StringPredictors[i],
              m_DatePredictors[i],
              m_RelationalPredictors[i],
              m_multiInstanceHandler,
              i,
              m_handleMissingPredictors[i],
              m_handleMissingClass[i]);

      if (!result[0] && !result[1])
        fail("Training set is altered during training (" + getClassTypeString(i) + " class)!");
    }
  }