ARIMA Example 1: OrdersTable, PartitionColumns, No Seasonality - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

Input

The input table, milk_3, is partitioned into two time series.

InputTable: milk_3
id_partition id period milkpound
1 1 1962-01 578.3
1 2 1962-02 609.8
1 3 1962-03 628.4
1 4 1962-04 665.6
1 5 1962-05 713.8
1 6 1962-06 707.2
... ... ... ...
1 46 1965-10 609.7
1 47 1965-11 610.8
1 48 1965-12 623.5
2 49 1966-01 664.7
2 50 1966-02 690.3
2 51 1966-03 722.6
2 52 1966-04 766
2 53 1966-05 796.3
2 54 1966-06 809.6
... ... ... ...
2 153 1974-09 826.9
2 154 1974-10 797.3
2 155 1974-11 784.3
2 156 1974-12 798.2
OrdersTable: arimaex1_orders
id_partition p d q include_drift include_mean
1 1 1 1 0 0
2 0 1 2 0 0

SQL Call

SELECT * FROM ARIMA (
  ON milk_3 AS InputTable PARTITION BY id_partition
  ON arimaex1_orders AS OrdersTable PARTITION BY id_partition
  OUT TABLE ModelTable (arimaex1_model) 
  OUT TABLE ResidualTable (arimaex1_resid)
  USING
  TimeColumns ('period')
  TargetColumn ('milkpound')
  PartitionColumns ('id_partition')
) AS dt;

Output

arimaex1_model
id_partition coef value_col
1 coef 1, 1, 1, 0, 0, 0
1 ar_params 0.3434734374928141
1 ma_params 0.5815240222444754
1 seasonal_ar_params  
1 seasonal_ma_params  
1 period 0
1 sigma2 591.6657534770306
1 aic 6.468048252799836
1 bic 6.546777937978987
1 iterations 33
1 converged true
2 coef 0, 1, 2, 0, 0, 0
2 ar_params  
2 ma_params 0.8306295650150847 ,0.3998568667682024
2 seasonal_ar_params  
2 seasonal_ma_params  
2 period 0
2 sigma2 643.230549126074
2 aic 6.503886389838804
2 bic 6.5538458073053825
2 iterations 33
2 converged true
arimaex1_resid
id_partition period value_col residual
1 1962-01 578.3 0
1 1962-02 609.8 0
1 1962-03 628.4 -10.5373833606309
1 1962-04 665.6 36.9390742119418
1 1962-05 713.8 13.941858089747
1 1962-06 707.2 -31.2629248597935
1 1962-07 628.4 -58.3529296795043
1 1962-08 588.1 20.6992842304921
1 1962-09 576.3 -9.99512251414182
1 1962-10 566.5 0.0653984239055347
1 1962-11 561.1 -2.0720196739419
1 1962-12 571.4 13.3597429911285
1 1963-01 589.1 6.39314651418156
1 1963-02 615.3 16.4027808588473
1 1963-03 641.2 7.36240505792823
... ... ... ...