blob: b61b59949e801c58829d0d53d37593657775e81a [file] [log] [blame]
/* ----------------------------------------------------------------------- *//**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*//* ----------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
* ARIMA Install Check.
* -------------------------------------------------------------------------- */
DROP TABLE IF EXISTS "ARIMA_beer";
CREATE TABLE "ARIMA_beer" ("TIME_id" integer NOT NULL, "VALUE" double precision NOT NULL );
COPY "ARIMA_beer" ("TIME_id", "VALUE") FROM stdin WITH DELIMITER '|';
1 | 93.2
2 | 96.0
3 | 95.2
4 | 94.2
\.
-- ARIMA train
-------------------------------------------------------------------------
-- all parameters except optimizer_params
drop table if exists arima_train_result_table_214712398172490837;
drop table if exists arima_train_result_table_214712398172490837_summary;
drop table if exists arima_train_result_table_214712398172490837_residual;
select arima_train('"ARIMA_beer"', 'arima_train_result_table_214712398172490837',
'"TIME_id"', '"VALUE"', NULL, False, ARRAY[1, 1, 1]);
-------------------------------------------------------------------------
drop table if exists arima_forecast_result_table_214712398172490837;
select arima_forecast('arima_train_result_table_214712398172490837',
'arima_forecast_result_table_214712398172490837',
1);