0.5.4 • Published 10 months ago
@bsull/augurs v0.5.4
augurs: time series forecasting
Javascript bindings to the augurs
time series framework.
Usage
- Add the package to your dependencies:
"dependencies": {
"@bsull/augurs": "^0.4.1"
}
- Import the default function and initialize once somewhere in your application:
import init from "@bsull/augurs";
init().then(() => console.log("Initialized augurs"));
- 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);
Troubleshooting
Webpack
Some of the dependencies of augurs
require a few changes to the Webpack configuration to work correctly.
Adding this to your webpack.config.js
should be enough:
{
experiments: {
// Required to load WASM modules.
asyncWebAssembly: true,
},
module: {
rules: [
{
test: /\@bsull\/augurs\/.*\.js$/,
resolve: {
fullySpecified: false
}
},
]
},
}
0.5.4-dev.0
10 months ago
0.5.4
10 months ago
0.5.3
10 months ago
0.5.2
10 months ago
0.5.1
10 months ago
0.5.0
11 months ago
0.4.1
11 months ago
0.4.0
11 months ago
0.4.2
11 months ago
0.4.0-alpha.0
12 months ago
0.3.1-alpha.0
12 months ago
0.3.1-alpha.1
12 months ago
0.3.0
1 year ago
0.2.0
1 year ago
0.3.2-alpha.0
1 year ago
0.3.1
1 year ago
0.3.0-alpha.0
1 year ago
0.3.0-alpha.1
1 year ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago