Process Windows (Time Series)
SynopsisThis operator creates sliding windows from the input time series ExampleSet and loops over its inner subprocess for each of the windows.
A window, with the size defined by the window size parameter is created from the input time series and provided at the inner windowed example set port of the operator. Any operators can be inserted into the subprocess and work with the windowed ExampleSet. The results can than be provided to the output port. These output port is a port extender, which means, that a new output port is created every time you connect one of the ports.
If the parameter create horizon (labels) or the parameter add last index in window attribute is set to true, additional attributes are added to ExampleSets provided at the output ports. See the description of these parameters for more details.
For the next iteration the window is shifted by k values, defined by the step size parameter. If the parameter no overlapping windows is set to true, the step size is set to a value that neither the window nor the horizon window (if the parameter create horizon (labels) is set to true) are overlapping (step size = window size + horizon size + horizon offset).
This operator works on all time series (numerical, nominal and time series with date time values).
- example set (IOObject)
The ExampleSet which contains the time series data as attributes.
- input (IOObject)
This is port is a port extender, which means if a port is connected a new input port is created. Any IOObject can be connected to the port and is passed to the corresponding inner input port for each iteration.
- output (IOObject)
This is port is a port extender, which means if a port is connected a new output port is created. The port collects every result that is provided by the inner process and returns a collections of all iterations. If the parameters create horizon (labels) or add last index in window attribute is set to true and the connected IOObject is an ExampleSet, additional attributes are added to the ExampleSets. See the description of the corresponding parameters for details.
This parameter allows you to select the filter for the time series attributes selection filter; the method you want to select the attributes which holds the time series values. The different filter types are:
- all: This option selects all attributes of the ExampleSet to be time series attributes. This is the default option.
- single: This option allows the selection of a single time series attribute. The required attribute is selected by the attribute parameter.
- subset: This option allows the selection of multiple time series attributes through a list (see parameter attributes). If the meta data of the ExampleSet is known all attributes are present in the list and the required ones can easily be selected.
- regular_expression: This option allows you to specify a regular expression for the time series attribute selection. The regular expression filter is configured by the parameters regular expression, use except expression and except expression.
- value_type: This option allows selection of all the attributes of a particular type to be time series attributes. It should be noted that types are hierarchical. For example real and integer types both belong to the numeric type. The value type filter is configured by the parameters value type, use value type exception, except value type.
- block_type: This option allows the selection of all the attributes of a particular block type to be time series attributes. It should be noted that block types may be hierarchical. For example value_series_start and value_series_end block types both belong to the value_series block type. The block type filter is configured by the parameters block type, use block type exception, except block type.
- no_missing_values: This option selects all attributes of the ExampleSet as time series attributes which do not contain a missing value in any example. Attributes that have even a single missing value are not selected.
- numeric_value_filter: All numeric attributes whose examples all match a given numeric condition are selected as time series attributes. The condition is specified by the numeric condition parameter.
The required attribute can be selected from this option. The attribute name can be selected from the drop down box of the parameter if the meta data is known.Range:
The required attributes can be selected from this option. This opens a new window with two lists. All attributes are present in the left list. They can be shifted to the right list, which is the list of selected time series attributes.Range:
Attributes whose names match this expression will be selected. The expression can be specified through the edit and preview regular expression menu. This menu gives a good idea of regular expressions and it also allows you to try different expressions and preview the results simultaneously.Range:
If enabled, an exception to the first regular expression can be specified. This exception is specified by the except regular expression parameter.Range:
This option allows you to specify a regular expression. Attributes matching this expression will be filtered out even if they match the first expression (expression that was specified in regular expression parameter).Range:
This option allows to select a type of attribute.Range:
If enabled, an exception to the selected type can be specified. This exception is specified by the except value type parameter.Range:
The attributes matching this type will be removed from the final output even if they matched the before selected type, specified by the value type parameter.Range:
This option allows to select a block type of attribute.Range:
If enabled, an exception to the selected block type can be specified. This exception is specified by the except block type parameter.Range:
The attributes matching this block type will be removed from the final output even if they matched the before selected type by the block type parameter.Range:
The numeric condition used by the numeric condition filter type. A numeric attribute is selected if all examples match the specified condition for this attribute. For example the numeric condition '> 6' will keep all numeric attributes having a value of greater than 6 in every example. A combination of conditions is possible: '> 6 && < 11' or '<= 5 || < 0'. But && and || cannot be used together in one numeric condition. Conditions like '(> 0 && < 2) || (>10 && < 12)' are not allowed because they use both && and ||.Range:
If this parameter is set to true the selection is reversed. In that case all attributes not matching the specified condition are selected as time series attributes. Sspecial attributes are selected independent of the invert selection parameter as along as the include special attributes parameter is not set to true. If so the condition is also applied to the special attributes and the selection is reversed if this parameter is checked.Range:
Special attributes are attributes with special roles. These are: id, label, prediction, cluster, weight and batch. Also custom roles can be assigned to attributes. By default special attributes are selected as time series attributes irrespective of the filter conditions. If this parameter is set to true, special attributes are also tested against conditions specified and those attributes are selected that match the conditions.Range:
This parameter indicates if there is an index attribute associated with the time series. If this parameter is set to true, the index attribute has to be selected.Range:
If the parameter has indices is set to true, this parameter defines the associated index attribute. It can be either a date, date_time or numeric value type attribute. The attribute name can be selected from the drop down box of the parameter if the meta data is known.Range:
The number of values in one window. The ExampleSet provided at the windowed example set port of the inner subprocess will have window size number of examples. The window size has to be smaller or equal to the length of the time series.Range:
If this parameter is set to true, the parameter stepsize is determined automatically, so that windows and horizons don't overlap. The stepsize is set to window size + horizon size + horizon offset.Range:
The step size between the first values of two consecutive windows. E.g. with a window size of 10 and a step size of 2, the first window has the values from 0, ..., 9, the second window the values from 2, ..., 11 and so on. If no overlaping windows is set to true the step size is automatically determined depending on window size, horizon size and horizon offset.Range:
If this parameter is set to true, one or more attributes are added to all ExampleSets which are provided at the output port of the inner subprocess. They contain the values of the horizon window which is defined by the parameters horizon attribute, horizon size and horizon offset. Objects provided at the output ports, which aren't ExampleSet are not changed.Range:
If the parameter create horizon (labels) is set to true, this parameter defines the attribute holding the horizon. The attribute name can be selected from the drop down box of the parameter if the meta data is known.Range:
The number of values taken as the horizon. For each value in the horizon, an attribute is created, named <time series attribute name> + i (horizon) with i running from 1, ..., horizon size. If the horizon size is one, the role of the created attribute is set to label. If the size is larger (and thus more than one attribute is created), the role of the attributes are set to Horizon + i, with i running from 1, ..., horizon size.Range:
The offset between the windows and their corresponding horizons. If the offset is 0 the horizon is taken from the consecutive values behind the window. Otherwise the horizon is horizon offset values behind the end of the window.Range:
If this parameter is set to true, an additional attribute is added to all ExampleSets which are provided at the output port of the inner subprocess. If the parameter has indices is true, the additional attribute is named: Last <indices attribute> in window and contains the last index value in the corresponding window. If has indices is false the additional attribute is called Window id and contains the number of the corresponding window (starting form 0). Objects provided at the output ports, which aren't ExampleSet are not changed.Range:
This parameter enables the parallel execution of the subprocess. Please disable the parallel execution if you run into memory problems.Range:
Extracting aggregates of windows of the Lake Huron data set
In this tutorial process, the Process Windows operator is used to loop over windows of size 30 of the Lake Huron data set. For each window, the Extract Aggregates operator is used to calculate some features of the window. The caculated features are then provided to the output port of the inner subprocess. Due to the parameters create horizon (labels) and add last index in window attribute are set to true, an attribute holding the horizon value (cause horizon size is 1) and an attribute holding the last Date (the indices attribute of the time series) in the window are added to the features ExampleSet.
The Append operator is used to append the features of all windows to one ExampleSet. This can be used to train a machine learning model.