@xyo-network/diviner-forecasting-method-arima 7.2.2 → 7.3.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.
@@ -1,2 +1,2 @@
1
- export * from './arima/index.ts';
1
+ export * from '@xyo-network/diviner-forecasting/arima';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,wCAAwC,CAAA"}
@@ -1,48 +1,3 @@
1
- // src/arima/configurable/configurableArima.ts
2
- import ARIMA from "arima";
3
- var commonOpts = { verbose: false };
4
- var configurableArima = (opts = commonOpts, predictionSteps = 10) => {
5
- return (payloads, transformer) => {
6
- if (payloads.length === 0) return [];
7
- const values = payloads.map(transformer);
8
- const model = new ARIMA({ ...commonOpts, ...opts }).train(values);
9
- const predictions = model.predict(predictionSteps);
10
- return predictions[0].map((value, index) => {
11
- const error = predictions[1][index];
12
- return { error, value };
13
- });
14
- };
15
- };
16
-
17
- // src/arima/configured/arima.ts
18
- var arimaOpts = {
19
- d: 1,
20
- p: 2,
21
- q: 2
22
- };
23
- var arimaForecastingName = "arimaForecasting";
24
- var arimaForecastingMethod = configurableArima(arimaOpts);
25
-
26
- // src/arima/configured/seasonalArima.ts
27
- var seasonalArimaOpts = {
28
- D: 0,
29
- P: 1,
30
- Q: 1,
31
- d: 1,
32
- p: 2,
33
- q: 2,
34
- s: 12
35
- };
36
- var seasonalArimaForecastingName = "seasonalArimaForecasting";
37
- var seasonalArimaForecastingMethod = configurableArima(seasonalArimaOpts);
38
- export {
39
- arimaForecastingMethod,
40
- arimaForecastingName,
41
- arimaOpts,
42
- commonOpts,
43
- configurableArima,
44
- seasonalArimaForecastingMethod,
45
- seasonalArimaForecastingName,
46
- seasonalArimaOpts
47
- };
1
+ // src/index.ts
2
+ export * from "@xyo-network/diviner-forecasting/arima";
48
3
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/arima/configurable/configurableArima.ts", "../../src/arima/configured/arima.ts", "../../src/arima/configured/seasonalArima.ts"],
4
- "sourcesContent": ["import type {\n Forecast, ForecastingMethod, PayloadValueTransformer,\n} from '@xyo-network/diviner-forecasting-model'\nimport type { Payload } from '@xyo-network/sdk-protocol'\nimport type { ARIMAOptions } from 'arima'\nimport ARIMA from 'arima'\n\nexport const commonOpts: ARIMAOptions = { verbose: false }\n\nexport type PredictionPayload = Payload<{ error?: number; value: number }>\n\nexport const configurableArima = (opts: ARIMAOptions = commonOpts, predictionSteps = 10): ForecastingMethod => {\n return (payloads: Payload[], transformer: PayloadValueTransformer): Forecast[] => {\n // If there's no input, there's no prediction\n if (payloads.length === 0) return []\n // Transform all the values\n const values = payloads.map(transformer)\n // Train a model on the training set\n const model = new ARIMA({ ...commonOpts, ...opts }).train(values)\n // Use the trained model to predict the next N values\n const predictions = model.predict(predictionSteps)\n // Convert the predictions into payloads\n return predictions[0].map((value, index) => {\n const error = predictions[1][index]\n return { error, value }\n })\n }\n}\n", "import type { ForecastingMethod } from '@xyo-network/diviner-forecasting-model'\nimport type { ARIMAOptions } from 'arima'\n\nimport { configurableArima } from '../configurable/index.ts'\n\nexport const arimaOpts: ARIMAOptions = {\n d: 1, p: 2, q: 2,\n}\n\nexport const arimaForecastingName = 'arimaForecasting'\n\nexport const arimaForecastingMethod: ForecastingMethod = configurableArima(arimaOpts)\n", "import type { ForecastingMethod } from '@xyo-network/diviner-forecasting-model'\nimport type { ARIMAOptions } from 'arima'\n\nimport { configurableArima } from '../configurable/index.ts'\n\nexport const seasonalArimaOpts: ARIMAOptions = {\n D: 0, P: 1, Q: 1, d: 1, p: 2, q: 2, s: 12,\n}\n\nexport const seasonalArimaForecastingName = 'seasonalArimaForecasting'\n\nexport const seasonalArimaForecastingMethod: ForecastingMethod = configurableArima(seasonalArimaOpts)\n"],
5
- "mappings": ";AAKA,OAAO,WAAW;AAEX,IAAM,aAA2B,EAAE,SAAS,MAAM;AAIlD,IAAM,oBAAoB,CAAC,OAAqB,YAAY,kBAAkB,OAA0B;AAC7G,SAAO,CAAC,UAAqB,gBAAqD;AAEhF,QAAI,SAAS,WAAW,EAAG,QAAO,CAAC;AAEnC,UAAM,SAAS,SAAS,IAAI,WAAW;AAEvC,UAAM,QAAQ,IAAI,MAAM,EAAE,GAAG,YAAY,GAAG,KAAK,CAAC,EAAE,MAAM,MAAM;AAEhE,UAAM,cAAc,MAAM,QAAQ,eAAe;AAEjD,WAAO,YAAY,CAAC,EAAE,IAAI,CAAC,OAAO,UAAU;AAC1C,YAAM,QAAQ,YAAY,CAAC,EAAE,KAAK;AAClC,aAAO,EAAE,OAAO,MAAM;AAAA,IACxB,CAAC;AAAA,EACH;AACF;;;ACtBO,IAAM,YAA0B;AAAA,EACrC,GAAG;AAAA,EAAG,GAAG;AAAA,EAAG,GAAG;AACjB;AAEO,IAAM,uBAAuB;AAE7B,IAAM,yBAA4C,kBAAkB,SAAS;;;ACN7E,IAAM,oBAAkC;AAAA,EAC7C,GAAG;AAAA,EAAG,GAAG;AAAA,EAAG,GAAG;AAAA,EAAG,GAAG;AAAA,EAAG,GAAG;AAAA,EAAG,GAAG;AAAA,EAAG,GAAG;AACzC;AAEO,IAAM,+BAA+B;AAErC,IAAM,iCAAoD,kBAAkB,iBAAiB;",
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/diviner-forecasting/arima.\nexport * from '@xyo-network/diviner-forecasting/arima'\n"],
5
+ "mappings": ";AACA,cAAc;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
- "$schema": "http://json.schemastore.org/package.json",
3
2
  "name": "@xyo-network/diviner-forecasting-method-arima",
4
- "version": "7.2.2",
3
+ "version": "7.3.0",
5
4
  "description": "XYO Archivist",
5
+ "homepage": "https://xyo.network",
6
+ "bugs": {
7
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues",
8
+ "email": "support@xyo.network"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
13
+ },
6
14
  "license": "LGPL-3.0-only",
7
15
  "author": "Arie Trouw",
8
16
  "sideEffects": false,
@@ -22,21 +30,17 @@
22
30
  "README.md"
23
31
  ],
24
32
  "dependencies": {
25
- "@xyo-network/sdk-protocol": "~7.2.2",
26
- "arima": "~0.2.8",
27
- "@xyo-network/diviner-forecasting-model": "~7.2.2"
33
+ "@xyo-network/diviner-forecasting": "~7.3.0"
28
34
  },
29
35
  "devDependencies": {
30
- "@ariestools/sdk": "~8.1.6",
31
- "@ariestools/toolchain": "~8.7.26",
32
- "@ariestools/tsconfig": "~8.7.26",
33
- "@ariestools/vitest-extended": "~8.0.3",
36
+ "@ariestools/sdk": "~8.1.9",
37
+ "@ariestools/toolchain": "~9.1.1",
38
+ "@ariestools/tsconfig": "~9.1.1",
34
39
  "@opentelemetry/api": "~1.9.1",
35
- "eslint": "~10.8.0",
40
+ "@xyo-network/sdk-protocol": "~7.3.1",
41
+ "eslint": "~10.9.0",
36
42
  "eslint-import-resolver-typescript": "~4.4.5",
37
43
  "typescript": "~6.0.3",
38
- "vite": "~8.1.5",
39
- "vitest": "~4.1.10",
40
44
  "zod": "~4.4.3"
41
45
  },
42
46
  "engines": {
@@ -45,5 +49,5 @@
45
49
  "publishConfig": {
46
50
  "access": "public"
47
51
  },
48
- "sideeffects": false
52
+ "deprecated": "Use @xyo-network/diviner-forecasting/arima instead. This package is a compatibility shim only and will not receive further updates."
49
53
  }
@@ -1,10 +0,0 @@
1
- import type { ForecastingMethod } from '@xyo-network/diviner-forecasting-model';
2
- import type { Payload } from '@xyo-network/sdk-protocol';
3
- import type { ARIMAOptions } from 'arima';
4
- export declare const commonOpts: ARIMAOptions;
5
- export type PredictionPayload = Payload<{
6
- error?: number;
7
- value: number;
8
- }>;
9
- export declare const configurableArima: (opts?: ARIMAOptions, predictionSteps?: number) => ForecastingMethod;
10
- //# sourceMappingURL=configurableArima.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configurableArima.d.ts","sourceRoot":"","sources":["../../../../src/arima/configurable/configurableArima.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACA,iBAAiB,EAC5B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGzC,eAAO,MAAM,UAAU,EAAE,YAAiC,CAAA;AAE1D,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE1E,eAAO,MAAM,iBAAiB,GAAI,OAAM,YAAyB,EAAE,wBAAoB,KAAG,iBAgBzF,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './configurableArima.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/arima/configurable/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { ForecastingMethod } from '@xyo-network/diviner-forecasting-model';
2
- import type { ARIMAOptions } from 'arima';
3
- export declare const arimaOpts: ARIMAOptions;
4
- export declare const arimaForecastingName = "arimaForecasting";
5
- export declare const arimaForecastingMethod: ForecastingMethod;
6
- //# sourceMappingURL=arima.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arima.d.ts","sourceRoot":"","sources":["../../../../src/arima/configured/arima.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAIzC,eAAO,MAAM,SAAS,EAAE,YAEvB,CAAA;AAED,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAEtD,eAAO,MAAM,sBAAsB,EAAE,iBAAgD,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './arima.ts';
2
- export * from './seasonalArima.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/arima/configured/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { ForecastingMethod } from '@xyo-network/diviner-forecasting-model';
2
- import type { ARIMAOptions } from 'arima';
3
- export declare const seasonalArimaOpts: ARIMAOptions;
4
- export declare const seasonalArimaForecastingName = "seasonalArimaForecasting";
5
- export declare const seasonalArimaForecastingMethod: ForecastingMethod;
6
- //# sourceMappingURL=seasonalArima.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"seasonalArima.d.ts","sourceRoot":"","sources":["../../../../src/arima/configured/seasonalArima.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAIzC,eAAO,MAAM,iBAAiB,EAAE,YAE/B,CAAA;AAED,eAAO,MAAM,4BAA4B,6BAA6B,CAAA;AAEtE,eAAO,MAAM,8BAA8B,EAAE,iBAAwD,CAAA"}
@@ -1,3 +0,0 @@
1
- export * from './configurable/index.ts';
2
- export * from './configured/index.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/arima/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA"}