public boolean batchFinished() { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); if (m_Seed > 0) { getInputFormat().randomize(new Random(m_Seed)); instances = getInputFormat().testCV(m_NumFolds, m_Fold - 1); } else { instances = getInputFormat().trainCV(m_NumFolds, m_Fold - 1); instances = getInputFormat();
public boolean batchFinished() { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); if (m_Seed > 0) { getInputFormat().randomize(new Random(m_Seed)); instances = getInputFormat().testCV(m_NumFolds, m_Fold - 1); } else { instances = getInputFormat().trainCV(m_NumFolds, m_Fold - 1); instances = getInputFormat();
/** * Input an instance for filtering. Filter requires all training instances be * read before producing output. * * @param instance the input instance * @return true if the filtered instance may now be collected with output(). * @throws IllegalStateException if no input structure has been defined */ @Override public boolean input(Instance instance) { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if (isFirstBatchDone()) { push(instance); return true; } else { bufferInput(instance); return false; } }
/** * Input an instance for filtering. Filter requires all training instances be * read before producing output. * * @param instance the input instance * @return true if the filtered instance may now be collected with output(). * @throws IllegalStateException if no input structure has been defined */ @Override public boolean input(Instance instance) { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if (isFirstBatchDone()) { push(instance); return true; } else { bufferInput(instance); return false; } }
setSeed(0); if (getInputFormat() != null) { setInputFormat(getInputFormat());
setSeed(0); if (getInputFormat() != null) { setInputFormat(getInputFormat());