I followed the autoregressive model example but encountered an error when I tried to use predict_autoregressor to predict the future values.
This is the SQL script I'm using
-- Create Auto Regressor Model for ph value
select AUTOREGRESSOR('public.ar_ph', 'AEROPREDICTIVEMAINT.readings', 'ph', 'timestamp' USING PARAMETERS p=3);
--Predict future value
SELECT PREDICT_AUTOREGRESSOR('ph' USING PARAMETERS model_name='public.ar_ph', npredictions=10, missing = 'linear_interpolation') OVER(ORDER BY timestamp) FROM AEROPREDICTIVEMAINT* .readings;
This is the error I received
[Code: 5861, SQL State: VP001] [Vertica]VJDBC ERROR: Error calling processPartition() in User Function predict_autoregressor at [src/Autoregression/PredictAR.cpp:281], error code: 0, message: Cannot linearly interpolate missing values when dataset starts with missing/invalid value(s). Either use a different 'missing' method or fix the dataset. Supported missing methods are 'error', 'zero', 'drop', and 'linear_interpolation'.
This is my data format
reading_id int
asset_id int
timestamp TIMESTAMP - format: YYYY-MM-DD HH:MI:SS
ph float
ec float
This is the sample data
1 1 2022-10-31 20:00:12 5.764902593 1077.394252
2 1 2022-10-31 20:00:27 6.820504555 1077.394252
3 1 2022-10-31 20:00:42 6.024084093 1076.323041
4 1 2022-10-31 20:00:57 6.020817099 1076.323041
