Repository navigation
v0.6.0
Forecasts in the browser, regressors forecast by their own models, and mean absolute scaled
error. Existing code works as before; only a damaged calendar file reports a different error
reason.
Added
- Browser and bundler support. The same package and import now work in browsers. Vite (build
and dev server), webpack and Rspack need no configuration; esbuild needs the engine binary
copied next to the bundle. Browsers download the WebAssembly engine once per page, and each
country holiday calendar is its own chunk, loaded the first time it's used. Tested in Chromium,
Firefox and WebKit, which give exactly the same forecasts as Node.js. Node.js still loads the
engine synchronously, soEffect.runSynckeeps working there. See
Browsers and bundlers. - Regressors forecast by their own models. Set
predictor: true, or options, on a regressor,
like Python'sregressor_predictor, andfitfits a model to that regressor's history.
predictuses its forecast in every row after the history, so future rows need no value for
it. Intervals include each regressor model's own uncertainty, as in Python, and saved models
keep these models. When one of them fails,FittingErrorandPredictionErrorname it in a
new optionalregressorfield. See
Forecasting a regressor. - Mean absolute scaled error (MASE).
scaledErrorMetricdivides each forecast's error by a
naive rule's average error on the rows its round trained on, repeating either the previous row
or the value a set time earlier. It's a metric definition, soperformanceMetrics,
comparePerformanceandsearchModelsaccept it. Rounds it can't scale fail with the new
MetricScaleError. Python Prophet has no scaled metrics. See
Scaled errors. - New spans for regressor models and
scaledErrorMetric. See the
tracing guide.
Changed
- Country holiday calendars are loaded as JSON modules, once per process, instead of being read
from disk on every fit. Each use still checks the file's format version and contents. The
byte-count and SHA-256 checks against the bundled catalog are gone, and a calendar file that
isn't valid JSON now fails withsnapshot-unavailableinstead ofcorrupt-snapshot.
Verification against Python Prophet
- New fixtures check regressor models' forecasts against
regressor_predictor, and that
their draws widen future intervals as much as Python's do. - New benchmarks for regressors forecast by their own models, on flat and linear growth,
checked against Python Prophet for forecasts, uncertainty ranges and cross-validation. - Twelve-fold cross-validation and model search benchmarks, one for each growth. Python
Prophet is timed sequentially and withcross_validation'sparallel="threads"and
parallel="processes", which must give the same forecasts and scores as running sequentially.
Effect Prophet still runs folds one at a time, and is faster than either parallel mode. - MASE benchmarks on flat and logistic growth. Python Prophet has no MASE, so the Python side
registers it withregister_performance_metric. Each fold's scale must match, and overall
scores may differ only as much as the two libraries' forecasts do.
Full Changelog: v0.5.1...v0.6.0