E
- public static class CrossValidationPartitioner.TrainingSampleStream<E> extends java.lang.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 java.io.IOException
ObjectStream
read
in interface ObjectStream<E>
java.io.IOException
- if there is an error during readingpublic void reset() throws java.io.IOException
reset
in interface ObjectStream<E>
java.io.IOException
public void close() throws java.io.IOException
ObjectStream
ObjectStream
and releases all allocated
resources. After close was called its not allowed to call
read or reset.close
in interface java.lang.AutoCloseable
close
in interface ObjectStream<E>
java.io.IOException
- if there is an error during closing the streampublic ObjectStream<E> getTestSampleStream() throws java.io.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
.java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved