This transformation is used to convert a equidistant time series to a non equidistant time series.
The transformation has two input time series. The first one is the equidistant time series which should be converted to a non-equidistant time series. The second time series is used as a reference time series. For each non-equidistant time step in this reference time series a non-equidistant time step will be created in the output time series. A single entry in the input time series can be re-used for sampling multiple entries in the output time series. For the equidistantInputVariable a non-equidistant time series can be supplied as well.
The value at this time step will derived from sampling the equidistant time series. It is possible to configure how the equidistant time series should be sampled.
The available options are:
Closest
For each time step in the output time series the closest value in the sampled equidistant input time series is used as the output value.
ClosestForward
For each time step in the output time series the closest value after the output time step in the sampled equidistant input time series is used as the output value.
ClosestBackward
For each time step in the output time series the closest value before the output time step in the sampled equidistant input time series is used as the output value.
Linear
For each time step in the output time series the output value will be determined by linear interpolation between the closest value before the output time step and the closest value
after the output time step
Missing
All output values are set to missing.
In this function two input time series and one output time series must be identified.
A basic configuration of the function is described below. This describes the main elements and attributes required and provides an example configuration.
required element defined the equidistant time series which should be sampled.
required element defining the non-equidistant time steps for which output should be generated.
required element which defines which sampling method should be used.
<transformation id="Sample"> <sample> <equidistant> <equidistantInputVariable> <variableId>inputTimeSeries</variableId> </equidistantInputVariable> <timeReferenceInputVariable> <variableId>timeReferenceTimeSeries</variableId> </timeReferenceInputVariable> <interpolationType>closest</interpolationType> <outputVariable> <variableId>output</variableId> </outputVariable> </equidistant> </sample> |
Additional advanced options are available and are briefly described. See schema for information on how to configure advanced options.
Optional element to define a Java class to override the default class used for the transformation. If used this class must be available and implement the required transformation interface. See transformation - user defined classes for details
When a forecastLoopSearchPeriod is configured the transformation will be repeated for each external forecast found in the defined period.
This will only work when the <equidistantInputVariable> and <outputVariable> are external forecasts, the output variable for each execution will get the same external forecast time.
When <timeReferenceInputVariable> is also an external forecast, the same amount of external forecasts should be present as in the <equidistantInputVariable> because these will also be looped over.
When <timeReferenceInputVariable> is not an external forecast there will only be 1 time series available, this one be be reused for step of the loop.
<transformation id="Sample"> <sample> <equidistant> <equidistantInputVariable> <variableId>inputTimeSeries</variableId> </equidistantInputVariable> <timeReferenceInputVariable> <variableId>timeReferenceTimeSeries</variableId> </timeReferenceInputVariable> <forecastLoopSearchPeriod unit="week" start="-4" end="0"/> <interpolationType>closest</interpolationType> <outputVariable> <variableId>output</variableId> </outputVariable> </equidistant> </sample> |