public class TimeSeriesDataset<L> extends java.lang.Object implements IOrderedLabeledAttributeArrayDataset<TimeSeriesInstance<L>,L>
| Constructor and Description |
|---|
TimeSeriesDataset(java.util.List<org.nd4j.linalg.api.ndarray.INDArray> valueMatrices,
java.util.List<org.nd4j.linalg.api.ndarray.INDArray> timestampMatrices,
org.nd4j.linalg.api.ndarray.INDArray targets,
IAttributeType<L> targetType)
Creates a TimeSeries dataset.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.nd4j.linalg.api.ndarray.INDArray valueMatrix,
org.nd4j.linalg.api.ndarray.INDArray timestampMatrix)
Add a time series variable to the dataset.
|
void |
add(int arg0,
TimeSeriesInstance<L> arg1) |
boolean |
add(TimeSeriesInstance<L> e) |
boolean |
addAll(java.util.Collection<? extends TimeSeriesInstance<L>> c) |
boolean |
addAll(int arg0,
java.util.Collection<? extends TimeSeriesInstance<L>> arg1) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
IDataset<TimeSeriesInstance<L>> |
createEmpty()
Creates an empty copy of the same structure (and same type).
|
TimeSeriesInstance<L> |
get(int index) |
java.util.List<IAttributeType<?>> |
getAttributeTypes()
Returns the list of attribute types.
|
int |
getNumberOfAttributes()
Getter for the number of attributes (excluding target attribute).
|
long |
getNumberOfInstances() |
int |
getNumberOfVariables() |
org.nd4j.linalg.api.ndarray.INDArray |
getTargets() |
IAttributeType<L> |
getTargetType()
Returns the attribute type of the target attribute.
|
org.nd4j.linalg.api.ndarray.INDArray |
getTimestamps(int index) |
org.nd4j.linalg.api.ndarray.INDArray |
getTimestampsOrNull(int index) |
org.nd4j.linalg.api.ndarray.INDArray |
getValues(int index) |
org.nd4j.linalg.api.ndarray.INDArray |
getValuesOrNull(int index) |
int |
indexOf(java.lang.Object arg0) |
boolean |
isEmpty() |
boolean |
isMultivariate() |
boolean |
isUnivariate() |
java.util.Iterator<TimeSeriesInstance<L>> |
iterator() |
int |
lastIndexOf(java.lang.Object arg0) |
java.util.ListIterator<TimeSeriesInstance<L>> |
listIterator() |
java.util.ListIterator<TimeSeriesInstance<L>> |
listIterator(int arg0) |
TimeSeriesInstance<L> |
remove(int index)
Removes the time series variable at a given index.
|
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
void |
replace(int index,
org.nd4j.linalg.api.ndarray.INDArray valueMatrix,
org.nd4j.linalg.api.ndarray.INDArray timestampMatrix)
Replaces the time series variable at a given index with a new one.
|
boolean |
retainAll(java.util.Collection<?> c) |
TimeSeriesInstance<L> |
set(int arg0,
TimeSeriesInstance<L> arg1) |
int |
size() |
java.util.List<TimeSeriesInstance<L>> |
subList(int arg0,
int arg1) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public TimeSeriesDataset(java.util.List<org.nd4j.linalg.api.ndarray.INDArray> valueMatrices,
java.util.List<org.nd4j.linalg.api.ndarray.INDArray> timestampMatrices,
org.nd4j.linalg.api.ndarray.INDArray targets,
IAttributeType<L> targetType)
valueMatrices - Values for the time series variables. List of
2D-Arrays with shape `[n, ?]`.timestampMatrices - Timestamps for the time series variables. List of
2D-Arrays with shape `[n, ?]`. Or `null` if no
timestamps exist for the corresponding time series
variable. The shape of the `i`th index must be equal
to the shape of the `i`th element of
`valueMatrices`.targets - Target values for the instances.public void add(org.nd4j.linalg.api.ndarray.INDArray valueMatrix,
org.nd4j.linalg.api.ndarray.INDArray timestampMatrix)
valueMatrix - Values for the time series variable to add. 2D-Arrays
with shape `[n, ?]` where `n` is the number of
instances of the dataset.timestampMatrix - Timestamps for the time series variable to add.
2D-Arrays with shape `[n, ?]` where `n` is the number
of instances of the dataset. Or `null` if no timestamp
exists for this time series variable.public TimeSeriesInstance<L> remove(int index)
remove in interface java.util.List<TimeSeriesInstance<L>>index - java.lang.IndexOutOfBoundsExceptionpublic void replace(int index,
org.nd4j.linalg.api.ndarray.INDArray valueMatrix,
org.nd4j.linalg.api.ndarray.INDArray timestampMatrix)
index - Index of the time series varialbe to replace.valueMatrix - Values for the time series variable to add. 2D-Arrays
with shape `[n, ?]` where `n` is the number of
instances of the dataset.timestampMatrix - Timestamps for the time series variable to add.
2D-Arrays with shape `[n, ?]` where `n` is the number
of instances of the dataset. Or `null` if no timestamp
exists for this time series variable.java.lang.IndexOutOfBoundsException - Thrown if `numberOfInstances <= index`.public org.nd4j.linalg.api.ndarray.INDArray getTargets()
public int getNumberOfVariables()
public long getNumberOfInstances()
public org.nd4j.linalg.api.ndarray.INDArray getValues(int index)
public org.nd4j.linalg.api.ndarray.INDArray getTimestamps(int index)
public org.nd4j.linalg.api.ndarray.INDArray getValuesOrNull(int index)
public org.nd4j.linalg.api.ndarray.INDArray getTimestampsOrNull(int index)
public boolean isEmpty()
isEmpty in interface java.util.Collection<TimeSeriesInstance<L>>isEmpty in interface java.util.List<TimeSeriesInstance<L>>public boolean isUnivariate()
public boolean isMultivariate()
public TimeSeriesInstance<L> get(int index)
get in interface java.util.List<TimeSeriesInstance<L>>public java.util.Iterator<TimeSeriesInstance<L>> iterator()
iterator in interface java.lang.Iterable<TimeSeriesInstance<L>>iterator in interface java.util.Collection<TimeSeriesInstance<L>>iterator in interface java.util.List<TimeSeriesInstance<L>>public int getNumberOfAttributes()
AILabeledAttributeArrayDatasetgetNumberOfAttributes in interface AILabeledAttributeArrayDataset<TimeSeriesInstance<L>,L>public java.util.List<IAttributeType<?>> getAttributeTypes()
AILabeledAttributeArrayDatasetgetAttributeTypes in interface AILabeledAttributeArrayDataset<TimeSeriesInstance<L>,L>public IAttributeType<L> getTargetType()
AILabeledAttributeArrayDatasetgetTargetType in interface AILabeledAttributeArrayDataset<TimeSeriesInstance<L>,L>public IDataset<TimeSeriesInstance<L>> createEmpty()
IDatasetcreateEmpty in interface IDataset<TimeSeriesInstance<L>>public boolean add(TimeSeriesInstance<L> e)
add in interface java.util.Collection<TimeSeriesInstance<L>>add in interface java.util.List<TimeSeriesInstance<L>>public boolean addAll(java.util.Collection<? extends TimeSeriesInstance<L>> c)
addAll in interface java.util.Collection<TimeSeriesInstance<L>>addAll in interface java.util.List<TimeSeriesInstance<L>>public void clear()
clear in interface java.util.Collection<TimeSeriesInstance<L>>clear in interface java.util.List<TimeSeriesInstance<L>>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<TimeSeriesInstance<L>>contains in interface java.util.List<TimeSeriesInstance<L>>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<TimeSeriesInstance<L>>containsAll in interface java.util.List<TimeSeriesInstance<L>>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<TimeSeriesInstance<L>>remove in interface java.util.List<TimeSeriesInstance<L>>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<TimeSeriesInstance<L>>removeAll in interface java.util.List<TimeSeriesInstance<L>>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<TimeSeriesInstance<L>>retainAll in interface java.util.List<TimeSeriesInstance<L>>public int size()
size in interface java.util.Collection<TimeSeriesInstance<L>>size in interface java.util.List<TimeSeriesInstance<L>>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<TimeSeriesInstance<L>>toArray in interface java.util.List<TimeSeriesInstance<L>>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<TimeSeriesInstance<L>>toArray in interface java.util.List<TimeSeriesInstance<L>>public void add(int arg0,
TimeSeriesInstance<L> arg1)
add in interface java.util.List<TimeSeriesInstance<L>>public boolean addAll(int arg0,
java.util.Collection<? extends TimeSeriesInstance<L>> arg1)
addAll in interface java.util.List<TimeSeriesInstance<L>>public int indexOf(java.lang.Object arg0)
indexOf in interface java.util.List<TimeSeriesInstance<L>>public int lastIndexOf(java.lang.Object arg0)
lastIndexOf in interface java.util.List<TimeSeriesInstance<L>>public java.util.ListIterator<TimeSeriesInstance<L>> listIterator()
listIterator in interface java.util.List<TimeSeriesInstance<L>>public java.util.ListIterator<TimeSeriesInstance<L>> listIterator(int arg0)
listIterator in interface java.util.List<TimeSeriesInstance<L>>public TimeSeriesInstance<L> set(int arg0, TimeSeriesInstance<L> arg1)
set in interface java.util.List<TimeSeriesInstance<L>>public java.util.List<TimeSeriesInstance<L>> subList(int arg0, int arg1)
subList in interface java.util.List<TimeSeriesInstance<L>>