@bsull/augurs
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

augurs: time series forecasting

Javascript bindings to the augurs time series framework.

Usage

  1. Add the package to your dependencies:
"dependencies": {
    "@bsull/augurs": "^0.1.0"
}
  1. Import the default function and initialize once somewhere in your application:
import init from "@bsull/augurs";
init().then(() => console.log("Initialized augurs"));
  1. Use the various ETS, changepoint, outlier, or seasonality detection algorithms. For example:
import { ets, seasonalities } from "@bsull/augurs"

const y = new Float64Array([1.0, 2.0, 3.0, 1.0, 2.0, 3.0]); // your time series data
const seasonLengths = seasonalities(y);
const model = ets(seasonLengths, { impute: true });
model.fit(y);

const predictionInterval = 0.95;
// Generate in-sample predictions for the training set.
const { point, lower, upper } = model.predictInSample(predictionInterval);
// Generate out-of-sample forecasts.
const { point: futurePoint, lower: futureLower, upper: futureUpper } = model.predict(10, predictionInterval);

Package Sidebar

Install

npm i @bsull/augurs

Weekly Downloads

27

Version

0.2.0

License

MIT OR Apache-2.0

Unpacked Size

462 kB

Total Files

7

Last publish

Collaborators

  • bsull