Package edu.cmu.tetrad.data
Class TimeSeriesData
java.lang.Object
edu.cmu.tetrad.data.TimeSeriesData
- All Implemented Interfaces:
DataModel,KnowledgeTransferable,VariableSource,TetradSerializable,Serializable
Stores time series data as a list of continuous columns.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTimeSeriesData(Matrix matrix, List<String> varNames) Constructs a new time series data contains for the given row-major data array and the given list of variables. -
Method Summary
Modifier and TypeMethodDescriptioncopy()getData()doublegetDatum(int row, int col) getName()intintgetVariable(String name) Returns the variable names associated with this getVariableNames.Returns the list of variables associated with this object.booleanbooleanbooleanisMixed()static TimeSeriesDataGenerates a simple exemplar of this class to test serialization.voidsetKnowledge(Knowledge knowledge) Sets knowledge to a copy of the given object.voidSets the name of the data model (may be null).
-
Constructor Details
-
TimeSeriesData
Constructs a new time series data contains for the given row-major data array and the given list of variables. Each row of the data, data[i], contains a measured for each variable (in order) for a particular time. The series of times is in increasing order.
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
getName
-
setName
Description copied from interface:DataModelSets the name of the data model (may be null). -
isContinuous
public boolean isContinuous()- Specified by:
isContinuousin interfaceDataModel
-
isDiscrete
public boolean isDiscrete()- Specified by:
isDiscretein interfaceDataModel
-
isMixed
public boolean isMixed() -
getVariable
- Specified by:
getVariablein interfaceDataModel
-
copy
-
getVariables
Description copied from interface:VariableSourceReturns the list of variables associated with this object.- Specified by:
getVariablesin interfaceVariableSource- Returns:
- the list of variables associated with this object.
-
getKnowledge
- Specified by:
getKnowledgein interfaceKnowledgeTransferable- Returns:
- a copy of the knowledge for this class.
-
setKnowledge
Description copied from interface:KnowledgeTransferableSets knowledge to a copy of the given object.- Specified by:
setKnowledgein interfaceKnowledgeTransferable
-
getVariableNames
Description copied from interface:VariableSourceReturns the variable names associated with this getVariableNames.- Specified by:
getVariableNamesin interfaceVariableSource- Returns:
- (a copy of) the List of Variables for the data set, in the order of their columns.
-
getData
-
getNumTimePoints
public int getNumTimePoints() -
getNumVars
public int getNumVars() -
getDatum
public double getDatum(int row, int col)
-