All Projects → zemlyansky → arima

zemlyansky / arima

Licence: other
ARIMA, SARIMA, SARIMAX and AutoARIMA models for time series analysis and forecasting in the browser and Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language
c
50402 projects - #5 most used programming language
Makefile
30231 projects
HTML
75241 projects

Projects that are alternatives of or similar to arima

Neural prophet
NeuralProphet - A simple forecasting model based on Neural Networks in PyTorch
Stars: ✭ 1,125 (+3529.03%)
Mutual labels:  timeseries, prediction, forecasting
Tcdf
Temporal Causal Discovery Framework (PyTorch): discovering causal relationships between time series
Stars: ✭ 217 (+600%)
Mutual labels:  timeseries, prediction, forecasting
Machine-Learning
Machine Learning Projects
Stars: ✭ 19 (-38.71%)
Mutual labels:  arima, sarimax, sarima
ts-forecasting-ensemble
CentOS based Docker container for Time Series Analysis and Modeling.
Stars: ✭ 19 (-38.71%)
Mutual labels:  forecasting, arima, sarimax
Sweep
Extending broom for time series forecasting
Stars: ✭ 143 (+361.29%)
Mutual labels:  timeseries, prediction
Tensorflow Lstm Sin
TensorFlow 1.3 experiment with LSTM (and GRU) RNNs for sine prediction
Stars: ✭ 52 (+67.74%)
Mutual labels:  timeseries, prediction
Java Timeseries
Time series analysis in Java
Stars: ✭ 155 (+400%)
Mutual labels:  timeseries, forecasting
forecastVeg
A Machine Learning Approach to Forecasting Remotely Sensed Vegetation Health in Python
Stars: ✭ 44 (+41.94%)
Mutual labels:  prediction, forecasting
timemachines
Predict time-series with one line of code.
Stars: ✭ 342 (+1003.23%)
Mutual labels:  timeseries, prediction
Deep XF
Package towards building Explainable Forecasting and Nowcasting Models with State-of-the-art Deep Neural Networks and Dynamic Factor Model on Time Series data sets with single line of code. Also, provides utilify facility for time-series signal similarities matching, and removing noise from timeseries signals.
Stars: ✭ 83 (+167.74%)
Mutual labels:  timeseries, forecasting
ARFIMA.jl
Simulate stochastic timeseries that follow ARFIMA, ARMA, ARIMA, AR, etc. processes
Stars: ✭ 44 (+41.94%)
Mutual labels:  timeseries, arima
Timetk
A toolkit for working with time series in R
Stars: ✭ 371 (+1096.77%)
Mutual labels:  timeseries, forecasting
Tsstudio
Tools for time series analysis and forecasting
Stars: ✭ 283 (+812.9%)
Mutual labels:  timeseries, forecasting
Ergo
A Python library for integrating model-based and judgmental forecasting
Stars: ✭ 82 (+164.52%)
Mutual labels:  prediction, forecasting
verif
Software for verifying weather forecasts
Stars: ✭ 70 (+125.81%)
Mutual labels:  prediction, forecasting
modeltime.ensemble
Time Series Ensemble Forecasting
Stars: ✭ 65 (+109.68%)
Mutual labels:  timeseries, forecasting
foot
foot是一个集足球数据采集器,简单分析的项目.AI足球球探为程序全自动处理,全程无人为参与干预足球分析足球预测程序.程序根据各大指数多维度数据,结合作者多年足球分析经验,精雕细琢,集天地之灵气,汲日月之精华,历时七七四十九天,经Bug九九八十一个,编码而成.有兴趣的朋友,可以关注一下公众号AI球探(微信号ai00268).
Stars: ✭ 96 (+209.68%)
Mutual labels:  prediction, forecasting
ctsa
A Univariate Time Series Analysis and ARIMA Modeling Package in ANSI C. Updated with SARIMAX and Auto ARIMA.
Stars: ✭ 38 (+22.58%)
Mutual labels:  arima, sarimax
Forecasting Mutual Funds
This Project gives you an overall idea for Forecasting Mutual Funds
Stars: ✭ 15 (-51.61%)
Mutual labels:  prediction, forecasting
Sales-Prediction
In depth analysis and forecasting of product sales based on the items, stores, transaction and other dependent variables like holidays and oil prices.
Stars: ✭ 56 (+80.65%)
Mutual labels:  prediction, forecasting

ARIMA. Time-series forecasting in browsers and Node.js

Emscripten port of the native C package ctsa for time series analysis and forecasting

This CommonJS module includes:

  • ARIMA (Autoregressive Integrated Moving Average)
  • SARIMA (Seasonal ARIMA)
  • SARIMAX (Seasonal ARIMA with exogenous variables)
  • AutoARIMA (ARIMA with automatic parameters)

Installation of the ARIMA module

npm install arima

Initialization

const ARIMA = require('arima')
const arima = new ARIMA(options)

Where the options object can include:

  • auto - automatic ARIMA (default: false)
  • p, d, q params for ARIMA (default: p: 1, d: 0, q: 1)
  • P, D, Q, s seasonal params (default: 0s). Setting them to non-zero values makes the ARIMA model seasonal
  • method - ARIMA method (default: 0, described below)
  • optimizer - optimization method (default: 6, described below)
  • transpose - transpose exogenous array when fitting SARIMAX (default: false)
  • verbose - verbose output (default: true)

Also for AutoARIMA only:

  • approximation - approximation method (default: 1),
  • search - search method (default: 1)
  • p, d, q, P, D, Q params define max values for a search algorithm

Train/Predict

ARIMA, SARIMA, AutoARIMA:

arima.train(ts) // Or arima.fit(ts)
arima.predict(10) // Predict 10 steps forward

SARIMAX:

arima.train(ts, exog) // or arima.fit(ts, exog)
arima.predict(10, exognew) // Predict 10 steps forwars using new exogenous variables

Running in browsers

As described in the issue #10 Chrome prevents compilation of wasm modules >4kB. There are two ways to overcome this:

  • Load arima in a Web Worker
  • Use the arima/async module

Example of async loading:

const ARIMAPromise = require('arima/async')

ARIMAPromise.then(ARIMA => {
  const ts = Array(10).fill(0).map((_, i) => i + Math.random() / 5)
  const arima = new ARIMA({ p: 2, d: 1, q: 2, P: 0, D: 0, Q: 0, S: 0, verbose: false }).train(ts)
  const [pred, errors] = arima.predict(10)
})

All following examples use synchronous compilation (Node.js, Firefox). They will not work in Chrome.

Example: ARIMA

// Load package
const ARIMA = require('arima')

// Synthesize timeseries
const ts = Array(24).fill(0).map((_, i) => i + Math.random() / 5)

// Init arima and start training
const arima = new ARIMA({
  p: 2,
  d: 1,
  q: 2,
  verbose: false
}).train(ts)

// Predict next 12 values
const [pred, errors] = arima.predict(12)

Example: SARIMA

// Init sarima and start training
const sarima = new ARIMA({
  p: 2,
  d: 1,
  q: 2,
  P: 1,
  D: 0,
  Q: 1,
  s: 12,
  verbose: false
}).train(ts)

// Predict next 12 values
const [pred, errors] = sarima.predict(12)

Example: SARIMAX

// Generate timeseries using exogenous variables
const f = (a, b) => a * 2 + b * 5
const exog = Array(30).fill(0).map(x => [Math.random(), Math.random()])
const exognew = Array(10).fill(0).map(x => [Math.random(), Math.random()])
const ts = exog.map(x => f(x[0], x[1]) + Math.random() / 5)

// Init and fit sarimax
const sarimax = new ARIMA({
  p: 1,
  d: 0,
  q: 1,
  transpose: true,
  verbose: false
}).fit(ts, exog)

// Predict next 12 values using exognew
const [pred, errors] = sarimax.predict(12, exognew)

Example: AutoARIMA

const autoarima = new ARIMA({ auto: true }).fit(ts)
const [pred, errors] = autoarima.predict(12)

ARIMA Method (method)

0 - Exact Maximum Likelihood Method (Default)
1 - Conditional Method - Sum Of Squares
2 - Box-Jenkins Method

Optimization Method (optimizer)

Method 0 - Nelder-Mead
Method 1 - Newton Line Search
Method 2 - Newton Trust Region - Hook Step
Method 3 - Newton Trust Region - Double Dog-Leg
Method 4 - Conjugate Gradient
Method 5 - BFGS
Method 6 - Limited Memory BFGS (Default)
Method 7 - BFGS Using More Thuente Method

Old functional API (still works)

The old interface of the arima package was only one function that took 3 arguments:

  • a 1D array with observations over time
  • a number of time steps to predict
  • a javascript object with ARIMA parameters p, d, q and other options

It returned two vectors - predictions and mean square errors.

const arima = require('arima')
const [pred, errors] = arima(ts, 20, {
  method: 0, // ARIMA method (Default: 0)
  optimizer: 6, // Optimization method (Default: 6)
  p: 1, // Number of Autoregressive coefficients
  d: 0, // Number of times the series needs to be differenced
  q: 1, // Number of Moving Average Coefficients
  verbose: true // Output model analysis to console
})

Web demo

You can try ARIMA online in the StatSim Forecast app: https://statsim.com/forecast/. It uses the arima package under the hood and applies random search to find the best values of p, d and q.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].