public class TimeSeriesOperations extends Object implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
TimeSeriesOperations.CombineMethod
Public enum of methods for combining synchronous time series values.
|
static interface |
TimeSeriesOperations.Function
Public interface for the user-supplied function that defines how to
combine two synchronous time series values.
|
static class |
TimeSeriesOperations.MergeRule
Public enum of merge rules that defines how two time series should be
merged.
|
Constructor and Description |
---|
TimeSeriesOperations()
Constructor for TimeSeriesOperations.
|
Modifier and Type | Method and Description |
---|---|
TimeSeries |
backshift(TimeSeries ts,
int lag)
Returns the backshifted version of the time series.
|
double[][] |
getMeanCenteredSeries(TimeSeries timeSeries)
Returns the mean-centered values of all the series in a
TimeSeries object. |
double[] |
getMeanCenteredSeries(TimeSeries timeSeries,
int k)
Returns the mean-centered values of the k-th series in a
TimeSeries object. |
TimeSeries |
merge(TimeSeries ts1,
TimeSeries ts2)
Merges two time series objects.
|
void |
setCombineFunction(TimeSeriesOperations.Function function)
Sets the combine function to a user supplied function.
|
void |
setCombineMethod(TimeSeriesOperations.CombineMethod combineMethod)
Sets the method for combining synchronous time series values.
|
void |
setMergeRule(TimeSeriesOperations.MergeRule mergeRule)
Sets the rule that defines how two time series are merged.
|
double[] |
stack(TimeSeries ts)
Stacks or vectorizes the values of a multivariate TimeSeries.
|
public TimeSeriesOperations()
public double[][] getMeanCenteredSeries(TimeSeries timeSeries)
TimeSeries
object.timeSeries
- a TimeSeries
objectdouble
matrix containing the mean-centered valuespublic double[] getMeanCenteredSeries(TimeSeries timeSeries, int k)
TimeSeries
object.timeSeries
- a TimeSeries
objectk
- an int
, the column index of the seriesdouble
array containing the mean-centered valuespublic void setMergeRule(TimeSeriesOperations.MergeRule mergeRule)
mergeRule
- a MergeRule
value.public void setCombineMethod(TimeSeriesOperations.CombineMethod combineMethod)
combineMethod
- a CombineMethod
value.public void setCombineFunction(TimeSeriesOperations.Function function)
function
- a Function
that defines how two values
should be combined.public TimeSeries backshift(TimeSeries ts, int lag)
ts
- a TimeSeries
object.lag
- an int
specifying the lag.TimeSeries
with values at index i
the
same as the original series values at position i-lag
;public double[] stack(TimeSeries ts)
ts
- TimeSeries
double[]
array of length
T*numberOfSeries
with the index
1,...,numberOfSeries
varying fastest.public TimeSeries merge(TimeSeries ts1, TimeSeries ts2)
ts1
- a TimeSeries
object.ts2
- a TimeSeries
object.TimeSeries
object resulting from merging
ts1
and ts2
.Copyright © 2020 Rogue Wave Software. All rights reserved.