Esempio n. 1
0
  /**
   * Accepts a test set for a batch trained clusterer
   *
   * @param e a <code>TestSetEvent</code> value
   */
  public void acceptTestSet(TestSetEvent e) {

    if (m_trainingSet != null) {
      try {
        if (m_state == IDLE) {
          synchronized (this) {
            m_state = CLUSTERING;
          }
          m_testingSet = e.getTestSet();
          if (m_trainingSet.equalHeaders(m_testingSet)) {
            BatchClustererEvent ce =
                new BatchClustererEvent(
                    this,
                    m_Clusterer,
                    new DataSetEvent(this, e.getTestSet()),
                    e.getSetNumber(),
                    e.getMaxSetNumber(),
                    0);

            notifyBatchClustererListeners(ce);
          }
          m_state = IDLE;
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
    }
  }
Esempio n. 2
0
 @Override
 public void acceptTestSet(TestSetEvent e) {
   Instances test = e.getTestSet();
   DataSetEvent d = new DataSetEvent(this, test);
   acceptDataSet(d);
 }