Equalize Time Stamps
Synopsis
This operators computes an equalized time series of an input time series with date time indices.
Description
The output time series will have new equidistant index values. The configuration of the new index values are defined by the parameter equalize method. Each method has different ways how the number of examples, start date, stop date and step size of the new index values are determined. For details see the description of the parameter equalize method.
Note that the time domain (see parameter time domain) is an important distinction for equalizing time stamps. Calendar entries for example are not equidistant on a time duration scale (e.g. months have different length). Nevertheless for many use cases (e.g. sales time series) it is important to have monthly 'equidistant' time stamps. In other use cases (e.g. sensor data) it is important to have equidistant time stamps on a microsecond scale.
The new values of the equalized time series attributes will be computed by using the same functionality as the Replace Missing Values (Series) operator (note that this functionality is configured to ensure finite values). The three parameters replace type numerical, replace type nominal and replace type date time defines how the new values are computed.
This operator works on all time series (numerical, nominal, date-time) which have date time indices.
Input
example set
The ExampleSet which contains the time series data as attributes.
Output
equalized example set
The ExampleSet contains the equalized time series.
original
The ExampleSet that was given as input is passed through without changes.
Parameters
Indices attribute
The attribute holding the indices values of the time series. It has to be date-time. The attribute name can be selected from the drop down box of the parameter if the meta data is known.
Sort time series
If this parameter is selected, the input time series will be sorted, according to the selected indices attribute, before the time series operation is applied on. If it is not selected and the input time series is not sorted, a corresponding User Error is thrown.
Keep in mind that the indices values still needs to be unique. If the values are non-unique a corresponding User Error is thrown.
The data set provided at the original output port will be the sorted input time series.
Equalize method
This parameter defines the used equalize method. The configuration also depends on the parameters time_domain, round start and stop date and fit number of examples to range.
- same range and number of examples as orginal data: The same range ('start' and 'stop date') and the same 'number of examples' as the original data is used. The calculation of the 'step size' depends on the parameter 'time domain'. It is either the exact duration (on a millisecond scale) between
<start date>and<stop date>divided by(<number of examples> - 1)('time domain' is 'time') or the period (on a number of days scale) divided by(<number of examples> - 1)('time domain' is 'calendar'). For latter the number of examples can also be adapted to fit the range again (see parameter 'fit number of examples to range'). - number of examples, start value and step size: The 'number of examples', the 'start date' and the 'step size' are provided. The 'number of examples' and the 'start date' can be retrieved from the original data or provided as custom values (see the parameters 'number of examples', 'custom number of examples', 'start date', 'custom date value'). The step size has to be provided by the parameter 'step size (duration)' or 'step size (period)', depending on the parameter 'time domain'. The stop date is calculated as
<start date> + (<number of examples> - 1) x <step size> - number of examples and range(start,stop): The 'number of examples', the 'start date' and the 'stop date' are provided. The 'number of examples', the 'start date' and the 'stop date' can be retrieved from the original data or provided as custom values (see the parameters 'number of examples', 'custom number of examples', 'start date', 'custom start date','stop date', 'custom stop date'). The calculation of the 'step size' depends on the parameter 'time domain'. It is either the exact duration (on a millisecond scale) between
<start date>and<stop date>divided by (<number of examples>- 1) ('time domain' is 'time') or the period (on a number of days scale) divided by(<number of examples> - 1)('time domain' is 'calendar'). For latter the number of examples can also be adapted to fit the range again (see parameter 'fit number of examples to range'). - range(start,stop) and step size: The 'start date', the 'stop date' and the 'step size' are provided. The 'start date' and the 'stop date' can be retrieved from the original data or provided as custom values (see the parameters 'start date', 'custom start date','stop date', 'custom stop date'). The 'step size' has to be provided by the parameter 'step size (duration)' or 'step size (period)', depending on the parameter 'time domain'. The 'number of examples' is calculated that the
<start date> + (<number of examples> - 1) x <step size>is after the<stop date>and that<start date> + (<number of examples> - 2) x <step size>is before (thus the last index value is the first of the index values which is after the<stop date>).
Number of examples
Specify how the number of examples is retrieved.
- same as original data: Same value as the original data.
- custom: The value is specified by the parameter 'custom number of examples'.
Custom number of examples
New number of examples for the equalized time series
Start value
Specify how the start date is retrieved.
- same as original data: Same value as the original data.
- custom: The value is specified by the parameter 'custom start date'.
Custom start date
New start date of the index values for the equalized time series.
Stop value
Specify how the stop date is retrieved.
- same as original data: Same value as the original data.
- custom: The value is specified by the parameter 'custom stop date'.