Icon

Auto-SARIMA Exercise

SARIMA Temperature Forecasting

This workflow demonstrates how the SARIMA components can be used to generate forecasts. In this case for hourly temperature data.

Annotations and comments
  • Building a SARIMA Model 1) Run the Table Reader node to the left. The data here is hourly temperature data for LA 2) Attach and run the Timestamp Allignment component. Configure the component to hourly data, and check the box to replace the data and time column. This component will verify that our table contains data for every hour, and if not, insert a missing value. 3) Attach and run the Numeric Outliers node. We include the numeric outlier node here to filter out any eronious sensor readings. We know the temperature in LA wasn't over 200F for example! Select an appropraitly large k value and check the box to replace outliers with missing values. 4) Attach and run the Missing Values node. Now attach the missing values node and configure it to impute the missing values in our temperature column, lets use linear interpolation since temperature should be a continuous feature. 5) Connect and run the Auto-SARIMA Component. When configuring this component select the temperature as our forecast column and choose how many forecasts to generate. 72 represents 3 days and is a nice place to start. The backwards length setting only effects the visualization, set it to something similar to your forecast length. View the visualization. Optional 6) Use more of the components from the Time Series Analysis group. * Go to your knime explorer to the top left and connect to the example server. Double click to connect. * Open the first subfolder, 00_Components - then Time Series * Try using the inspect seasonality componet to view the ACF and PACF plots of the time series * Try using the decompose signal component to automaticaly seperate trend, seasonality, and residual * Try configuring your own SARIMA model manually with the SARIMA Learner Component * Try generating forecasts with the SARIMA Predictor component (the learner will plug into it) * Try any other components that seem intersting to you.
  • numeric column
  • missing values
  • empty table
  • Target Selection
  • checks for appropriate python environment
  • Forecast Length
  • Backwards Length
  • LinePlot
  • only pass target to python
  • rename target
  • Target Column
  • break if missing values
  • break if seasonal period is 0 with non zero ar / ma / i terms
  • break if num missing > 0
  • filter to target column
  • num rows
  • largest lag term
  • count missing
  • AR Order
  • I Order
  • MA Order
  • Seasonal AR Order
  • Seasonal MA Order
  • Seasonal I Order
  • Seasonal period
  • Missing MAPE if zeroes in target
  • SARIMA Learner
  • Residuals
  • Model summary
  • Dynamic
  • EmptyTable to satisfy data input port
  • number of Periods to Forecast
  • forecast
  • in-sample prediction
  • level
  • attempt to generate in-sample dependent on size of model trained
  • q
  • p
  • fail if step size > max lag
  • Calculate sample acf
  • signalcolumn
  • Cut Off
  • Calculate row count
  • Max Lag
  • Step Size
  • join with original data
  • ACF
  • PACF
  • calc correlations
  • check that step size <= max lag
  • Colors
  • export dominant seasonality lag as flow variable
  • s
  • get only value column
  • take only lag column
  • remove lag col
  • Only allows for numeric selection
  • rename col to data
  • rename lag
  • rename col
  • Value Column
  • get number of rows
  • Lag Value
  • create col name
  • join with original table
  • create lag cols
  • remove seasonality
  • remove missing rows
  • replace missing vals with 0
  • Main Title
  • ARIMA
  • Read Temperature Data for LA ~3 weeks of data
  • boolean to replace timestamp column
  • take only the timestamp col
  • select timestamp
  • rename col to lower bound
  • rename col to upper bound
  • update domain
  • extract table dim
  • extract table spec
  • get index of last row
  • merge all
  • take only last row
  • take only first row
  • top port: Local Date Time second port: Local Date
  • top port: Local Time bottom port: Zoned Date Time
  • for Local Date Time
  • for Local Date
  • for Local Time
  • for Zoned Date Time
  • determine the port for the CASE Switch node
  • merge all flow variables
  • rename the new timestamp col to the old timestamp name
  • rename the new timestamp col
  • top: replace bottom: append
  • create column name
  • join with other input columns
  • sort by timestamp
  • create new RowIDs
  • map the selected window to the corresponding period
  • determine port
  • select time window

Nodes

Extensions

Links