public class CanovaDataSetFunction extends Object implements org.apache.spark.api.java.function.Function<Collection<org.canova.api.writable.Writable>,org.nd4j.linalg.dataset.DataSet>, Serializable
Collection<Writable> objects (out of a canova-spark record reader function) to DataSet objects for Spark training.
Analogous to RecordReaderDataSetIterator, but in the context of Spark.| Modifier and Type | Field and Description |
|---|---|
protected int |
batchSize |
| Constructor and Description |
|---|
CanovaDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression) |
CanovaDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression,
org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor,
org.canova.api.io.WritableConverter converter) |
| Modifier and Type | Method and Description |
|---|---|
org.nd4j.linalg.dataset.DataSet |
call(Collection<org.canova.api.writable.Writable> writables) |
public CanovaDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression)
public CanovaDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression,
org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor,
org.canova.api.io.WritableConverter converter)
labelIndex - Index of the label columnnumPossibleLabels - Number of classes for classification (not used if regression = true)regression - False for classification, true for regressionpreProcessor - DataSetPreprocessor (may be null)converter - WritableConverter (may be null)public org.nd4j.linalg.dataset.DataSet call(Collection<org.canova.api.writable.Writable> writables) throws Exception
call in interface org.apache.spark.api.java.function.Function<Collection<org.canova.api.writable.Writable>,org.nd4j.linalg.dataset.DataSet>ExceptionCopyright © 2016. All Rights Reserved.