public class MultiDataSet extends Object implements MultiDataSet
MultiDataSet| Constructor and Description |
|---|
MultiDataSet()
Create a new (empty) MultiDataSet object (all fields are null)
|
MultiDataSet(INDArray[] features,
INDArray[] labels)
MultiDataSet constructor with no mask arrays
|
MultiDataSet(INDArray[] features,
INDArray[] labels,
INDArray[] featuresMaskArrays,
INDArray[] labelsMaskArrays) |
MultiDataSet(INDArray features,
INDArray labels)
MultiDataSet constructor with single features/labels input, no mask arrays
|
MultiDataSet(INDArray features,
INDArray labels,
INDArray featuresMask,
INDArray labelsMask)
MultiDataSet constructor with single features/labels input, single mask arrays
|
| Modifier and Type | Method and Description |
|---|---|
List<MultiDataSet> |
asList()
SplitV the MultiDataSet into a list of individual examples.
|
MultiDataSet |
copy()
Clone the dataset
|
void |
detach()
This method migrates this DataSet into current Workspace (if any)
|
boolean |
equals(Object o) |
List<Serializable> |
getExampleMetaData()
Get the example metadata, or null if no metadata has been set
|
<T extends Serializable> |
getExampleMetaData(Class<T> metaDataType)
Get the example metadata, or null if no metadata has been set
Note: this method results in an unchecked cast - care should be taken when using this! |
INDArray[] |
getFeatures()
Get all of the input features, as an array of INDArrays
|
INDArray |
getFeatures(int index)
Get a single feature/input array
|
INDArray |
getFeaturesMaskArray(int index)
Get the specified feature mask array.
|
INDArray[] |
getFeaturesMaskArrays()
Get the feature mask arrays.
|
INDArray[] |
getLabels()
Get all of the labels, as an array of INDArrays
|
INDArray |
getLabels(int index)
Get a single label/output array
|
INDArray |
getLabelsMaskArray(int index)
Get the specified label mask array.
|
INDArray[] |
getLabelsMaskArrays()
Get the labels mask arrays.
|
long |
getMemoryFootprint()
This method returns memory used by this DataSet
|
int |
hashCode() |
boolean |
hasMaskArrays()
Whether there are any mask arrays (features or labels) present for this MultiDataSet
|
boolean |
isEmpty() |
void |
load(File from)
Load the contents of this MultiDataSet from the specified file
|
void |
load(InputStream from)
Load the contents of this MultiDataSet from the specified stream.
|
static MultiDataSet |
merge(Collection<? extends MultiDataSet> toMerge)
Merge a collection of MultiDataSet objects into a single MultiDataSet.
|
void |
migrate()
This method migrates this MultiDataSet into current Workspace (if any)
|
int |
numFeatureArrays()
Number of arrays of features/input data in the MultiDataSet
|
int |
numLabelsArrays()
Number of arrays of label/output data in the MultiDataSet
|
void |
save(File to)
Save this MultiDataSet to the specified file
|
void |
save(OutputStream to)
Save this MultiDataSet to the specified stream.
|
void |
setExampleMetaData(List<? extends Serializable> exampleMetaData)
Set the metadata for this MultiDataSet
By convention: the metadata can be any serializable object, one per example in the MultiDataSet |
void |
setFeatures(INDArray[] features)
Set all of the features arrays for the MultiDataSet
|
void |
setFeatures(int idx,
INDArray features)
Set a single features array (by index) for the MultiDataSet
|
void |
setFeaturesMaskArray(int idx,
INDArray maskArray)
Set a single feature mask array by index
|
void |
setFeaturesMaskArrays(INDArray[] maskArrays)
Set the feature mask arrays
|
void |
setLabels(INDArray[] labels)
Set all of the labels arrays for the MultiDataSet
|
void |
setLabels(int idx,
INDArray labels)
Set a single labels array (by index) for the MultiDataSet
|
void |
setLabelsMaskArray(INDArray[] labelsMaskArrays)
Set the labels mask arrays
|
void |
setLabelsMaskArray(int idx,
INDArray labelsMaskArray)
Set a single labels mask array by index
|
void |
shuffle()
Shuffle the order of the examples in the MultiDataSet.
|
String |
toString() |
public MultiDataSet()
public MultiDataSet(INDArray features, INDArray labels)
public MultiDataSet(INDArray features, INDArray labels, INDArray featuresMask, INDArray labelsMask)
public MultiDataSet(INDArray[] features, INDArray[] labels)
public MultiDataSet(INDArray[] features, INDArray[] labels, INDArray[] featuresMaskArrays, INDArray[] labelsMaskArrays)
features - The features (inputs) to the algorithm/neural networklabels - The labels (outputs) to the algorithm/neural networkfeaturesMaskArrays - The mask arrays for the features. May be null. Typically used with variable-length time series models, etclabelsMaskArrays - The mask arrays for the labels. May be null. Typically used with variable-length time series models, etcpublic List<Serializable> getExampleMetaData()
MultiDataSetgetExampleMetaData in interface MultiDataSet#getExampleMetaData(Class)} for convenience method for typespublic <T extends Serializable> List<T> getExampleMetaData(Class<T> metaDataType)
MultiDataSetgetExampleMetaData in interface MultiDataSetT - Type of metadatametaDataType - Class of the metadata (used for opType information)public void setExampleMetaData(List<? extends Serializable> exampleMetaData)
MultiDataSetsetExampleMetaData in interface MultiDataSetexampleMetaData - Example metadata to setpublic int numFeatureArrays()
MultiDataSetnumFeatureArrays in interface MultiDataSetpublic int numLabelsArrays()
MultiDataSetnumLabelsArrays in interface MultiDataSetpublic INDArray[] getFeatures()
MultiDataSetgetFeatures in interface MultiDataSetpublic INDArray getFeatures(int index)
MultiDataSetgetFeatures in interface MultiDataSetpublic void setFeatures(INDArray[] features)
MultiDataSetsetFeatures in interface MultiDataSetpublic void setFeatures(int idx,
INDArray features)
MultiDataSetsetFeatures in interface MultiDataSetpublic INDArray[] getLabels()
MultiDataSetgetLabels in interface MultiDataSetpublic INDArray getLabels(int index)
MultiDataSetgetLabels in interface MultiDataSetpublic void setLabels(INDArray[] labels)
MultiDataSetsetLabels in interface MultiDataSetpublic void setLabels(int idx,
INDArray labels)
MultiDataSetsetLabels in interface MultiDataSetpublic boolean hasMaskArrays()
MultiDataSethasMaskArrays in interface MultiDataSetpublic INDArray[] getFeaturesMaskArrays()
MultiDataSetgetFeaturesMaskArrays in interface MultiDataSetpublic INDArray getFeaturesMaskArray(int index)
MultiDataSetgetFeaturesMaskArray in interface MultiDataSetpublic void setFeaturesMaskArrays(INDArray[] maskArrays)
MultiDataSetsetFeaturesMaskArrays in interface MultiDataSetpublic void setFeaturesMaskArray(int idx,
INDArray maskArray)
MultiDataSetsetFeaturesMaskArray in interface MultiDataSetpublic INDArray[] getLabelsMaskArrays()
MultiDataSetgetLabelsMaskArrays in interface MultiDataSetpublic INDArray getLabelsMaskArray(int index)
MultiDataSetgetLabelsMaskArray in interface MultiDataSetpublic void setLabelsMaskArray(INDArray[] labelsMaskArrays)
MultiDataSetsetLabelsMaskArray in interface MultiDataSetpublic void setLabelsMaskArray(int idx,
INDArray labelsMaskArray)
MultiDataSetsetLabelsMaskArray in interface MultiDataSetpublic void save(OutputStream to) throws IOException
MultiDataSetsave in interface MultiDataSetIOExceptionpublic void save(File to) throws IOException
MultiDataSetsave in interface MultiDataSetIOExceptionpublic void load(InputStream from) throws IOException
MultiDataSetload in interface MultiDataSetIOExceptionpublic void load(File from) throws IOException
MultiDataSetload in interface MultiDataSetIOExceptionpublic List<MultiDataSet> asList()
MultiDataSetasList in interface MultiDataSetpublic MultiDataSet copy()
copy in interface MultiDataSetpublic static MultiDataSet merge(Collection<? extends MultiDataSet> toMerge)
toMerge - Collection of MultiDataSet objects to mergepublic long getMemoryFootprint()
getMemoryFootprint in interface MultiDataSetpublic void migrate()
MultiDataSetmigrate in interface MultiDataSetpublic void detach()
detach in interface MultiDataSetpublic boolean isEmpty()
isEmpty in interface MultiDataSetpublic void shuffle()
MultiDataSetshuffle in interface MultiDataSetCopyright © 2018. All rights reserved.