@sipemu/anofox-forecast 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@
4
4
  export class ADIDAForecaster {
5
5
  free(): void;
6
6
  [Symbol.dispose](): void;
7
+ predictWithIntervals(horizon: number, level: number): Forecast;
7
8
  fit(series: TimeSeries): void;
8
9
  constructor();
9
10
  predict(horizon: number): Forecast;
@@ -61,6 +62,134 @@ export class AutoETSForecaster {
61
62
  readonly name: string;
62
63
  }
63
64
 
65
+ export class AutoEnsembleForecaster {
66
+ free(): void;
67
+ [Symbol.dispose](): void;
68
+ /**
69
+ * Get all candidate scores as a JSON object.
70
+ *
71
+ * Returns an array of `{ name, score }` objects sorted by score (ascending).
72
+ */
73
+ allScores(): any;
74
+ /**
75
+ * Get the number of models in the ensemble.
76
+ */
77
+ modelCount(): number;
78
+ /**
79
+ * Create with custom configuration.
80
+ *
81
+ * @param topK - Number of top models to include in ensemble (default: 3)
82
+ * @param seasonalPeriod - Seasonal period (0 or undefined for non-seasonal)
83
+ */
84
+ static withConfig(top_k?: number | null, seasonal_period?: number | null): AutoEnsembleForecaster;
85
+ /**
86
+ * Predict with prediction intervals.
87
+ *
88
+ * @param horizon - Number of steps to forecast
89
+ * @param level - Confidence level (e.g., 0.95 for 95% intervals)
90
+ * @returns Forecast with combined predictions and intervals
91
+ */
92
+ predictWithIntervals(horizon: number, level: number): Forecast;
93
+ /**
94
+ * Fit the ensemble to a time series.
95
+ *
96
+ * Fits all candidate models, selects the top-K, and builds the ensemble.
97
+ *
98
+ * @param series - TimeSeries to fit
99
+ */
100
+ fit(series: TimeSeries): void;
101
+ /**
102
+ * Create a new AutoEnsembleForecaster with default configuration.
103
+ *
104
+ * By default, uses top-3 models with weighted MSE combination.
105
+ */
106
+ constructor();
107
+ /**
108
+ * Predict future values.
109
+ *
110
+ * @param horizon - Number of steps to forecast
111
+ * @returns Forecast with combined point predictions
112
+ */
113
+ predict(horizon: number): Forecast;
114
+ /**
115
+ * Create a seasonal AutoEnsembleForecaster.
116
+ *
117
+ * @param period - Seasonal period
118
+ */
119
+ static seasonal(period: number): AutoEnsembleForecaster;
120
+ /**
121
+ * Get the model name.
122
+ */
123
+ readonly name: string;
124
+ }
125
+
126
+ export class AutoForecaster {
127
+ free(): void;
128
+ [Symbol.dispose](): void;
129
+ /**
130
+ * Get all candidate scores as a JSON object.
131
+ *
132
+ * Returns an array of `{ name, score }` objects sorted by score (ascending).
133
+ */
134
+ allScores(): any;
135
+ /**
136
+ * Create an AutoForecaster with custom configuration.
137
+ *
138
+ * @param seasonalPeriod - Seasonal period (0 or undefined for non-seasonal)
139
+ * @param includeArima - Include AutoARIMA candidate (default: true)
140
+ * @param includeEts - Include AutoETS candidate (default: true)
141
+ * @param includeTheta - Include AutoTheta candidate (default: true)
142
+ * @param useCrossValidation - Use cross-validation instead of in-sample MSE (default: false)
143
+ */
144
+ static withConfig(seasonal_period?: number | null, include_arima?: boolean | null, include_ets?: boolean | null, include_theta?: boolean | null, use_cross_validation?: boolean | null): AutoForecaster;
145
+ /**
146
+ * Get the name of the selected model.
147
+ *
148
+ * @returns Name of the best model, or undefined if not yet fitted
149
+ */
150
+ selectedModelName(): string | undefined;
151
+ /**
152
+ * Predict with prediction intervals.
153
+ *
154
+ * @param horizon - Number of steps to forecast
155
+ * @param level - Confidence level (e.g., 0.95 for 95% intervals)
156
+ * @returns Forecast with point predictions and intervals
157
+ */
158
+ predictWithIntervals(horizon: number, level: number): Forecast;
159
+ /**
160
+ * Fit the model to a time series.
161
+ *
162
+ * Fits all candidate models and selects the best one.
163
+ *
164
+ * @param series - TimeSeries to fit
165
+ */
166
+ fit(series: TimeSeries): void;
167
+ /**
168
+ * Create a new AutoForecaster with default configuration.
169
+ *
170
+ * By default, includes AutoARIMA, AutoETS, and AutoTheta candidates
171
+ * and uses in-sample MSE for model selection.
172
+ */
173
+ constructor();
174
+ /**
175
+ * Predict future values.
176
+ *
177
+ * @param horizon - Number of steps to forecast
178
+ * @returns Forecast with point predictions
179
+ */
180
+ predict(horizon: number): Forecast;
181
+ /**
182
+ * Create a seasonal AutoForecaster.
183
+ *
184
+ * @param period - Seasonal period (e.g., 12 for monthly data with yearly seasonality)
185
+ */
186
+ static seasonal(period: number): AutoForecaster;
187
+ /**
188
+ * Get the model name.
189
+ */
190
+ readonly name: string;
191
+ }
192
+
64
193
  export class AutoTBATSForecaster {
65
194
  free(): void;
66
195
  [Symbol.dispose](): void;
@@ -83,9 +212,98 @@ export class AutoThetaForecaster {
83
212
  readonly name: string;
84
213
  }
85
214
 
215
+ export class CalendarAnnotations {
216
+ free(): void;
217
+ [Symbol.dispose](): void;
218
+ /**
219
+ * Check if a specific date is a holiday.
220
+ *
221
+ * @param timestamp_ms - Date to check as milliseconds since Unix epoch
222
+ * @returns true if the date matches any registered holiday
223
+ */
224
+ isHoliday(timestamp_ms: number): boolean;
225
+ /**
226
+ * Add a single holiday date.
227
+ *
228
+ * @param timestamp_ms - Holiday date as milliseconds since Unix epoch
229
+ */
230
+ addHoliday(timestamp_ms: number): void;
231
+ /**
232
+ * Get holiday dates as milliseconds since Unix epoch.
233
+ */
234
+ getHolidays(): Float64Array;
235
+ /**
236
+ * Set multiple holiday dates at once (replaces any existing holidays).
237
+ *
238
+ * @param timestamps_ms - Array of holiday dates as milliseconds since Unix epoch
239
+ */
240
+ setHolidays(timestamps_ms: Float64Array): void;
241
+ /**
242
+ * Add a named regressor with values aligned to the time series.
243
+ *
244
+ * The values array must have the same length as the time series this
245
+ * will be attached to. Common examples: promotional flags (0/1),
246
+ * temperature, price changes, etc.
247
+ *
248
+ * @param name - Name of the regressor (e.g., "promo", "temperature")
249
+ * @param values - Array of numeric values, one per time step
250
+ */
251
+ addRegressor(name: string, values: Float64Array): void;
252
+ /**
253
+ * Get values for a named regressor.
254
+ *
255
+ * @param name - Regressor name
256
+ * @returns Array of values, or undefined if the regressor does not exist
257
+ */
258
+ getRegressor(name: string): Float64Array | undefined;
259
+ /**
260
+ * Get the number of holidays.
261
+ */
262
+ holidayCount(): number;
263
+ /**
264
+ * Check whether any regressors have been added.
265
+ */
266
+ hasRegressors(): boolean;
267
+ /**
268
+ * Check if a specific date is a business day (not weekend, not holiday).
269
+ *
270
+ * @param timestamp_ms - Date to check as milliseconds since Unix epoch
271
+ * @returns true if the date is a weekday and not a holiday
272
+ */
273
+ isBusinessDay(timestamp_ms: number): boolean;
274
+ /**
275
+ * Get the number of named regressors.
276
+ */
277
+ regressorCount(): number;
278
+ /**
279
+ * Get the names of all registered regressors.
280
+ */
281
+ regressorNames(): any;
282
+ /**
283
+ * Create an empty CalendarAnnotations instance.
284
+ */
285
+ constructor();
286
+ /**
287
+ * Serialize the calendar annotations to a JSON string.
288
+ *
289
+ * Useful for persisting or transferring annotations between contexts.
290
+ *
291
+ * @returns JSON string with `{ holidays: number[], regressors: { [name]: number[] } }`
292
+ */
293
+ toJSON(): string;
294
+ /**
295
+ * Deserialize calendar annotations from a JSON string.
296
+ *
297
+ * @param json - JSON string produced by `toJSON()`
298
+ * @returns A new CalendarAnnotations instance
299
+ */
300
+ static fromJSON(json: string): CalendarAnnotations;
301
+ }
302
+
86
303
  export class CrostonForecaster {
87
304
  free(): void;
88
305
  [Symbol.dispose](): void;
306
+ predictWithIntervals(horizon: number, level: number): Forecast;
89
307
  fit(series: TimeSeries): void;
90
308
  constructor();
91
309
  predict(horizon: number): Forecast;
@@ -165,6 +383,65 @@ export class ETSForecaster {
165
383
  readonly name: string;
166
384
  }
167
385
 
386
+ export class EnsembleForecaster {
387
+ free(): void;
388
+ [Symbol.dispose](): void;
389
+ /**
390
+ * Set the combination method to median.
391
+ */
392
+ setMedian(): void;
393
+ /**
394
+ * Get the number of models in the ensemble.
395
+ */
396
+ modelCount(): number;
397
+ /**
398
+ * Set custom combination weights.
399
+ *
400
+ * Weights are normalized to sum to 1. Length must match number of models.
401
+ *
402
+ * @param weights - Array of combination weights
403
+ */
404
+ setWeights(weights: Float64Array): void;
405
+ /**
406
+ * Set the combination method to weighted MSE.
407
+ */
408
+ setWeightedMse(): void;
409
+ /**
410
+ * Predict with prediction intervals.
411
+ *
412
+ * @param horizon - Number of steps to forecast
413
+ * @param level - Confidence level (e.g., 0.95 for 95% intervals)
414
+ * @returns Forecast with combined predictions and intervals
415
+ */
416
+ predictWithIntervals(horizon: number, level: number): Forecast;
417
+ /**
418
+ * Fit all models in the ensemble.
419
+ *
420
+ * @param series - TimeSeries to fit
421
+ */
422
+ fit(series: TimeSeries): void;
423
+ /**
424
+ * Create an ensemble from an array of model name strings.
425
+ *
426
+ * Supported names: "naive", "mean", "rwdrift", "ses", "holt",
427
+ * "autoarima", "autoets", "autotheta", "sma5", "wa10", etc.
428
+ *
429
+ * @param modelNames - Array of model name strings
430
+ */
431
+ constructor(model_names: string[]);
432
+ /**
433
+ * Predict future values using the combined ensemble.
434
+ *
435
+ * @param horizon - Number of steps to forecast
436
+ * @returns Forecast with combined point predictions
437
+ */
438
+ predict(horizon: number): Forecast;
439
+ /**
440
+ * Get the model name.
441
+ */
442
+ readonly name: string;
443
+ }
444
+
168
445
  export class Forecast {
169
446
  private constructor();
170
447
  free(): void;
@@ -202,6 +479,7 @@ export class Forecast {
202
479
  export class GARCHForecaster {
203
480
  free(): void;
204
481
  [Symbol.dispose](): void;
482
+ predictWithIntervals(horizon: number, level: number): Forecast;
205
483
  fit(series: TimeSeries): void;
206
484
  /**
207
485
  * @param p - GARCH order (lagged variance terms)
@@ -215,6 +493,7 @@ export class GARCHForecaster {
215
493
  export class HoltForecaster {
216
494
  free(): void;
217
495
  [Symbol.dispose](): void;
496
+ predictWithIntervals(horizon: number, level: number): Forecast;
218
497
  fit(series: TimeSeries): void;
219
498
  /**
220
499
  * @param alpha - Level smoothing parameter (0 < alpha <= 1)
@@ -232,6 +511,7 @@ export class HoltWintersForecaster {
232
511
  * Create with multiplicative seasonality.
233
512
  */
234
513
  static multiplicative(alpha: number, beta: number, gamma: number, period: number): HoltWintersForecaster;
514
+ predictWithIntervals(horizon: number, level: number): Forecast;
235
515
  fit(series: TimeSeries): void;
236
516
  /**
237
517
  * Create with additive seasonality.
@@ -254,15 +534,308 @@ export class HoltWintersForecaster {
254
534
  export class IMAPAForecaster {
255
535
  free(): void;
256
536
  [Symbol.dispose](): void;
537
+ predictWithIntervals(horizon: number, level: number): Forecast;
257
538
  fit(series: TimeSeries): void;
258
539
  constructor();
259
540
  predict(horizon: number): Forecast;
260
541
  readonly name: string;
261
542
  }
262
543
 
544
+ export class JsBacktestConfig {
545
+ free(): void;
546
+ [Symbol.dispose](): void;
547
+ /**
548
+ * Set the initial training window size.
549
+ */
550
+ initialWindow(size: number): JsBacktestConfig;
551
+ /**
552
+ * Create a new backtest configuration with default settings.
553
+ *
554
+ * Defaults: initial_window=50, step=1, horizon=1, expanding=true.
555
+ */
556
+ constructor();
557
+ /**
558
+ * Set the step size between folds.
559
+ */
560
+ step(step: number): JsBacktestConfig;
561
+ /**
562
+ * Set the forecast horizon.
563
+ */
564
+ horizon(horizon: number): JsBacktestConfig;
565
+ /**
566
+ * Set whether to use expanding (true) or rolling (false) window.
567
+ */
568
+ expanding(expanding: boolean): JsBacktestConfig;
569
+ }
570
+
571
+ export class JsBacktestResult {
572
+ private constructor();
573
+ free(): void;
574
+ [Symbol.dispose](): void;
575
+ /**
576
+ * Get average interval width across all folds.
577
+ */
578
+ intervalWidths(): number;
579
+ /**
580
+ * Get calibration error (absolute deviation from target coverage).
581
+ */
582
+ calibrationError(target_coverage: number): number;
583
+ /**
584
+ * Get the number of backtest folds.
585
+ */
586
+ numFolds(): number;
587
+ /**
588
+ * Get overall coverage across all folds.
589
+ */
590
+ readonly coverage: number;
591
+ }
592
+
593
+ export class JsConformalPredictor {
594
+ free(): void;
595
+ [Symbol.dispose](): void;
596
+ /**
597
+ * Create a conformal predictor with the Jackknife+ method.
598
+ *
599
+ * @param coverage - Target coverage level in (0, 1)
600
+ */
601
+ static jackknifePlus(coverage: number): JsConformalPredictor;
602
+ /**
603
+ * Generate prediction intervals for new point forecasts.
604
+ *
605
+ * @param result - A fitted JsConformalResult from calibrate()
606
+ * @param pointForecasts - New point forecast values
607
+ */
608
+ predictIntervals(result: JsConformalResult, point_forecasts: Float64Array): JsPredictionIntervals;
609
+ /**
610
+ * Create a split conformal predictor.
611
+ *
612
+ * @param coverage - Target coverage level in (0, 1), e.g. 0.90
613
+ */
614
+ constructor(coverage: number);
615
+ /**
616
+ * Calibrate (fit) the predictor on historical forecasts and actuals.
617
+ *
618
+ * @param forecasts - Historical point forecast values
619
+ * @param actuals - Corresponding actual observed values
620
+ */
621
+ calibrate(forecasts: Float64Array, actuals: Float64Array): JsConformalResult;
622
+ /**
623
+ * Create a conformal predictor with the cross-validation method.
624
+ *
625
+ * @param coverage - Target coverage level in (0, 1)
626
+ * @param nFolds - Number of cross-validation folds
627
+ */
628
+ static crossVal(coverage: number, n_folds: number): JsConformalPredictor;
629
+ }
630
+
631
+ export class JsConformalResult {
632
+ private constructor();
633
+ free(): void;
634
+ [Symbol.dispose](): void;
635
+ /**
636
+ * Get the quantile value (interval half-width).
637
+ */
638
+ quantileValue(): number;
639
+ /**
640
+ * Get the nonconformity scores.
641
+ */
642
+ scores(): Float64Array;
643
+ /**
644
+ * Get the coverage level.
645
+ */
646
+ readonly coverage: number;
647
+ }
648
+
649
+ export class JsHistoricalSimResult {
650
+ private constructor();
651
+ free(): void;
652
+ [Symbol.dispose](): void;
653
+ /**
654
+ * Get the quantile values.
655
+ */
656
+ quantileValues(): Float64Array;
657
+ /**
658
+ * Get the sorted errors.
659
+ */
660
+ errors(): Float64Array;
661
+ }
662
+
663
+ export class JsHistoricalSimulator {
664
+ free(): void;
665
+ [Symbol.dispose](): void;
666
+ /**
667
+ * Create a simulator with a rolling window.
668
+ *
669
+ * @param quantiles - Sorted quantile levels in (0,1)
670
+ * @param window - Number of recent observations to use
671
+ */
672
+ static withWindow(quantiles: Float64Array, window: number): JsHistoricalSimulator;
673
+ /**
674
+ * Generate prediction intervals for new point forecasts.
675
+ *
676
+ * @param result - A fitted JsHistoricalSimResult from simulate()
677
+ * @param pointForecasts - New point forecast values
678
+ */
679
+ predictIntervals(result: JsHistoricalSimResult, point_forecasts: Float64Array): JsPredictionIntervals;
680
+ /**
681
+ * Create a new historical simulator.
682
+ *
683
+ * @param quantiles - Sorted quantile levels in (0,1), e.g. [0.1, 0.5, 0.9]
684
+ */
685
+ constructor(quantiles: Float64Array);
686
+ /**
687
+ * Fit the simulator on historical forecasts and actuals.
688
+ *
689
+ * @param forecasts - Historical point forecast values
690
+ * @param actuals - Corresponding actual observed values
691
+ */
692
+ simulate(forecasts: Float64Array, actuals: Float64Array): JsHistoricalSimResult;
693
+ }
694
+
695
+ export class JsNormalPredictor {
696
+ free(): void;
697
+ [Symbol.dispose](): void;
698
+ /**
699
+ * Generate prediction intervals for new point forecasts.
700
+ *
701
+ * Returns intervals using the first and last quantile as bounds.
702
+ *
703
+ * @param result - A fitted JsNormalResult from fit()
704
+ * @param pointForecasts - New point forecast values
705
+ */
706
+ predictIntervals(result: JsNormalResult, point_forecasts: Float64Array): JsPredictionIntervals;
707
+ /**
708
+ * Fit the predictor on historical forecasts and actuals.
709
+ *
710
+ * @param forecasts - Historical point forecast values
711
+ * @param actuals - Corresponding actual observed values
712
+ */
713
+ fit(forecasts: Float64Array, actuals: Float64Array): JsNormalResult;
714
+ /**
715
+ * Create a new normal predictor.
716
+ *
717
+ * @param quantiles - Sorted quantile levels in (0,1), e.g. [0.1, 0.5, 0.9]
718
+ */
719
+ constructor(quantiles: Float64Array);
720
+ }
721
+
722
+ export class JsNormalResult {
723
+ private constructor();
724
+ free(): void;
725
+ [Symbol.dispose](): void;
726
+ /**
727
+ * Get the standard deviation of errors.
728
+ */
729
+ stdDev(): number;
730
+ /**
731
+ * Get the mean error (bias).
732
+ */
733
+ readonly mean: number;
734
+ }
735
+
736
+ export class JsPointForecasts {
737
+ free(): void;
738
+ [Symbol.dispose](): void;
739
+ /**
740
+ * Create point forecasts from an array of values.
741
+ */
742
+ constructor(values: Float64Array);
743
+ /**
744
+ * Check if empty.
745
+ */
746
+ isEmpty(): boolean;
747
+ /**
748
+ * Get the number of forecast points.
749
+ */
750
+ readonly length: number;
751
+ /**
752
+ * Get the forecast values.
753
+ */
754
+ readonly values: Float64Array;
755
+ }
756
+
757
+ export class JsPostProcessor {
758
+ private constructor();
759
+ free(): void;
760
+ [Symbol.dispose](): void;
761
+ /**
762
+ * Create a historical simulation postprocessor.
763
+ *
764
+ * @param quantiles - Sorted quantile levels in (0,1)
765
+ */
766
+ static historicalSim(quantiles: Float64Array): JsPostProcessor;
767
+ /**
768
+ * Generate prediction intervals from a trained model.
769
+ *
770
+ * @param trained - A JsTrainedModel from train()
771
+ * @param forecasts - New point forecasts
772
+ */
773
+ predictIntervals(trained: JsTrainedModel, forecasts: JsPointForecasts): JsPredictionIntervals;
774
+ /**
775
+ * Train the postprocessor on historical data.
776
+ *
777
+ * @param forecasts - JsPointForecasts with historical predictions
778
+ * @param actuals - Corresponding actual observed values
779
+ */
780
+ train(forecasts: JsPointForecasts, actuals: Float64Array): JsTrainedModel;
781
+ /**
782
+ * Create a normal prediction postprocessor.
783
+ *
784
+ * @param quantiles - Sorted quantile levels in (0,1)
785
+ */
786
+ static normal(quantiles: Float64Array): JsPostProcessor;
787
+ /**
788
+ * Create a conformal prediction postprocessor.
789
+ *
790
+ * @param coverage - Target coverage level in (0, 1), e.g. 0.90
791
+ */
792
+ static conformal(coverage: number): JsPostProcessor;
793
+ }
794
+
795
+ export class JsPredictionIntervals {
796
+ private constructor();
797
+ free(): void;
798
+ [Symbol.dispose](): void;
799
+ /**
800
+ * Compute empirical coverage given actual values.
801
+ */
802
+ empiricalCoverage(actuals: Float64Array): number | undefined;
803
+ /**
804
+ * Get the interval widths.
805
+ */
806
+ widths(): Float64Array;
807
+ /**
808
+ * Get the interval midpoints.
809
+ */
810
+ midpoints(): Float64Array;
811
+ /**
812
+ * Get the lower bounds.
813
+ */
814
+ readonly lower: Float64Array;
815
+ /**
816
+ * Get the upper bounds.
817
+ */
818
+ readonly upper: Float64Array;
819
+ /**
820
+ * Get the number of intervals.
821
+ */
822
+ readonly length: number;
823
+ /**
824
+ * Get the coverage level (e.g. 0.90).
825
+ */
826
+ readonly coverage: number;
827
+ }
828
+
829
+ export class JsTrainedModel {
830
+ private constructor();
831
+ free(): void;
832
+ [Symbol.dispose](): void;
833
+ }
834
+
263
835
  export class MFLESForecaster {
264
836
  free(): void;
265
837
  [Symbol.dispose](): void;
838
+ predictWithIntervals(horizon: number, level: number): Forecast;
266
839
  fit(series: TimeSeries): void;
267
840
  /**
268
841
  * @param seasonal_periods - Array of seasonal periods
@@ -346,6 +919,7 @@ export class SARIMAForecaster {
346
919
  export class SESForecaster {
347
920
  free(): void;
348
921
  [Symbol.dispose](): void;
922
+ predictWithIntervals(horizon: number, level: number): Forecast;
349
923
  fit(series: TimeSeries): void;
350
924
  /**
351
925
  * @param alpha - Smoothing parameter (0 < alpha <= 1)
@@ -408,18 +982,58 @@ export class SeasonalWindowAverageForecaster {
408
982
  export class TBATSForecaster {
409
983
  free(): void;
410
984
  [Symbol.dispose](): void;
985
+ /**
986
+ * Enable Box-Cox transformation.
987
+ *
988
+ * @param lambda - Box-Cox parameter (0 = log, 1 = identity)
989
+ */
990
+ setBoxCox(lambda: number): void;
991
+ /**
992
+ * Set Fourier K (number of harmonics) for each seasonal period.
993
+ *
994
+ * @param k - Array of K values (one per seasonal period)
995
+ */
996
+ setFourierK(k: Uint32Array): void;
997
+ /**
998
+ * Enable damped trend.
999
+ *
1000
+ * @param phi - Damping parameter (typically 0.8-0.99)
1001
+ */
1002
+ setDampedTrend(phi: number): void;
1003
+ /**
1004
+ * Create a TBATSForecaster with specified seasonal periods.
1005
+ *
1006
+ * @param periods - Array of seasonal periods
1007
+ * @returns A new TBATSForecaster
1008
+ */
1009
+ static withSeasonalPeriods(periods: Uint32Array): TBATSForecaster;
1010
+ /**
1011
+ * Predict with prediction intervals.
1012
+ *
1013
+ * @param horizon - Number of steps to forecast
1014
+ * @param level - Confidence level (e.g., 0.95 for 95% intervals)
1015
+ */
1016
+ predictWithIntervals(horizon: number, level: number): Forecast;
411
1017
  fit(series: TimeSeries): void;
412
1018
  /**
413
1019
  * @param seasonal_periods - Array of seasonal periods (e.g., [7, 365] for daily data)
414
1020
  */
415
1021
  constructor(seasonal_periods: Uint32Array);
416
1022
  predict(horizon: number): Forecast;
1023
+ /**
1024
+ * Set ARMA error orders.
1025
+ *
1026
+ * @param p - AR order
1027
+ * @param q - MA order
1028
+ */
1029
+ setArma(p: number, q: number): void;
417
1030
  readonly name: string;
418
1031
  }
419
1032
 
420
1033
  export class TSBForecaster {
421
1034
  free(): void;
422
1035
  [Symbol.dispose](): void;
1036
+ predictWithIntervals(horizon: number, level: number): Forecast;
423
1037
  fit(series: TimeSeries): void;
424
1038
  constructor();
425
1039
  predict(horizon: number): Forecast;
@@ -439,6 +1053,23 @@ export class ThetaForecaster {
439
1053
  export class TimeSeries {
440
1054
  free(): void;
441
1055
  [Symbol.dispose](): void;
1056
+ /**
1057
+ * Check if calendar annotations are attached.
1058
+ */
1059
+ hasCalendar(): boolean;
1060
+ /**
1061
+ * Attach calendar annotations (holidays, regressors) to this time series.
1062
+ *
1063
+ * Models that support exogenous variables will automatically use the
1064
+ * calendar annotations during fitting.
1065
+ *
1066
+ * @param calendar - CalendarAnnotations instance
1067
+ */
1068
+ setCalendar(calendar: CalendarAnnotations): void;
1069
+ /**
1070
+ * Remove calendar annotations from this time series.
1071
+ */
1072
+ clearCalendar(): void;
442
1073
  /**
443
1074
  * Create a time series with timestamps.
444
1075
  *
@@ -492,6 +1123,133 @@ export class WindowAverageForecaster {
492
1123
  readonly name: string;
493
1124
  }
494
1125
 
1126
+ /**
1127
+ * Perform the Augmented Dickey-Fuller (ADF) test for unit root.
1128
+ *
1129
+ * Tests the null hypothesis that the series has a unit root (non-stationary).
1130
+ * Rejection (low p-value, negative statistic below critical values) implies
1131
+ * stationarity.
1132
+ *
1133
+ * @param values - Array of numeric values
1134
+ * @param maxLags - Maximum lags to include (default: (n-1)^(1/3))
1135
+ * @returns Object with `statistic`, `pValue`, `lags`, `isStationary`, and `criticalValues`
1136
+ */
1137
+ export function adfTest(values: Float64Array, max_lags?: number | null): any;
1138
+
1139
+ /**
1140
+ * Compute the approximate entropy of a time series.
1141
+ *
1142
+ * Measures the complexity/regularity of a time series, including self-matches.
1143
+ *
1144
+ * @param values - Array of numeric values
1145
+ * @param m - Embedding dimension (typically 2)
1146
+ * @param r - Tolerance (typically 0.2 * standard deviation)
1147
+ * @returns Approximate entropy, or NaN if insufficient data
1148
+ */
1149
+ export function approximateEntropy(values: Float64Array, m: number, r: number): number;
1150
+
1151
+ /**
1152
+ * Compute the autocorrelation of a time series at a specific lag.
1153
+ *
1154
+ * @param values - Array of numeric values
1155
+ * @param lag - Lag value
1156
+ * @returns Autocorrelation coefficient at the given lag
1157
+ */
1158
+ export function autocorrelation(values: Float64Array, lag: number): number;
1159
+
1160
+ /**
1161
+ * Run a backtest on a postprocessor.
1162
+ *
1163
+ * @param processor - The postprocessor to evaluate
1164
+ * @param forecasts - All historical point forecasts
1165
+ * @param actuals - All historical actual values
1166
+ * @param config - Backtest configuration
1167
+ */
1168
+ export function backtestPostProcessor(processor: JsPostProcessor, forecasts: JsPointForecasts, actuals: Float64Array, config: JsBacktestConfig): JsBacktestResult;
1169
+
1170
+ /**
1171
+ * Generate a bootstrap forecast with empirical prediction intervals.
1172
+ *
1173
+ * Uses residual bootstrap: resamples fitted residuals, generates synthetic
1174
+ * series, re-fits the model, and collects forecast distributions to
1175
+ * compute confidence intervals.
1176
+ *
1177
+ * @param values - Array of numeric values
1178
+ * @param timestamps - Optional array of timestamps as milliseconds since epoch
1179
+ * @param modelType - Model type: "naive", "ses", "holt", "autoarima", "autoets", "autotheta", "sma5", etc.
1180
+ * @param horizon - Number of steps to forecast
1181
+ * @param level - Confidence level (e.g., 0.95 for 95% intervals)
1182
+ * @param nSamples - Number of bootstrap samples (default: 200)
1183
+ * @returns Object with `point`, `lower`, `upper`, `level`, `nSamples`
1184
+ */
1185
+ export function bootstrapForecast(values: Float64Array, timestamps: Float64Array | null | undefined, model_type: string, horizon: number, level: number, n_samples?: number | null): any;
1186
+
1187
+ /**
1188
+ * Perform time series cross-validation with expanding window.
1189
+ *
1190
+ * Evaluates a forecasting model using multiple train/test splits where
1191
+ * the training window grows with each fold.
1192
+ *
1193
+ * @param values - Array of numeric values
1194
+ * @param timestamps - Optional array of timestamps as milliseconds since epoch
1195
+ * @param modelType - Model type: "naive", "ses", "holt", "autoarima", "autoets", "autotheta", "sma5", etc.
1196
+ * @param horizon - Forecast horizon for each fold
1197
+ * @param initialWindow - Initial training window size (default: max(10, length/3))
1198
+ * @returns Object with `rmse`, `mae`, `mape`, `smape`, `folds`, `maeStd`, `rmseStd`
1199
+ */
1200
+ export function crossValidate(values: Float64Array, timestamps: Float64Array | null | undefined, model_type: string, horizon: number, initial_window?: number | null): any;
1201
+
1202
+ /**
1203
+ * Detect changepoints in a time series using the PELT algorithm.
1204
+ *
1205
+ * Returns an object with `changepoints` (indices), `segments` (boundary pairs),
1206
+ * `cost`, `nChangepoints`, and `segmentMeans`.
1207
+ *
1208
+ * @param values - Array of numeric values
1209
+ * @param penalty - Penalty for each changepoint (controls number of changepoints; higher = fewer)
1210
+ * @param costFunction - Cost function: "l1", "l2" (default), "normal", "poisson", "linearTrend", "meanVariance", or "cusum"
1211
+ * @param minSegmentLength - Minimum segment length (default: 2)
1212
+ * @returns Object with changepoint detection results
1213
+ */
1214
+ export function detectChangepoints(values: Float64Array, penalty: number, cost_function?: string | null, min_segment_length?: number | null): any;
1215
+
1216
+ /**
1217
+ * Detect changepoints using BIC penalty (penalty = log(n)).
1218
+ *
1219
+ * BIC penalty automatically adapts to series length, providing a good
1220
+ * default for most use cases.
1221
+ *
1222
+ * @param values - Array of numeric values
1223
+ * @param costFunction - Cost function (default: "l2")
1224
+ * @returns Object with changepoint detection results
1225
+ */
1226
+ export function detectChangepointsBic(values: Float64Array, cost_function?: string | null): any;
1227
+
1228
+ /**
1229
+ * Run comprehensive residual diagnostics.
1230
+ *
1231
+ * Combines Ljung-Box (autocorrelation), Durbin-Watson (first-order autocorrelation),
1232
+ * and Jarque-Bera (normality) tests into a single diagnostic report.
1233
+ *
1234
+ * @param residuals - Array of model residuals
1235
+ * @param fittedParams - Number of fitted model parameters (default: 0)
1236
+ * @returns Object with `ljungBox`, `durbinWatson`, `jarqueBera`, `mean`, `variance`, `n`, and `isAdequate`
1237
+ */
1238
+ export function diagnoseResiduals(residuals: Float64Array, fitted_params?: number | null): any;
1239
+
1240
+ /**
1241
+ * Perform the Durbin-Watson test for first-order autocorrelation.
1242
+ *
1243
+ * The statistic ranges from 0 to 4:
1244
+ * - Near 0: Strong positive autocorrelation
1245
+ * - Near 2: No autocorrelation
1246
+ * - Near 4: Strong negative autocorrelation
1247
+ *
1248
+ * @param residuals - Array of model residuals
1249
+ * @returns Object with `statistic` and `interpretation`
1250
+ */
1251
+ export function durbinWatson(residuals: Float64Array): any;
1252
+
495
1253
  /**
496
1254
  * Initialize the WASM module.
497
1255
  *
@@ -499,6 +1257,134 @@ export class WindowAverageForecaster {
499
1257
  */
500
1258
  export function init(): void;
501
1259
 
1260
+ /**
1261
+ * Perform the Jarque-Bera test for normality of residuals.
1262
+ *
1263
+ * Tests the null hypothesis that residuals are normally distributed by
1264
+ * examining skewness and kurtosis. A high statistic (low p-value) suggests
1265
+ * non-normality.
1266
+ *
1267
+ * @param residuals - Array of model residuals
1268
+ * @returns Object with `statistic`, `pValue`, `isNormal`, `skewness`, and `excessKurtosis`
1269
+ */
1270
+ export function jarqueBera(residuals: Float64Array): any;
1271
+
1272
+ /**
1273
+ * Perform the KPSS test for stationarity.
1274
+ *
1275
+ * Tests the null hypothesis that the series is (level) stationary.
1276
+ * Rejection (high statistic above critical values) implies non-stationarity.
1277
+ *
1278
+ * Note: ADF and KPSS test opposite null hypotheses:
1279
+ * - ADF: H0 = non-stationary, reject = stationary
1280
+ * - KPSS: H0 = stationary, reject = non-stationary
1281
+ *
1282
+ * @param values - Array of numeric values
1283
+ * @param lags - Number of lags for HAC variance (default: 4*(n/100)^0.25)
1284
+ * @returns Object with `statistic`, `pValue`, `lags`, `isStationary`, and `criticalValues`
1285
+ */
1286
+ export function kpssTest(values: Float64Array, lags?: number | null): any;
1287
+
1288
+ /**
1289
+ * Compute the excess kurtosis (fourth standardized moment) of a time series.
1290
+ *
1291
+ * Measures the "tailedness" of the distribution. A normal distribution has
1292
+ * excess kurtosis of 0.
1293
+ *
1294
+ * @param values - Array of numeric values
1295
+ * @returns Excess kurtosis, or NaN if fewer than 4 values
1296
+ */
1297
+ export function kurtosis(values: Float64Array): number;
1298
+
1299
+ /**
1300
+ * Perform the Ljung-Box test for autocorrelation in residuals.
1301
+ *
1302
+ * Tests the null hypothesis that residuals are independently distributed
1303
+ * (white noise). A low p-value suggests significant autocorrelation remains.
1304
+ *
1305
+ * @param residuals - Array of model residuals
1306
+ * @param lags - Number of lags to include (default: min(10, n/5))
1307
+ * @param fittedParams - Number of fitted model parameters (for df adjustment, default: 0)
1308
+ * @returns Object with `statistic`, `pValue`, `lags`, `df`, and `isWhiteNoise`
1309
+ */
1310
+ export function ljungBox(residuals: Float64Array, lags?: number | null, fitted_params?: number | null): any;
1311
+
1312
+ /**
1313
+ * Compute the arithmetic mean of a time series.
1314
+ *
1315
+ * @param values - Array of numeric values
1316
+ * @returns Arithmetic mean, or NaN if empty
1317
+ */
1318
+ export function mean(values: Float64Array): number;
1319
+
1320
+ /**
1321
+ * Perform MSTL (Multiple Seasonal-Trend decomposition using LOESS).
1322
+ *
1323
+ * Decomposes a time series with multiple seasonal periods into trend,
1324
+ * multiple seasonal components, and remainder.
1325
+ *
1326
+ * @param values - Array of numeric values
1327
+ * @param periods - Array of seasonal periods (e.g., [7, 365] for daily data)
1328
+ * @returns Object with `trend`, `seasonals` (array of arrays), `seasonalPeriods`, `remainder`, and `trendStrength`
1329
+ */
1330
+ export function mstlDecompose(values: Float64Array, periods: Uint32Array): any;
1331
+
1332
+ /**
1333
+ * Compute the partial autocorrelation of a time series at a specific lag.
1334
+ *
1335
+ * Uses the Durbin-Levinson algorithm.
1336
+ *
1337
+ * @param values - Array of numeric values
1338
+ * @param lag - Lag value (must be >= 1)
1339
+ * @returns Partial autocorrelation coefficient at the given lag
1340
+ */
1341
+ export function partialAutocorrelation(values: Float64Array, lag: number): number;
1342
+
1343
+ /**
1344
+ * Compute the sample entropy of a time series.
1345
+ *
1346
+ * Measures the complexity/regularity of a time series. Lower values indicate
1347
+ * more regularity. Unlike approximate entropy, excludes self-matches.
1348
+ *
1349
+ * @param values - Array of numeric values
1350
+ * @param m - Embedding dimension (typically 2)
1351
+ * @param r - Tolerance (typically 0.2 * standard deviation)
1352
+ * @returns Sample entropy, or NaN if insufficient data
1353
+ */
1354
+ export function sampleEntropy(values: Float64Array, m: number, r: number): number;
1355
+
1356
+ /**
1357
+ * Compute the skewness (third standardized moment) of a time series.
1358
+ *
1359
+ * Measures the asymmetry of the distribution.
1360
+ *
1361
+ * @param values - Array of numeric values
1362
+ * @returns Skewness, or NaN if fewer than 3 values
1363
+ */
1364
+ export function skewness(values: Float64Array): number;
1365
+
1366
+ /**
1367
+ * Perform STL (Seasonal-Trend decomposition using LOESS).
1368
+ *
1369
+ * Decomposes a time series into trend, seasonal, and remainder components.
1370
+ *
1371
+ * @param values - Array of numeric values
1372
+ * @param period - Seasonal period (e.g., 12 for monthly data)
1373
+ * @param robust - Enable robust fitting to reduce outlier influence (default: false)
1374
+ * @returns Object with `trend`, `seasonal`, `remainder`, `seasonalStrength`, and `trendStrength`
1375
+ */
1376
+ export function stlDecompose(values: Float64Array, period: number, robust?: boolean | null): any;
1377
+
1378
+ /**
1379
+ * Compute the population variance of a time series.
1380
+ *
1381
+ * Uses population formula (n denominator) matching tsfresh.
1382
+ *
1383
+ * @param values - Array of numeric values
1384
+ * @returns Population variance, or NaN if empty
1385
+ */
1386
+ export function variance(values: Float64Array): number;
1387
+
502
1388
  /**
503
1389
  * Get the library version.
504
1390
  */
@@ -511,17 +1397,33 @@ export interface InitOutput {
511
1397
  readonly __wbg_adidaforecaster_free: (a: number, b: number) => void;
512
1398
  readonly __wbg_arimaforecaster_free: (a: number, b: number) => void;
513
1399
  readonly __wbg_autoarimaforecaster_free: (a: number, b: number) => void;
1400
+ readonly __wbg_autoensembleforecaster_free: (a: number, b: number) => void;
514
1401
  readonly __wbg_autoetsforecaster_free: (a: number, b: number) => void;
1402
+ readonly __wbg_autoforecaster_free: (a: number, b: number) => void;
515
1403
  readonly __wbg_autotbatsforecaster_free: (a: number, b: number) => void;
516
1404
  readonly __wbg_autothetaforecaster_free: (a: number, b: number) => void;
1405
+ readonly __wbg_calendarannotations_free: (a: number, b: number) => void;
517
1406
  readonly __wbg_crostonforecaster_free: (a: number, b: number) => void;
518
1407
  readonly __wbg_dynamicthetaforecaster_free: (a: number, b: number) => void;
1408
+ readonly __wbg_ensembleforecaster_free: (a: number, b: number) => void;
519
1409
  readonly __wbg_etsforecaster_free: (a: number, b: number) => void;
520
1410
  readonly __wbg_forecast_free: (a: number, b: number) => void;
521
1411
  readonly __wbg_garchforecaster_free: (a: number, b: number) => void;
522
1412
  readonly __wbg_holtforecaster_free: (a: number, b: number) => void;
523
1413
  readonly __wbg_holtwintersforecaster_free: (a: number, b: number) => void;
524
1414
  readonly __wbg_imapaforecaster_free: (a: number, b: number) => void;
1415
+ readonly __wbg_jsbacktestconfig_free: (a: number, b: number) => void;
1416
+ readonly __wbg_jsbacktestresult_free: (a: number, b: number) => void;
1417
+ readonly __wbg_jsconformalpredictor_free: (a: number, b: number) => void;
1418
+ readonly __wbg_jsconformalresult_free: (a: number, b: number) => void;
1419
+ readonly __wbg_jshistoricalsimresult_free: (a: number, b: number) => void;
1420
+ readonly __wbg_jshistoricalsimulator_free: (a: number, b: number) => void;
1421
+ readonly __wbg_jsnormalpredictor_free: (a: number, b: number) => void;
1422
+ readonly __wbg_jsnormalresult_free: (a: number, b: number) => void;
1423
+ readonly __wbg_jspointforecasts_free: (a: number, b: number) => void;
1424
+ readonly __wbg_jspostprocessor_free: (a: number, b: number) => void;
1425
+ readonly __wbg_jspredictionintervals_free: (a: number, b: number) => void;
1426
+ readonly __wbg_jstrainedmodel_free: (a: number, b: number) => void;
525
1427
  readonly __wbg_meanforecaster_free: (a: number, b: number) => void;
526
1428
  readonly __wbg_mflesforecaster_free: (a: number, b: number) => void;
527
1429
  readonly __wbg_mstlforecasterwrapper_free: (a: number, b: number) => void;
@@ -537,10 +1439,13 @@ export interface InitOutput {
537
1439
  readonly __wbg_tbatsforecaster_free: (a: number, b: number) => void;
538
1440
  readonly __wbg_thetaforecaster_free: (a: number, b: number) => void;
539
1441
  readonly __wbg_timeseries_free: (a: number, b: number) => void;
1442
+ readonly adfTest: (a: number, b: number, c: number) => [number, number, number];
540
1443
  readonly adidaforecaster_fit: (a: number, b: number) => [number, number];
541
1444
  readonly adidaforecaster_name: (a: number) => [number, number];
542
1445
  readonly adidaforecaster_new: () => number;
543
1446
  readonly adidaforecaster_predict: (a: number, b: number) => [number, number, number];
1447
+ readonly adidaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1448
+ readonly approximateEntropy: (a: number, b: number, c: number, d: number) => number;
544
1449
  readonly arimaforecaster_fit: (a: number, b: number) => [number, number];
545
1450
  readonly arimaforecaster_name: (a: number) => [number, number];
546
1451
  readonly arimaforecaster_new: (a: number, b: number, c: number) => number;
@@ -551,6 +1456,16 @@ export interface InitOutput {
551
1456
  readonly autoarimaforecaster_new: () => number;
552
1457
  readonly autoarimaforecaster_predict: (a: number, b: number) => [number, number, number];
553
1458
  readonly autoarimaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1459
+ readonly autocorrelation: (a: number, b: number, c: number) => number;
1460
+ readonly autoensembleforecaster_allScores: (a: number) => [number, number, number];
1461
+ readonly autoensembleforecaster_fit: (a: number, b: number) => [number, number];
1462
+ readonly autoensembleforecaster_modelCount: (a: number) => number;
1463
+ readonly autoensembleforecaster_name: (a: number) => [number, number];
1464
+ readonly autoensembleforecaster_new: () => number;
1465
+ readonly autoensembleforecaster_predict: (a: number, b: number) => [number, number, number];
1466
+ readonly autoensembleforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1467
+ readonly autoensembleforecaster_seasonal: (a: number) => number;
1468
+ readonly autoensembleforecaster_withConfig: (a: number, b: number) => number;
554
1469
  readonly autoetsforecaster_additiveOnly: () => number;
555
1470
  readonly autoetsforecaster_fit: (a: number, b: number) => [number, number];
556
1471
  readonly autoetsforecaster_name: (a: number) => [number, number];
@@ -558,6 +1473,15 @@ export interface InitOutput {
558
1473
  readonly autoetsforecaster_predict: (a: number, b: number) => [number, number, number];
559
1474
  readonly autoetsforecaster_withConfig: (a: number, b: number, c: number, d: number) => number;
560
1475
  readonly autoetsforecaster_withPeriod: (a: number) => number;
1476
+ readonly autoforecaster_allScores: (a: number) => [number, number, number];
1477
+ readonly autoforecaster_fit: (a: number, b: number) => [number, number];
1478
+ readonly autoforecaster_name: (a: number) => [number, number];
1479
+ readonly autoforecaster_new: () => number;
1480
+ readonly autoforecaster_predict: (a: number, b: number) => [number, number, number];
1481
+ readonly autoforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1482
+ readonly autoforecaster_seasonal: (a: number) => number;
1483
+ readonly autoforecaster_selectedModelName: (a: number) => [number, number];
1484
+ readonly autoforecaster_withConfig: (a: number, b: number, c: number, d: number, e: number) => number;
561
1485
  readonly autotbatsforecaster_fit: (a: number, b: number) => [number, number];
562
1486
  readonly autotbatsforecaster_name: (a: number) => [number, number];
563
1487
  readonly autotbatsforecaster_new: (a: number, b: number) => number;
@@ -567,10 +1491,32 @@ export interface InitOutput {
567
1491
  readonly autothetaforecaster_new: () => number;
568
1492
  readonly autothetaforecaster_predict: (a: number, b: number) => [number, number, number];
569
1493
  readonly autothetaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1494
+ readonly backtestPostProcessor: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
1495
+ readonly bootstrapForecast: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
1496
+ readonly calendarannotations_addHoliday: (a: number, b: number) => void;
1497
+ readonly calendarannotations_addRegressor: (a: number, b: number, c: number, d: number, e: number) => void;
1498
+ readonly calendarannotations_fromJSON: (a: number, b: number) => [number, number, number];
1499
+ readonly calendarannotations_getHolidays: (a: number) => [number, number];
1500
+ readonly calendarannotations_getRegressor: (a: number, b: number, c: number) => [number, number];
1501
+ readonly calendarannotations_hasRegressors: (a: number) => number;
1502
+ readonly calendarannotations_holidayCount: (a: number) => number;
1503
+ readonly calendarannotations_isBusinessDay: (a: number, b: number) => number;
1504
+ readonly calendarannotations_isHoliday: (a: number, b: number) => number;
1505
+ readonly calendarannotations_new: () => number;
1506
+ readonly calendarannotations_regressorCount: (a: number) => number;
1507
+ readonly calendarannotations_regressorNames: (a: number) => [number, number, number];
1508
+ readonly calendarannotations_setHolidays: (a: number, b: number, c: number) => void;
1509
+ readonly calendarannotations_toJSON: (a: number) => [number, number, number, number];
1510
+ readonly crossValidate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
570
1511
  readonly crostonforecaster_fit: (a: number, b: number) => [number, number];
571
1512
  readonly crostonforecaster_name: (a: number) => [number, number];
572
1513
  readonly crostonforecaster_new: () => number;
573
1514
  readonly crostonforecaster_predict: (a: number, b: number) => [number, number, number];
1515
+ readonly crostonforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1516
+ readonly detectChangepoints: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
1517
+ readonly detectChangepointsBic: (a: number, b: number, c: number, d: number) => [number, number, number];
1518
+ readonly diagnoseResiduals: (a: number, b: number, c: number) => [number, number, number];
1519
+ readonly durbinWatson: (a: number, b: number) => [number, number, number];
574
1520
  readonly dynamicthetaforecaster_fit: (a: number, b: number) => [number, number];
575
1521
  readonly dynamicthetaforecaster_name: (a: number) => [number, number];
576
1522
  readonly dynamicthetaforecaster_new: (a: number) => number;
@@ -578,6 +1524,15 @@ export interface InitOutput {
578
1524
  readonly dynamicthetaforecaster_predict: (a: number, b: number) => [number, number, number];
579
1525
  readonly dynamicthetaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
580
1526
  readonly dynamicthetaforecaster_seasonal: (a: number) => number;
1527
+ readonly ensembleforecaster_fit: (a: number, b: number) => [number, number];
1528
+ readonly ensembleforecaster_modelCount: (a: number) => number;
1529
+ readonly ensembleforecaster_name: (a: number) => [number, number];
1530
+ readonly ensembleforecaster_new: (a: number, b: number) => [number, number, number];
1531
+ readonly ensembleforecaster_predict: (a: number, b: number) => [number, number, number];
1532
+ readonly ensembleforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1533
+ readonly ensembleforecaster_setMedian: (a: number) => void;
1534
+ readonly ensembleforecaster_setWeightedMse: (a: number) => void;
1535
+ readonly ensembleforecaster_setWeights: (a: number, b: number, c: number) => void;
581
1536
  readonly etsforecaster_fit: (a: number, b: number) => [number, number];
582
1537
  readonly etsforecaster_fromNotation: (a: number, b: number, c: number) => [number, number, number];
583
1538
  readonly etsforecaster_isValidSpec: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
@@ -594,21 +1549,73 @@ export interface InitOutput {
594
1549
  readonly garchforecaster_name: (a: number) => [number, number];
595
1550
  readonly garchforecaster_new: (a: number, b: number) => number;
596
1551
  readonly garchforecaster_predict: (a: number, b: number) => [number, number, number];
1552
+ readonly garchforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
597
1553
  readonly holtforecaster_fit: (a: number, b: number) => [number, number];
598
1554
  readonly holtforecaster_name: (a: number) => [number, number];
599
1555
  readonly holtforecaster_new: (a: number, b: number) => number;
600
1556
  readonly holtforecaster_predict: (a: number, b: number) => [number, number, number];
1557
+ readonly holtforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
601
1558
  readonly holtwintersforecaster_auto: (a: number, b: number, c: number) => [number, number, number];
602
1559
  readonly holtwintersforecaster_fit: (a: number, b: number) => [number, number];
603
1560
  readonly holtwintersforecaster_multiplicative: (a: number, b: number, c: number, d: number) => number;
604
1561
  readonly holtwintersforecaster_name: (a: number) => [number, number];
605
1562
  readonly holtwintersforecaster_new: (a: number, b: number, c: number, d: number) => number;
606
1563
  readonly holtwintersforecaster_predict: (a: number, b: number) => [number, number, number];
1564
+ readonly holtwintersforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
607
1565
  readonly imapaforecaster_fit: (a: number, b: number) => [number, number];
608
1566
  readonly imapaforecaster_name: (a: number) => [number, number];
609
1567
  readonly imapaforecaster_new: () => number;
610
1568
  readonly imapaforecaster_predict: (a: number, b: number) => [number, number, number];
1569
+ readonly imapaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
611
1570
  readonly init: () => void;
1571
+ readonly jarqueBera: (a: number, b: number) => [number, number, number];
1572
+ readonly jsbacktestconfig_expanding: (a: number, b: number) => number;
1573
+ readonly jsbacktestconfig_horizon: (a: number, b: number) => number;
1574
+ readonly jsbacktestconfig_initialWindow: (a: number, b: number) => number;
1575
+ readonly jsbacktestconfig_new: () => number;
1576
+ readonly jsbacktestconfig_step: (a: number, b: number) => number;
1577
+ readonly jsbacktestresult_calibrationError: (a: number, b: number) => number;
1578
+ readonly jsbacktestresult_coverage: (a: number) => number;
1579
+ readonly jsbacktestresult_intervalWidths: (a: number) => number;
1580
+ readonly jsbacktestresult_numFolds: (a: number) => number;
1581
+ readonly jsconformalpredictor_calibrate: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
1582
+ readonly jsconformalpredictor_crossVal: (a: number, b: number) => number;
1583
+ readonly jsconformalpredictor_jackknifePlus: (a: number) => number;
1584
+ readonly jsconformalpredictor_new: (a: number) => number;
1585
+ readonly jsconformalpredictor_predictIntervals: (a: number, b: number, c: number, d: number) => number;
1586
+ readonly jsconformalresult_coverage: (a: number) => number;
1587
+ readonly jsconformalresult_quantileValue: (a: number) => number;
1588
+ readonly jsconformalresult_scores: (a: number) => [number, number];
1589
+ readonly jshistoricalsimresult_errors: (a: number) => [number, number];
1590
+ readonly jshistoricalsimresult_quantileValues: (a: number) => [number, number];
1591
+ readonly jshistoricalsimulator_new: (a: number, b: number) => number;
1592
+ readonly jshistoricalsimulator_predictIntervals: (a: number, b: number, c: number, d: number) => [number, number, number];
1593
+ readonly jshistoricalsimulator_simulate: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
1594
+ readonly jshistoricalsimulator_withWindow: (a: number, b: number, c: number) => number;
1595
+ readonly jsnormalpredictor_fit: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
1596
+ readonly jsnormalpredictor_new: (a: number, b: number) => number;
1597
+ readonly jsnormalpredictor_predictIntervals: (a: number, b: number, c: number, d: number) => [number, number, number];
1598
+ readonly jsnormalresult_mean: (a: number) => number;
1599
+ readonly jsnormalresult_stdDev: (a: number) => number;
1600
+ readonly jspointforecasts_isEmpty: (a: number) => number;
1601
+ readonly jspointforecasts_length: (a: number) => number;
1602
+ readonly jspointforecasts_new: (a: number, b: number) => number;
1603
+ readonly jspointforecasts_values: (a: number) => [number, number];
1604
+ readonly jspostprocessor_conformal: (a: number) => number;
1605
+ readonly jspostprocessor_historicalSim: (a: number, b: number) => number;
1606
+ readonly jspostprocessor_normal: (a: number, b: number) => number;
1607
+ readonly jspostprocessor_predictIntervals: (a: number, b: number, c: number) => [number, number, number];
1608
+ readonly jspostprocessor_train: (a: number, b: number, c: number, d: number) => [number, number, number];
1609
+ readonly jspredictionintervals_empiricalCoverage: (a: number, b: number, c: number) => [number, number];
1610
+ readonly jspredictionintervals_length: (a: number) => number;
1611
+ readonly jspredictionintervals_lower: (a: number) => [number, number];
1612
+ readonly jspredictionintervals_midpoints: (a: number) => [number, number];
1613
+ readonly jspredictionintervals_upper: (a: number) => [number, number];
1614
+ readonly jspredictionintervals_widths: (a: number) => [number, number];
1615
+ readonly kpssTest: (a: number, b: number, c: number) => [number, number, number];
1616
+ readonly kurtosis: (a: number, b: number) => number;
1617
+ readonly ljungBox: (a: number, b: number, c: number, d: number) => [number, number, number];
1618
+ readonly mean: (a: number, b: number) => number;
612
1619
  readonly meanforecaster_fit: (a: number, b: number) => [number, number];
613
1620
  readonly meanforecaster_name: (a: number) => [number, number];
614
1621
  readonly meanforecaster_new: () => number;
@@ -618,6 +1625,8 @@ export interface InitOutput {
618
1625
  readonly mflesforecaster_name: (a: number) => [number, number];
619
1626
  readonly mflesforecaster_new: (a: number, b: number) => number;
620
1627
  readonly mflesforecaster_predict: (a: number, b: number) => [number, number, number];
1628
+ readonly mflesforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1629
+ readonly mstlDecompose: (a: number, b: number, c: number, d: number) => [number, number, number];
621
1630
  readonly mstlforecasterwrapper_fit: (a: number, b: number) => [number, number];
622
1631
  readonly mstlforecasterwrapper_name: (a: number) => [number, number];
623
1632
  readonly mstlforecasterwrapper_new: (a: number, b: number) => number;
@@ -632,11 +1641,13 @@ export interface InitOutput {
632
1641
  readonly optimizedthetaforecaster_new: () => number;
633
1642
  readonly optimizedthetaforecaster_predict: (a: number, b: number) => [number, number, number];
634
1643
  readonly optimizedthetaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1644
+ readonly partialAutocorrelation: (a: number, b: number, c: number) => number;
635
1645
  readonly randomwalkdriftforecaster_fit: (a: number, b: number) => [number, number];
636
1646
  readonly randomwalkdriftforecaster_name: (a: number) => [number, number];
637
1647
  readonly randomwalkdriftforecaster_new: () => number;
638
1648
  readonly randomwalkdriftforecaster_predict: (a: number, b: number) => [number, number, number];
639
1649
  readonly randomwalkdriftforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1650
+ readonly sampleEntropy: (a: number, b: number, c: number, d: number) => number;
640
1651
  readonly sarimaforecaster_fit: (a: number, b: number) => [number, number];
641
1652
  readonly sarimaforecaster_name: (a: number) => [number, number];
642
1653
  readonly sarimaforecaster_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
@@ -659,23 +1670,34 @@ export interface InitOutput {
659
1670
  readonly sesforecaster_name: (a: number) => [number, number];
660
1671
  readonly sesforecaster_new: (a: number) => number;
661
1672
  readonly sesforecaster_predict: (a: number, b: number) => [number, number, number];
1673
+ readonly sesforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1674
+ readonly skewness: (a: number, b: number) => number;
662
1675
  readonly smaforecaster_fit: (a: number, b: number) => [number, number];
663
1676
  readonly smaforecaster_name: (a: number) => [number, number];
664
1677
  readonly smaforecaster_new: (a: number) => number;
665
1678
  readonly smaforecaster_predict: (a: number, b: number) => [number, number, number];
1679
+ readonly stlDecompose: (a: number, b: number, c: number, d: number) => [number, number, number];
666
1680
  readonly tbatsforecaster_fit: (a: number, b: number) => [number, number];
667
1681
  readonly tbatsforecaster_name: (a: number) => [number, number];
668
1682
  readonly tbatsforecaster_new: (a: number, b: number) => number;
669
1683
  readonly tbatsforecaster_predict: (a: number, b: number) => [number, number, number];
1684
+ readonly tbatsforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1685
+ readonly tbatsforecaster_setArma: (a: number, b: number, c: number) => void;
1686
+ readonly tbatsforecaster_setBoxCox: (a: number, b: number) => void;
1687
+ readonly tbatsforecaster_setDampedTrend: (a: number, b: number) => void;
1688
+ readonly tbatsforecaster_setFourierK: (a: number, b: number, c: number) => void;
670
1689
  readonly thetaforecaster_fit: (a: number, b: number) => [number, number];
671
1690
  readonly thetaforecaster_name: (a: number) => [number, number];
672
1691
  readonly thetaforecaster_new: () => number;
673
1692
  readonly thetaforecaster_predict: (a: number, b: number) => [number, number, number];
674
1693
  readonly thetaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1694
+ readonly timeseries_clearCalendar: (a: number) => void;
1695
+ readonly timeseries_hasCalendar: (a: number) => number;
675
1696
  readonly timeseries_hasMissingValues: (a: number) => number;
676
1697
  readonly timeseries_isEmpty: (a: number) => number;
677
1698
  readonly timeseries_length: (a: number) => number;
678
1699
  readonly timeseries_new: (a: number, b: number) => [number, number, number];
1700
+ readonly timeseries_setCalendar: (a: number, b: number) => void;
679
1701
  readonly timeseries_slice: (a: number, b: number, c: number) => [number, number, number];
680
1702
  readonly timeseries_values: (a: number) => [number, number];
681
1703
  readonly timeseries_withTimestamps: (a: number, b: number, c: number, d: number) => [number, number, number];
@@ -683,16 +1705,22 @@ export interface InitOutput {
683
1705
  readonly tsbforecaster_name: (a: number) => [number, number];
684
1706
  readonly tsbforecaster_new: () => number;
685
1707
  readonly tsbforecaster_predict: (a: number, b: number) => [number, number, number];
1708
+ readonly tsbforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
1709
+ readonly variance: (a: number, b: number) => number;
686
1710
  readonly version: () => [number, number];
687
1711
  readonly windowaverageforecaster_fit: (a: number, b: number) => [number, number];
688
1712
  readonly windowaverageforecaster_name: (a: number) => [number, number];
689
1713
  readonly windowaverageforecaster_new: (a: number) => number;
690
1714
  readonly windowaverageforecaster_predict: (a: number, b: number) => [number, number, number];
1715
+ readonly tbatsforecaster_withSeasonalPeriods: (a: number, b: number) => number;
691
1716
  readonly __wbg_tsbforecaster_free: (a: number, b: number) => void;
692
1717
  readonly __wbg_windowaverageforecaster_free: (a: number, b: number) => void;
693
- readonly __wbindgen_externrefs: WebAssembly.Table;
1718
+ readonly jspredictionintervals_coverage: (a: number) => number;
694
1719
  readonly __wbindgen_malloc: (a: number, b: number) => number;
695
1720
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
1721
+ readonly __wbindgen_exn_store: (a: number) => void;
1722
+ readonly __externref_table_alloc: () => number;
1723
+ readonly __wbindgen_externrefs: WebAssembly.Table;
696
1724
  readonly __externref_table_dealloc: (a: number) => void;
697
1725
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
698
1726
  readonly __wbindgen_start: () => void;