Rolling Function

General information

This brick provides the feature of the rolling window calculation. The concept of rolling window calculation is most primarily used in signal processing and time-series data. Brick takes a window size of k (means k consecutive values at a time) at a time and performs some desired mathematical operation on it.

Description

Brick Location

Bricks → Calculation → Rolling Function

Brick Parameters

  • Columns
    • Column/Columns from the input data used for rolling function and a function which we will apply.
  • Window Size
    • Integer value for size of window will be used in rolling.

Brick Inputs/Outputs

  • Inputs
    • Brick takes the dataset.
  • Outputs
    • Brick produces the result as a new dataset with column/columns applied rolling function.

Example of usage

Let’s consider we have house prices dataset. It consists of many columns, they are: id, Neighbourhood, YearBuilt, RoofMatl, GrLivArea, YrSold, SalePrice.
notion image
Сonnect the input dataset to start using the brick, you'll see the dropdown with a list of possible columns for selection, alternatively, you can type the name in manually. You can add and select as many columns as you want by clicking on the '+' button in the brick settings. After that, you need to specify the window size (default is 2) and a function to be applied (sum, mean, min, or max).
notion image
Output:
notion image

Recommendations

  • Make sure, that chosen columns' types support rolling function (i. e., numerical types)