E - public static class CrossValidationPartitioner.TrainingSampleStream<E> extends Object implements ObjectStream<E>
TrainingSampleStream which iterates over
all training elements.
Note:
After the TestSampleStream was obtained
the TrainingSampleStream must not be used
anymore, otherwise a IllegalStateException
is thrown.
The ObjectStreams must not be used anymore after the
CrossValidationPartitioner was moved
to one of next partitions. If they are called anyway
a IllegalStateException is thrown.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the
ObjectStream and releases all allocated
resources. |
ObjectStream<E> |
getTestSampleStream()
Retrieves the
ObjectStream over the test/evaluations
elements and poisons this TrainingSampleStream. |
E |
read()
Returns the next object.
|
void |
reset()
Resets the training sample.
|
public E read() throws IOException
ObjectStreamread in interface ObjectStream<E>IOException - if there is an error during readingpublic void reset()
throws IOException
reset in interface ObjectStream<E>IOExceptionpublic void close()
throws IOException
ObjectStreamObjectStream and releases all allocated
resources. After close was called its not allowed to call
read or reset.close in interface AutoCloseableclose in interface ObjectStream<E>IOException - if there is an error during closing the streampublic ObjectStream<E> getTestSampleStream() throws IOException
ObjectStream over the test/evaluations
elements and poisons this TrainingSampleStream.
From now on calls to the hasNext and next methods are forbidden
and will raise anIllegalArgumentException.IOExceptionCopyright © 2015 The Apache Software Foundation. All rights reserved.