@sipemu/anofox-forecast 0.4.9 → 0.5.0
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.
- package/README.md +54 -10
- package/anofox_forecast_js.d.ts +288 -3
- package/anofox_forecast_js.js +756 -3
- package/anofox_forecast_js_bg.wasm +0 -0
- package/anofox_forecast_js_bg.wasm.d.ts +40 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -278,23 +278,67 @@ model.fit(ts);
|
|
|
278
278
|
const forecast = model.predict(10);
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
##
|
|
281
|
+
## Calendar Feature Engineering
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
```javascript
|
|
284
|
+
import { FeatureGenerator, generateFutureTimestamps } from '@sipemu/anofox-forecast';
|
|
285
|
+
|
|
286
|
+
// Build a feature generator
|
|
287
|
+
const gen = new FeatureGenerator();
|
|
288
|
+
gen.fourier(7, 2); // weekly Fourier terms
|
|
289
|
+
gen.cyclical('month'); // sin/cos month encoding
|
|
290
|
+
gen.cyclical('day_of_week'); // sin/cos day-of-week
|
|
291
|
+
gen.binary('weekend'); // 0/1 weekend indicator
|
|
292
|
+
gen.binary('month_end'); // 0/1 month-end
|
|
293
|
+
gen.advanced('days_in_month'); // 28-31
|
|
294
|
+
|
|
295
|
+
// Generate features from timestamps (ms since epoch)
|
|
296
|
+
const features = gen.generate(timestamps); // { month_sin: [...], weekend: [...], ... }
|
|
297
|
+
const names = gen.featureNames();
|
|
298
|
+
|
|
299
|
+
// Generate future timestamps (calendar-aware)
|
|
300
|
+
const future = generateFutureTimestamps(lastTimestampMs, '1mo', 12); // monthly
|
|
301
|
+
const weekly = generateFutureTimestamps(lastTimestampMs, '1w', 4); // weekly
|
|
302
|
+
|
|
303
|
+
// Auto-infer from TimeSeries
|
|
304
|
+
const futureTs = ts.futureTimestamps(12);
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Bootstrap Prediction Intervals
|
|
308
|
+
|
|
309
|
+
```javascript
|
|
310
|
+
import { JsBootstrapPredictor } from '@sipemu/anofox-forecast';
|
|
311
|
+
|
|
312
|
+
const bp = new JsBootstrapPredictor(0.95);
|
|
313
|
+
bp.nReplicates(1000);
|
|
314
|
+
bp.seed(42);
|
|
315
|
+
|
|
316
|
+
const result = bp.fit(fittedValues, actuals);
|
|
317
|
+
const intervals = bp.predictIntervals(result, pointForecast);
|
|
318
|
+
console.log(intervals.lower, intervals.upper);
|
|
284
319
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
320
|
+
// Multi-quantile forecasts
|
|
321
|
+
const quantiles = bp.predictQuantiles(result, pointForecast, [0.10, 0.25, 0.50, 0.75, 0.90]);
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Per-Step Conformal Prediction
|
|
325
|
+
|
|
326
|
+
```javascript
|
|
327
|
+
// Per-horizon-step intervals (tighter at h=1, wider at h=12)
|
|
328
|
+
const perStep = predictor.fitPerStep(foldForecasts, foldActuals);
|
|
329
|
+
console.log(perStep.halfWidths); // different width per step
|
|
330
|
+
|
|
331
|
+
const intervals = perStep.predictIntervals(pointForecast);
|
|
332
|
+
|
|
333
|
+
// Multi-quantile conformal forecasts
|
|
334
|
+
const quantiles = predictor.predictQuantiles(result, pointForecast, [0.10, 0.50, 0.90]);
|
|
335
|
+
```
|
|
292
336
|
|
|
293
337
|
## Limitations
|
|
294
338
|
|
|
295
339
|
- The `parallel` feature from the Rust crate is not available in WASM
|
|
296
340
|
- IDR (Isotonic Distributional Regression) and QRA are not yet exposed in WASM
|
|
297
|
-
-
|
|
341
|
+
- RegressionForecaster (11 regression backends) is Rust-only (not yet in WASM)
|
|
298
342
|
|
|
299
343
|
## License
|
|
300
344
|
|
package/anofox_forecast_js.d.ts
CHANGED
|
@@ -510,6 +510,73 @@ export class EnsembleForecaster {
|
|
|
510
510
|
readonly name: string;
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
+
export class FeatureGenerator {
|
|
514
|
+
free(): void;
|
|
515
|
+
[Symbol.dispose](): void;
|
|
516
|
+
/**
|
|
517
|
+
* Add day-of-week one-hot indicators (Mon-Sat, Sunday dropped).
|
|
518
|
+
*/
|
|
519
|
+
dayOfWeek(): void;
|
|
520
|
+
/**
|
|
521
|
+
* Return the sorted list of column names this generator will produce.
|
|
522
|
+
*
|
|
523
|
+
* @returns Array of feature name strings
|
|
524
|
+
*/
|
|
525
|
+
featureNames(): any;
|
|
526
|
+
/**
|
|
527
|
+
* Add month-of-year one-hot indicators (Feb-Dec, January dropped).
|
|
528
|
+
*/
|
|
529
|
+
monthOfYear(): void;
|
|
530
|
+
/**
|
|
531
|
+
* Create an empty feature generator.
|
|
532
|
+
*/
|
|
533
|
+
constructor();
|
|
534
|
+
/**
|
|
535
|
+
* Add a binary (0/1) calendar indicator.
|
|
536
|
+
*
|
|
537
|
+
* @param indicator - One of: "weekend", "month_start", "month_end",
|
|
538
|
+
* "quarter_start", "quarter_end", "year_start", "year_end"
|
|
539
|
+
*/
|
|
540
|
+
binary(indicator: string): void;
|
|
541
|
+
/**
|
|
542
|
+
* Add Fourier terms for a given period and order.
|
|
543
|
+
*
|
|
544
|
+
* Produces `2 * order` columns (`fourier_{period}_sin{k}`,
|
|
545
|
+
* `fourier_{period}_cos{k}` for k in 1..=order).
|
|
546
|
+
*
|
|
547
|
+
* @param period - Period in observation units (e.g. 7 for weekly in daily data)
|
|
548
|
+
* @param order - Number of harmonics
|
|
549
|
+
*/
|
|
550
|
+
fourier(period: number, order: number): void;
|
|
551
|
+
/**
|
|
552
|
+
* Add quarter one-hot indicators (Q2-Q4, Q1 dropped).
|
|
553
|
+
*/
|
|
554
|
+
quarter(): void;
|
|
555
|
+
/**
|
|
556
|
+
* Add an advanced numeric calendar feature.
|
|
557
|
+
*
|
|
558
|
+
* @param feature - One of: "leap_year", "days_in_month"
|
|
559
|
+
*/
|
|
560
|
+
advanced(feature: string): void;
|
|
561
|
+
/**
|
|
562
|
+
* Add cyclical sin/cos encoding of a time component.
|
|
563
|
+
*
|
|
564
|
+
* Produces 2 columns: `{name}_sin` and `{name}_cos`.
|
|
565
|
+
*
|
|
566
|
+
* @param component - One of: "month", "quarter", "semester",
|
|
567
|
+
* "week_of_year", "day_of_week", "day_of_month", "day_of_year",
|
|
568
|
+
* "hour", "minute", "second"
|
|
569
|
+
*/
|
|
570
|
+
cyclical(component: string): void;
|
|
571
|
+
/**
|
|
572
|
+
* Generate features for the given timestamps.
|
|
573
|
+
*
|
|
574
|
+
* @param timestamps - Array of timestamps as milliseconds since Unix epoch
|
|
575
|
+
* @returns Object mapping feature names to Float64Array values
|
|
576
|
+
*/
|
|
577
|
+
generate(timestamps: Float64Array): any;
|
|
578
|
+
}
|
|
579
|
+
|
|
513
580
|
export class Forecast {
|
|
514
581
|
private constructor();
|
|
515
582
|
free(): void;
|
|
@@ -674,9 +741,96 @@ export class JsBacktestResult {
|
|
|
674
741
|
readonly coverage: number;
|
|
675
742
|
}
|
|
676
743
|
|
|
744
|
+
export class JsBootstrapPredictor {
|
|
745
|
+
free(): void;
|
|
746
|
+
[Symbol.dispose](): void;
|
|
747
|
+
/**
|
|
748
|
+
* Use block bootstrap with the given block size.
|
|
749
|
+
*
|
|
750
|
+
* Preserves autocorrelation in residuals.
|
|
751
|
+
*
|
|
752
|
+
* @param size - Block size (0 falls back to IID)
|
|
753
|
+
*/
|
|
754
|
+
blockSize(size: number): JsBootstrapPredictor;
|
|
755
|
+
/**
|
|
756
|
+
* Set the number of bootstrap replicates (default: 1000).
|
|
757
|
+
*
|
|
758
|
+
* @param n - Number of replicates (minimum 10)
|
|
759
|
+
*/
|
|
760
|
+
nReplicates(n: number): JsBootstrapPredictor;
|
|
761
|
+
/**
|
|
762
|
+
* Generate prediction intervals for new point forecasts.
|
|
763
|
+
*
|
|
764
|
+
* Returns a JsPredictionIntervals with lower and upper bounds.
|
|
765
|
+
*
|
|
766
|
+
* @param result - A fitted JsBootstrapResult from fit()
|
|
767
|
+
* @param pointForecasts - New point forecast values
|
|
768
|
+
*/
|
|
769
|
+
predictIntervals(result: JsBootstrapResult, point_forecasts: Float64Array): JsPredictionIntervals;
|
|
770
|
+
/**
|
|
771
|
+
* Generate quantile forecasts at multiple quantile levels.
|
|
772
|
+
*
|
|
773
|
+
* Returns a serialized object with `quantiles` (levels) and `values` (matrix).
|
|
774
|
+
*
|
|
775
|
+
* @param result - A fitted JsBootstrapResult from fit()
|
|
776
|
+
* @param pointForecasts - New point forecast values
|
|
777
|
+
* @param levels - Quantile levels in (0, 1), e.g. [0.1, 0.25, 0.5, 0.75, 0.9]
|
|
778
|
+
*/
|
|
779
|
+
predictQuantiles(result: JsBootstrapResult, point_forecasts: Float64Array, levels: Float64Array): any;
|
|
780
|
+
/**
|
|
781
|
+
* Fit the predictor on historical forecasts and actuals.
|
|
782
|
+
*
|
|
783
|
+
* Computes residuals and stores them for resampling.
|
|
784
|
+
*
|
|
785
|
+
* @param forecasts - Historical point forecast values
|
|
786
|
+
* @param actuals - Corresponding actual observed values
|
|
787
|
+
*/
|
|
788
|
+
fit(forecasts: Float64Array, actuals: Float64Array): JsBootstrapResult;
|
|
789
|
+
/**
|
|
790
|
+
* Create a bootstrap predictor with the given coverage level.
|
|
791
|
+
*
|
|
792
|
+
* @param coverage - Target coverage level in (0, 1), e.g. 0.90
|
|
793
|
+
*/
|
|
794
|
+
constructor(coverage: number);
|
|
795
|
+
/**
|
|
796
|
+
* Set random seed for reproducibility.
|
|
797
|
+
*
|
|
798
|
+
* @param seed - Random seed value
|
|
799
|
+
*/
|
|
800
|
+
seed(seed: bigint): JsBootstrapPredictor;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export class JsBootstrapResult {
|
|
804
|
+
private constructor();
|
|
805
|
+
free(): void;
|
|
806
|
+
[Symbol.dispose](): void;
|
|
807
|
+
/**
|
|
808
|
+
* Get the residuals used for resampling.
|
|
809
|
+
*/
|
|
810
|
+
residuals(): Float64Array;
|
|
811
|
+
/**
|
|
812
|
+
* Get the number of replicates.
|
|
813
|
+
*/
|
|
814
|
+
readonly nReplicates: number;
|
|
815
|
+
/**
|
|
816
|
+
* Get the coverage level.
|
|
817
|
+
*/
|
|
818
|
+
readonly coverage: number;
|
|
819
|
+
}
|
|
820
|
+
|
|
677
821
|
export class JsConformalPredictor {
|
|
678
822
|
free(): void;
|
|
679
823
|
[Symbol.dispose](): void;
|
|
824
|
+
/**
|
|
825
|
+
* Fit per-horizon-step conformal intervals.
|
|
826
|
+
*
|
|
827
|
+
* Each horizon step gets its own interval half-width, allowing tighter
|
|
828
|
+
* intervals for near-horizon steps and wider for far-horizon steps.
|
|
829
|
+
*
|
|
830
|
+
* @param foldForecasts - Per-fold forecast arrays (array of arrays), each of length `horizon`
|
|
831
|
+
* @param foldActuals - Per-fold actual arrays (array of arrays), each of length `horizon`
|
|
832
|
+
*/
|
|
833
|
+
fitPerStep(fold_forecasts: any, fold_actuals: any): JsPerStepConformalResult;
|
|
680
834
|
/**
|
|
681
835
|
* Create a conformal predictor with the Jackknife+ method.
|
|
682
836
|
*
|
|
@@ -690,6 +844,16 @@ export class JsConformalPredictor {
|
|
|
690
844
|
* @param pointForecasts - New point forecast values
|
|
691
845
|
*/
|
|
692
846
|
predictIntervals(result: JsConformalResult, point_forecasts: Float64Array): JsPredictionIntervals;
|
|
847
|
+
/**
|
|
848
|
+
* Generate quantile forecasts at multiple quantile levels.
|
|
849
|
+
*
|
|
850
|
+
* Returns a serialized object with `quantiles` (levels) and `values` (matrix).
|
|
851
|
+
*
|
|
852
|
+
* @param result - A fitted JsConformalResult from calibrate()
|
|
853
|
+
* @param pointForecasts - New point forecast values
|
|
854
|
+
* @param levels - Quantile levels in (0, 1), e.g. [0.1, 0.5, 0.9]
|
|
855
|
+
*/
|
|
856
|
+
predictQuantiles(result: JsConformalResult, point_forecasts: Float64Array, levels: Float64Array): any;
|
|
693
857
|
/**
|
|
694
858
|
* Create a split conformal predictor.
|
|
695
859
|
*
|
|
@@ -874,6 +1038,40 @@ export class JsNormalResult {
|
|
|
874
1038
|
readonly mean: number;
|
|
875
1039
|
}
|
|
876
1040
|
|
|
1041
|
+
export class JsPerStepConformalResult {
|
|
1042
|
+
private constructor();
|
|
1043
|
+
free(): void;
|
|
1044
|
+
[Symbol.dispose](): void;
|
|
1045
|
+
/**
|
|
1046
|
+
* Apply per-step intervals to a point forecast.
|
|
1047
|
+
*
|
|
1048
|
+
* Returns a JsPredictionIntervals with per-step lower and upper bounds.
|
|
1049
|
+
*
|
|
1050
|
+
* @param pointForecasts - Point forecast values (length must match horizon)
|
|
1051
|
+
*/
|
|
1052
|
+
predictIntervals(point_forecasts: Float64Array): JsPredictionIntervals;
|
|
1053
|
+
/**
|
|
1054
|
+
* Apply per-step intervals and return lower/upper as a plain object.
|
|
1055
|
+
*
|
|
1056
|
+
* Returns a serialized object with `lower` and `upper` arrays.
|
|
1057
|
+
*
|
|
1058
|
+
* @param pointForecasts - Point forecast values (length must match horizon)
|
|
1059
|
+
*/
|
|
1060
|
+
predict(point_forecasts: Float64Array): any;
|
|
1061
|
+
/**
|
|
1062
|
+
* Get the per-step interval half-widths.
|
|
1063
|
+
*/
|
|
1064
|
+
readonly halfWidths: Float64Array;
|
|
1065
|
+
/**
|
|
1066
|
+
* Get the number of horizon steps.
|
|
1067
|
+
*/
|
|
1068
|
+
readonly horizon: number;
|
|
1069
|
+
/**
|
|
1070
|
+
* Get the coverage level.
|
|
1071
|
+
*/
|
|
1072
|
+
readonly coverage: number;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
877
1075
|
export class JsPointForecasts {
|
|
878
1076
|
free(): void;
|
|
879
1077
|
[Symbol.dispose](): void;
|
|
@@ -984,6 +1182,13 @@ export class KalmanForecaster {
|
|
|
984
1182
|
* @param state_noise - State (level) noise variance
|
|
985
1183
|
*/
|
|
986
1184
|
static localLevel(obs_noise: number, state_noise: number): KalmanForecaster;
|
|
1185
|
+
/**
|
|
1186
|
+
* Compute the log-likelihood of the observations under the model.
|
|
1187
|
+
*
|
|
1188
|
+
* @param series - TimeSeries to evaluate
|
|
1189
|
+
* @returns Log-likelihood value
|
|
1190
|
+
*/
|
|
1191
|
+
logLikelihood(series: TimeSeries): number;
|
|
987
1192
|
/**
|
|
988
1193
|
* Create a local linear trend model.
|
|
989
1194
|
*
|
|
@@ -1006,9 +1211,23 @@ export class KalmanForecaster {
|
|
|
1006
1211
|
* @param series - TimeSeries to fit
|
|
1007
1212
|
*/
|
|
1008
1213
|
fit(series: TimeSeries): void;
|
|
1214
|
+
/**
|
|
1215
|
+
* Create a custom state-space model from matrices.
|
|
1216
|
+
*
|
|
1217
|
+
* @param transition - State transition matrix F (n_state x n_state), flat row-major
|
|
1218
|
+
* @param observation - Observation matrix H (n_obs x n_state), flat row-major
|
|
1219
|
+
* @param processNoise - Process noise covariance Q (n_state x n_state), flat row-major
|
|
1220
|
+
* @param observationNoise - Observation noise covariance R (n_obs x n_obs), flat row-major
|
|
1221
|
+
* @param nState - Number of state dimensions
|
|
1222
|
+
* @param nObs - Number of observation dimensions
|
|
1223
|
+
*/
|
|
1224
|
+
static custom(transition: Float64Array, observation: Float64Array, process_noise: Float64Array, observation_noise: Float64Array, n_state: number, n_obs: number): KalmanForecaster;
|
|
1009
1225
|
/**
|
|
1010
1226
|
* Apply the Kalman smoother (RTS smoother) and return smoothed observations.
|
|
1011
1227
|
*
|
|
1228
|
+
* Uses the same state-space model that was configured (local level, local linear
|
|
1229
|
+
* trend, or custom). Fits the filter first, then runs the RTS smoother.
|
|
1230
|
+
*
|
|
1012
1231
|
* @param series - TimeSeries to smooth
|
|
1013
1232
|
* @returns Array of smoothed observation values
|
|
1014
1233
|
*/
|
|
@@ -1024,6 +1243,14 @@ export class KalmanForecaster {
|
|
|
1024
1243
|
* Get the model name.
|
|
1025
1244
|
*/
|
|
1026
1245
|
readonly name: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* Get the number of observation dimensions.
|
|
1248
|
+
*/
|
|
1249
|
+
readonly nObs: number;
|
|
1250
|
+
/**
|
|
1251
|
+
* Get the number of state dimensions.
|
|
1252
|
+
*/
|
|
1253
|
+
readonly nState: number;
|
|
1027
1254
|
}
|
|
1028
1255
|
|
|
1029
1256
|
export class MFLESForecaster {
|
|
@@ -1272,6 +1499,16 @@ export class TimeSeries {
|
|
|
1272
1499
|
* @returns A new TimeSeries instance
|
|
1273
1500
|
*/
|
|
1274
1501
|
static withTimestamps(values: Float64Array, timestamps_ms: Float64Array): TimeSeries;
|
|
1502
|
+
/**
|
|
1503
|
+
* Generate future timestamps by inferring the series frequency.
|
|
1504
|
+
*
|
|
1505
|
+
* Detects whether the data is daily, weekly, monthly, quarterly, or
|
|
1506
|
+
* yearly from the existing timestamps and extrapolates forward.
|
|
1507
|
+
*
|
|
1508
|
+
* @param horizon - Number of future timestamps to generate
|
|
1509
|
+
* @returns Array of timestamps as milliseconds since Unix epoch
|
|
1510
|
+
*/
|
|
1511
|
+
futureTimestamps(horizon: number): Float64Array;
|
|
1275
1512
|
/**
|
|
1276
1513
|
* Check if the series has missing values (NaN).
|
|
1277
1514
|
*/
|
|
@@ -1486,6 +1723,17 @@ export function diagnoseResiduals(residuals: Float64Array, fitted_params?: numbe
|
|
|
1486
1723
|
*/
|
|
1487
1724
|
export function durbinWatson(residuals: Float64Array): any;
|
|
1488
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* Generate future timestamps starting after a given last timestamp.
|
|
1728
|
+
*
|
|
1729
|
+
* @param lastTimestampMs - Last known timestamp as milliseconds since epoch
|
|
1730
|
+
* @param frequency - Polars-style frequency string: "1d", "1w", "1mo",
|
|
1731
|
+
* "1q", "1y", "1h", "30m", "30s", etc.
|
|
1732
|
+
* @param horizon - Number of future timestamps to generate
|
|
1733
|
+
* @returns Float64Array of timestamps as milliseconds since epoch
|
|
1734
|
+
*/
|
|
1735
|
+
export function generateFutureTimestamps(last_timestamp_ms: number, frequency: string, horizon: number): Float64Array;
|
|
1736
|
+
|
|
1489
1737
|
/**
|
|
1490
1738
|
* Initialize the WASM module.
|
|
1491
1739
|
*
|
|
@@ -1644,6 +1892,7 @@ export interface InitOutput {
|
|
|
1644
1892
|
readonly __wbg_dynamicthetaforecaster_free: (a: number, b: number) => void;
|
|
1645
1893
|
readonly __wbg_ensembleforecaster_free: (a: number, b: number) => void;
|
|
1646
1894
|
readonly __wbg_etsforecaster_free: (a: number, b: number) => void;
|
|
1895
|
+
readonly __wbg_featuregenerator_free: (a: number, b: number) => void;
|
|
1647
1896
|
readonly __wbg_forecast_free: (a: number, b: number) => void;
|
|
1648
1897
|
readonly __wbg_garchforecaster_free: (a: number, b: number) => void;
|
|
1649
1898
|
readonly __wbg_holtforecaster_free: (a: number, b: number) => void;
|
|
@@ -1651,13 +1900,15 @@ export interface InitOutput {
|
|
|
1651
1900
|
readonly __wbg_imapaforecaster_free: (a: number, b: number) => void;
|
|
1652
1901
|
readonly __wbg_jsbacktestconfig_free: (a: number, b: number) => void;
|
|
1653
1902
|
readonly __wbg_jsbacktestresult_free: (a: number, b: number) => void;
|
|
1903
|
+
readonly __wbg_jsbootstrappredictor_free: (a: number, b: number) => void;
|
|
1904
|
+
readonly __wbg_jsbootstrapresult_free: (a: number, b: number) => void;
|
|
1654
1905
|
readonly __wbg_jsconformalpredictor_free: (a: number, b: number) => void;
|
|
1655
|
-
readonly __wbg_jsconformalresult_free: (a: number, b: number) => void;
|
|
1656
1906
|
readonly __wbg_jshistoricalsimresult_free: (a: number, b: number) => void;
|
|
1657
1907
|
readonly __wbg_jshistoricalsimulator_free: (a: number, b: number) => void;
|
|
1658
1908
|
readonly __wbg_jsmodeldiagnostics_free: (a: number, b: number) => void;
|
|
1659
1909
|
readonly __wbg_jsnormalpredictor_free: (a: number, b: number) => void;
|
|
1660
1910
|
readonly __wbg_jsnormalresult_free: (a: number, b: number) => void;
|
|
1911
|
+
readonly __wbg_jsperstepconformalresult_free: (a: number, b: number) => void;
|
|
1661
1912
|
readonly __wbg_jspointforecasts_free: (a: number, b: number) => void;
|
|
1662
1913
|
readonly __wbg_jspostprocessor_free: (a: number, b: number) => void;
|
|
1663
1914
|
readonly __wbg_jspredictionintervals_free: (a: number, b: number) => void;
|
|
@@ -1788,6 +2039,16 @@ export interface InitOutput {
|
|
|
1788
2039
|
readonly etsforecaster_name: (a: number) => [number, number];
|
|
1789
2040
|
readonly etsforecaster_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
|
|
1790
2041
|
readonly etsforecaster_predict: (a: number, b: number) => [number, number, number];
|
|
2042
|
+
readonly featuregenerator_advanced: (a: number, b: number, c: number) => [number, number];
|
|
2043
|
+
readonly featuregenerator_binary: (a: number, b: number, c: number) => [number, number];
|
|
2044
|
+
readonly featuregenerator_cyclical: (a: number, b: number, c: number) => [number, number];
|
|
2045
|
+
readonly featuregenerator_dayOfWeek: (a: number) => void;
|
|
2046
|
+
readonly featuregenerator_featureNames: (a: number) => [number, number, number];
|
|
2047
|
+
readonly featuregenerator_fourier: (a: number, b: number, c: number) => void;
|
|
2048
|
+
readonly featuregenerator_generate: (a: number, b: number, c: number) => [number, number, number];
|
|
2049
|
+
readonly featuregenerator_monthOfYear: (a: number) => void;
|
|
2050
|
+
readonly featuregenerator_new: () => number;
|
|
2051
|
+
readonly featuregenerator_quarter: (a: number) => void;
|
|
1791
2052
|
readonly forecast_clamp: (a: number, b: number, c: number) => number;
|
|
1792
2053
|
readonly forecast_hasLower: (a: number) => number;
|
|
1793
2054
|
readonly forecast_hasUpper: (a: number) => number;
|
|
@@ -1802,6 +2063,7 @@ export interface InitOutput {
|
|
|
1802
2063
|
readonly garchforecaster_new: (a: number, b: number) => number;
|
|
1803
2064
|
readonly garchforecaster_predict: (a: number, b: number) => [number, number, number];
|
|
1804
2065
|
readonly garchforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
|
|
2066
|
+
readonly generateFutureTimestamps: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1805
2067
|
readonly holtforecaster_fit: (a: number, b: number) => [number, number];
|
|
1806
2068
|
readonly holtforecaster_name: (a: number) => [number, number];
|
|
1807
2069
|
readonly holtforecaster_new: (a: number, b: number) => number;
|
|
@@ -1830,14 +2092,24 @@ export interface InitOutput {
|
|
|
1830
2092
|
readonly jsbacktestresult_coverage: (a: number) => number;
|
|
1831
2093
|
readonly jsbacktestresult_intervalWidths: (a: number) => number;
|
|
1832
2094
|
readonly jsbacktestresult_numFolds: (a: number) => number;
|
|
2095
|
+
readonly jsbootstrappredictor_blockSize: (a: number, b: number) => number;
|
|
2096
|
+
readonly jsbootstrappredictor_fit: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
2097
|
+
readonly jsbootstrappredictor_nReplicates: (a: number, b: number) => number;
|
|
2098
|
+
readonly jsbootstrappredictor_new: (a: number) => number;
|
|
2099
|
+
readonly jsbootstrappredictor_predictIntervals: (a: number, b: number, c: number, d: number) => number;
|
|
2100
|
+
readonly jsbootstrappredictor_predictQuantiles: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
2101
|
+
readonly jsbootstrappredictor_seed: (a: number, b: bigint) => number;
|
|
2102
|
+
readonly jsbootstrapresult_coverage: (a: number) => number;
|
|
2103
|
+
readonly jsbootstrapresult_nReplicates: (a: number) => number;
|
|
2104
|
+
readonly jsbootstrapresult_residuals: (a: number) => [number, number];
|
|
1833
2105
|
readonly jsconformalpredictor_calibrate: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
1834
2106
|
readonly jsconformalpredictor_crossVal: (a: number, b: number) => number;
|
|
2107
|
+
readonly jsconformalpredictor_fitPerStep: (a: number, b: any, c: any) => [number, number, number];
|
|
1835
2108
|
readonly jsconformalpredictor_jackknifePlus: (a: number) => number;
|
|
1836
2109
|
readonly jsconformalpredictor_new: (a: number) => number;
|
|
1837
2110
|
readonly jsconformalpredictor_predictIntervals: (a: number, b: number, c: number, d: number) => number;
|
|
1838
|
-
readonly
|
|
2111
|
+
readonly jsconformalpredictor_predictQuantiles: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1839
2112
|
readonly jsconformalresult_quantileValue: (a: number) => number;
|
|
1840
|
-
readonly jsconformalresult_scores: (a: number) => [number, number];
|
|
1841
2113
|
readonly jshistoricalsimresult_errors: (a: number) => [number, number];
|
|
1842
2114
|
readonly jshistoricalsimresult_quantileValues: (a: number) => [number, number];
|
|
1843
2115
|
readonly jshistoricalsimulator_new: (a: number, b: number) => number;
|
|
@@ -1857,6 +2129,10 @@ export interface InitOutput {
|
|
|
1857
2129
|
readonly jsnormalpredictor_fit: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
1858
2130
|
readonly jsnormalpredictor_new: (a: number, b: number) => number;
|
|
1859
2131
|
readonly jsnormalpredictor_predictIntervals: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
2132
|
+
readonly jsperstepconformalresult_halfWidths: (a: number) => [number, number];
|
|
2133
|
+
readonly jsperstepconformalresult_horizon: (a: number) => number;
|
|
2134
|
+
readonly jsperstepconformalresult_predict: (a: number, b: number, c: number) => [number, number, number];
|
|
2135
|
+
readonly jsperstepconformalresult_predictIntervals: (a: number, b: number, c: number) => number;
|
|
1860
2136
|
readonly jspointforecasts_isEmpty: (a: number) => number;
|
|
1861
2137
|
readonly jspointforecasts_length: (a: number) => number;
|
|
1862
2138
|
readonly jspointforecasts_new: (a: number, b: number) => number;
|
|
@@ -1872,9 +2148,13 @@ export interface InitOutput {
|
|
|
1872
2148
|
readonly jspredictionintervals_midpoints: (a: number) => [number, number];
|
|
1873
2149
|
readonly jspredictionintervals_upper: (a: number) => [number, number];
|
|
1874
2150
|
readonly jspredictionintervals_widths: (a: number) => [number, number];
|
|
2151
|
+
readonly kalmanforecaster_custom: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
|
|
1875
2152
|
readonly kalmanforecaster_fit: (a: number, b: number) => [number, number];
|
|
1876
2153
|
readonly kalmanforecaster_localLevel: (a: number, b: number) => number;
|
|
1877
2154
|
readonly kalmanforecaster_localLinearTrend: (a: number, b: number, c: number) => number;
|
|
2155
|
+
readonly kalmanforecaster_logLikelihood: (a: number, b: number) => [number, number, number];
|
|
2156
|
+
readonly kalmanforecaster_nObs: (a: number) => number;
|
|
2157
|
+
readonly kalmanforecaster_nState: (a: number) => number;
|
|
1878
2158
|
readonly kalmanforecaster_name: (a: number) => [number, number];
|
|
1879
2159
|
readonly kalmanforecaster_predict: (a: number, b: number) => [number, number, number];
|
|
1880
2160
|
readonly kalmanforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
|
|
@@ -1959,6 +2239,7 @@ export interface InitOutput {
|
|
|
1959
2239
|
readonly thetaforecaster_predict: (a: number, b: number) => [number, number, number];
|
|
1960
2240
|
readonly thetaforecaster_predictWithIntervals: (a: number, b: number, c: number) => [number, number, number];
|
|
1961
2241
|
readonly timeseries_clearCalendar: (a: number) => void;
|
|
2242
|
+
readonly timeseries_futureTimestamps: (a: number, b: number) => [number, number, number, number];
|
|
1962
2243
|
readonly timeseries_hasCalendar: (a: number) => number;
|
|
1963
2244
|
readonly timeseries_hasMissingValues: (a: number) => number;
|
|
1964
2245
|
readonly timeseries_isEmpty: (a: number) => number;
|
|
@@ -1989,11 +2270,15 @@ export interface InitOutput {
|
|
|
1989
2270
|
readonly __wbg_smaforecaster_free: (a: number, b: number) => void;
|
|
1990
2271
|
readonly __wbg_tsbforecaster_free: (a: number, b: number) => void;
|
|
1991
2272
|
readonly __wbg_windowaverageforecaster_free: (a: number, b: number) => void;
|
|
2273
|
+
readonly jsconformalresult_scores: (a: number) => [number, number];
|
|
2274
|
+
readonly jsconformalresult_coverage: (a: number) => number;
|
|
1992
2275
|
readonly jsmodeldiagnostics_heteroscedasticityPvalue: (a: number) => number;
|
|
1993
2276
|
readonly jsmodeldiagnostics_jarqueBeraPvalue: (a: number) => number;
|
|
1994
2277
|
readonly jsnormalresult_mean: (a: number) => number;
|
|
1995
2278
|
readonly jsnormalresult_stdDev: (a: number) => number;
|
|
2279
|
+
readonly jsperstepconformalresult_coverage: (a: number) => number;
|
|
1996
2280
|
readonly jspredictionintervals_coverage: (a: number) => number;
|
|
2281
|
+
readonly __wbg_jsconformalresult_free: (a: number, b: number) => void;
|
|
1997
2282
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1998
2283
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1999
2284
|
readonly __wbindgen_exn_store: (a: number) => void;
|