Categories

Versions

You are viewing the RapidMiner Studio documentation for version 10.0 - Check here for latest version

Fast Fourier Transformation (Time Series)

Synopsis

This operators calculates the Fast Fourier Transformation of time series.

Description

The outcome is the amplitude spectrum of the frequencies of the input time series. If the parameter add phase spectrum is set to true, also the phase spectrum of the frequencies is added to the result.

If the parameter calculate frequency is selected, the frequency values for the amplitude spectrum are added to the result. The sample rate to calculate the frequency values is either taken from the index attribute, or if it is no index attribute is provided, the sample rate can be specified by the corresponding parameter.

This operator works only on numerical time series.

Input

  • example set (Data Table)

    The ExampleSet which contains the time series data as attributes.

Output

  • fft transformed example set (Data Table)

    The ExampleSet containing the results of the FFT. It contains the amplitude spectrum for the selected attributes and optionally the phase spectrum.

  • original (Data Table)

    The ExampleSet that was given as input is passed through without changes.

Parameters

  • attribute_filter_type

    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. Only numeric attributes can be selected as time series attributes. 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.
    Range:
  • 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.

    Range:
  • 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.

    Range:
  • regular_expression

    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:
  • use_except_expression

    If enabled, an exception to the first regular expression can be specified. This exception is specified by the except regular expression parameter.

    Range:
  • except_regular_expression

    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:
  • value_type

    This option allows to select a type of attribute. One of the following types can be chosen: numeric, integer, real.

    Range:
  • use_value_type_exception

    If enabled, an exception to the selected type can be specified. This exception is specified by the except value type parameter.

    Range:
  • except_value_type

    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. One of the following types can be selected here: numeric, integer, real.

    Range:
  • block_type

    This option allows to select a block type of attribute. One of the following types can be chosen: value_series, value_series_start, value_series_end.

    Range:
  • use_block_type_exception

    If enabled, an exception to the selected block type can be specified. This exception is specified by the except block type parameter.

    Range:
  • except_block_type

    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. One of the following block types can be selected here: value_series, value_series_start, value_series_end.

    Range:
  • numeric_condition

    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:
  • invert_selection

    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. Special attributes are not 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:
  • include_special_attributes

    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 not 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:
  • has_indices

    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:
  • indices_attribute

    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:
  • 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.

    Range:
  • add_phase_spectrum

    If selected the phase spectrum of the FFT is returned as well.

    Range:
  • use_padding

    If selected the input series is filled up to the next larger power of two with zeros before calculating the FFT. Depending of the actual length of the series, either cutting the series to the next smaller power or padding to the next bigger power is better. Reducing the number can lead a loss of signals, while a large padding can add more noise.

    Range:
  • calculate_frequency

    If selected the frequency of the FFT is calculated. The frequency is based on the length of the FFT (either the next smaller or larger power of two, depending if padding is used or not) and the sample rate of the data. Most often the sample rate is one, meaning there is one signal per time unit (e.g., one signal per second or hour). But the rate can be also significantly higher, for example in audio signals.

    If the series has indices, they are used to automatically calculate the sample rate. In case of a time signal, the frequency is automatically scaled to Hertz.

    Range:
  • sample_rate

    If the frequency is calculates, this indicates how often a sample is taken per time period. Most often this is one, so one sample per time unit. If the series has indices, they are used to calculate the sample rate.

    Range:

Tutorial Processes

Calculating FFT of a sinus signal

In this tutorial process the FFT of a sinus signal is demonstrated. The result shows the major frequencies for the pure signal and a signal with some noise added.

Interpreting FFT Frequency

In this tutorial process the FFT of the hourly gas station prices and its frequency are calculated. The result shows a big in the FFT around the frequency value of 0.0417. Taking the inverse of this value is roughly 24, which indicates a periodicity every 24 hours.