Class TimeSeriesAttributeType
- java.lang.Object
-
- ai.libs.jaicore.ml.core.dataset.attribute.timeseries.TimeSeriesAttributeType
-
- All Implemented Interfaces:
IAttributeType<org.nd4j.linalg.api.ndarray.INDArray>,java.io.Serializable
public class TimeSeriesAttributeType extends java.lang.Object implements IAttributeType<org.nd4j.linalg.api.ndarray.INDArray>
Describes a time series type as an 1-NDArray with a fixed length.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimeSeriesAttributeType(int length)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAttributeValue<org.nd4j.linalg.api.ndarray.INDArray>buildAttributeValue(java.lang.Object value)Casts the value to the respective type and returns an attribute value with the creating attribute type as the referenced type.IAttributeValue<org.nd4j.linalg.api.ndarray.INDArray>buildAttributeValue(java.lang.String stringDescription)Builds an attribute value object from a string description.intgetLength()Get the length of this time series attribute type.java.lang.StringgetStringDescriptionOfDomain()booleanisValidValue(org.nd4j.linalg.api.ndarray.INDArray value)Validates whether a INDArray conforms to this time series.voidsetLength(int length)
-
-
-
Method Detail
-
isValidValue
public boolean isValidValue(org.nd4j.linalg.api.ndarray.INDArray value)
Validates whether a INDArray conforms to this time series. An INDArray confirms to this value, if its rank is 1 and its length equals the length of this time series.- Specified by:
isValidValuein interfaceIAttributeType<org.nd4j.linalg.api.ndarray.INDArray>- Parameters:
value- The value to validated.- Returns:
- Returns true if the given value conforms
-
buildAttributeValue
public IAttributeValue<org.nd4j.linalg.api.ndarray.INDArray> buildAttributeValue(java.lang.Object value)
Description copied from interface:IAttributeTypeCasts the value to the respective type and returns an attribute value with the creating attribute type as the referenced type.- Specified by:
buildAttributeValuein interfaceIAttributeType<org.nd4j.linalg.api.ndarray.INDArray>- Parameters:
value- The value of the attribute.- Returns:
- An attribute value object holding the value of the attribute and referring to this attribute type.
-
buildAttributeValue
public IAttributeValue<org.nd4j.linalg.api.ndarray.INDArray> buildAttributeValue(java.lang.String stringDescription)
Description copied from interface:IAttributeTypeBuilds an attribute value object from a string description. The attribute value references this attribute type.- Specified by:
buildAttributeValuein interfaceIAttributeType<org.nd4j.linalg.api.ndarray.INDArray>- Parameters:
stringDescription- A String-format description of the attribute's value.- Returns:
- The attribute value object holding an attribute value interpreting the string description and referring to this attribute type.
-
getLength
public int getLength()
Get the length of this time series attribute type.- Returns:
- The length respec. the number of datapoints of this time series attribute.
-
setLength
public void setLength(int length)
-
getStringDescriptionOfDomain
public java.lang.String getStringDescriptionOfDomain()
- Specified by:
getStringDescriptionOfDomainin interfaceIAttributeType<org.nd4j.linalg.api.ndarray.INDArray>
-
-