public class DataVecDataSetFunction
extends java.lang.Object
implements org.apache.spark.api.java.function.Function<java.util.List<org.datavec.api.writable.Writable>,org.nd4j.linalg.dataset.DataSet>, java.io.Serializable
Collection<Writable> objects (out of a datavec-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 |
|---|
DataVecDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression) |
DataVecDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression,
org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor,
org.datavec.api.io.WritableConverter converter) |
DataVecDataSetFunction(int labelIndexFrom,
int labelIndexTo,
int numPossibleLabels,
boolean regression,
org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor,
org.datavec.api.io.WritableConverter converter)
Main constructor, including for multi-label regression
|
| Modifier and Type | Method and Description |
|---|---|
org.nd4j.linalg.dataset.DataSet |
call(java.util.List<org.datavec.api.writable.Writable> currList) |
public DataVecDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression)
public DataVecDataSetFunction(int labelIndex,
int numPossibleLabels,
boolean regression,
org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor,
org.datavec.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 DataVecDataSetFunction(int labelIndexFrom,
int labelIndexTo,
int numPossibleLabels,
boolean regression,
org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor,
org.datavec.api.io.WritableConverter converter)
labelIndexFrom - Index of the first targetlabelIndexTo - Index of the last target, inclusive (for classification or single-output regression: same as labelIndexFrom)numPossibleLabels - Unused for regression, or number of classes for classificationregression - If true: regression. false: classificationpublic org.nd4j.linalg.dataset.DataSet call(java.util.List<org.datavec.api.writable.Writable> currList)
throws java.lang.Exception
call in interface org.apache.spark.api.java.function.Function<java.util.List<org.datavec.api.writable.Writable>,org.nd4j.linalg.dataset.DataSet>java.lang.Exception