public class CanovaSequenceDataSetFunction extends Object implements org.apache.spark.api.java.function.Function<Collection<Collection<org.canova.api.writable.Writable>>,org.nd4j.linalg.dataset.DataSet>, Serializable
Collection<Collection<Writable>> objects (out of a canova-spark sequence record reader function) to
DataSet objects for Spark training.
Analogous to SequenceRecordReaderDataSetIterator, but in the context of Spark.
Supports loading data from a single source only (hence no masknig arrays, many-to-one etc here)
see CanovaSequencePairDataSetFunction for the separate collections for input and labels version| Constructor and Description |
|---|
CanovaSequenceDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression) |
CanovaSequenceDataSetFunction(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<Collection<org.canova.api.writable.Writable>> input) |
public CanovaSequenceDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression)
labelIndex - Index of the label columnnumPossibleLabels - Number of classes for classification (not used if regression = true)regression - False for classification, true for regressionpublic CanovaSequenceDataSetFunction(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<Collection<org.canova.api.writable.Writable>> input) throws Exception
call in interface org.apache.spark.api.java.function.Function<Collection<Collection<org.canova.api.writable.Writable>>,org.nd4j.linalg.dataset.DataSet>ExceptionCopyright © 2016. All Rights Reserved.