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:
- Joseph Ramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionTimeSeriesData(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 SummaryModifier and TypeMethodDescriptioncopy()getData()doublegetDatum(int row, int col) getName()intintgetVariable(String name) 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- 
TimeSeriesDataConstructs 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- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
getName
- 
setNameDescription copied from interface:DataModelSets the name of the data model (may be null).
- 
isContinuouspublic boolean isContinuous()- Specified by:
- isContinuousin interface- DataModel
 
- 
isDiscretepublic boolean isDiscrete()- Specified by:
- isDiscretein interface- DataModel
 
- 
isMixedpublic boolean isMixed()
- 
getVariable- Specified by:
- getVariablein interface- DataModel
 
- 
copy
- 
getVariables- Specified by:
- getVariablesin interface- VariableSource
- Returns:
- the list of variables associated with this object.
 
- 
getKnowledge- Specified by:
- getKnowledgein interface- KnowledgeTransferable
- Returns:
- a copy of the knowledge for this class.
 
- 
setKnowledgeDescription copied from interface:KnowledgeTransferableSets knowledge to a copy of the given object.- Specified by:
- setKnowledgein interface- KnowledgeTransferable
 
- 
getVariableNames- Specified by:
- getVariableNamesin interface- VariableSource
- Returns:
- (a copy of) the List of Variables for the data set, in the order of their columns.
 
- 
getData
- 
getNumTimePointspublic int getNumTimePoints()
- 
getNumVarspublic int getNumVars()
- 
getDatumpublic double getDatum(int row, int col) 
 
-