Lag
Synopsis
This operator performs a time series lag transformation on one or more attributes.
Description
Individual attributes can be lagged separately with different lag values by the parameter individual lags. In addition, a default lag for a set of attributes can be specified. If the parameter add default lag is checked, the set of attributes can be selected by the attribute filter. The default lag value for these attributes is given by the parameter default lag.
If the parameter overwrite attributes is selected, the lagged attributes overwrite the original ones. If not selected, new attributes are added to the ExampleSet (the names of the new attributes are in the form <attribute-name> - <lag>).
Lag values can also be negative, which effectively means all other attributes are lagged by this amount.
New attributes with a negative lag are named in the form <attribute-name> + <lag>.
If the parameter extend exampleset is selected, the resulting ExampleSet is extended by n examples where n is the sum of the maximum lag and the absolute value of the minimum lag (if there is a negative lag) specified. Attributes that are not selected for lagging are filled with missing values.
This operator works on all attributes (independent of type or role).
Input
example set input
The ExampleSet which contains the time series data as attributes.
Output
example set output
The ExampleSet after applying the lag transformation. If overwrite attributes is true, the original time series attributes are overwritten. Else new attributes with the lagged values are added. The names of the new attributes are in the form <attribute-name> - <lag> or <attribute-name> + <lag> if the lag is negative. If the parameter extend exampleset is selected, the resulting ExampleSet is extended by n examples where n is the sum of the maximum lag and the absolute value of the minimum lag (if there is a negative lag) specified. Attributes that are not selected for lagging are filled with missing values.
original
The ExampleSet that was given as input is passed through without changes.
Parameters
Individual lags
The lag attributes can be selected by the drop down menu if the meta data is known. For each attribute an integer lag value has to be specified. If overwrite attributes is not selected, the same attribute can be lagged more than one time with different lag values.
Individual attribute
The lag attribute can be selected by the drop down menu if the meta data is known. It can also be typed in manually.
Lag
This parameter defines the number of lags for the individual attribute. Example i will contain the value of Example i-lag. The first lag values will be filled with missing values. lag value can be positive or negative.
Add default lag
If this parameter is selected a default lag for a set of attributes can be specified. The set of these default lagged attributes can be selected by the attribute filter. The default lag value for is given by the parameter default lag.
Attribute filter type
This parameter allows you to select the filter for the default lag attributes selection filter; the method you want to select the attributes on which the default lag is applied. The different filter types are:
- all: This option selects all attributes of the ExampleSet. This is the default option.
- single: This option allows the selection of a single attribute. The required attribute is selected by the attribute parameter.
- subset: This option allows the selection of multiple 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 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. 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. 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 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. The condition is specified by the numeric condition parameter.
Attribute
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.
Attributes
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.