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 ObjectStream
s 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
ObjectStream
read
in interface ObjectStream<E>
IOException
- if there is an error during readingpublic void reset() throws IOException
reset
in interface ObjectStream<E>
IOException
public void close() throws IOException
ObjectStream
ObjectStream
and releases all allocated
resources. After close was called its not allowed to call
read or reset.close
in interface AutoCloseable
close
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
.IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.