dataset-types 3.5.0 → 3.5.2

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/attention2.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dataset-types",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "scripts": {
5
5
  "start": "npm run build && npm run package",
6
6
  "build": "tsc --rootDir 'src/types' --outDir './dist'",
package/topology.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -63,7 +63,7 @@ export interface INetwork {
63
63
  tree: () => IValueData[];
64
64
  valueMatrix: () => IValueMatrix[];
65
65
  valueTopology: () => ITopology;
66
- valueTable: () => ITable;
66
+ valueTable: () => ITableData;
67
67
  toFullString: () => string;
68
68
  toShape: () => string;
69
69
  }
@@ -174,7 +174,7 @@ export interface IValueTransformerInstance {
174
174
  specification: ITransformerSpecification;
175
175
  model: IValueTransformer;
176
176
  }
177
- export interface ITable {
177
+ export interface ITableData {
178
178
  columns: string[];
179
179
  rows: any[];
180
180
  }
package/valuedata.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ /// Vector / Matrix
3
+ Object.defineProperty(exports, "__esModule", { value: true });
package/README.changes.md DELETED
@@ -1,54 +0,0 @@
1
- ## Version 3.4.0 2026-09-28
2
-
3
- Add Topology
4
-
5
- ## Version 3.3.0 2026-09-27
6
-
7
- Add ValueData types
8
-
9
- ## Version 3.2.11 2026-02-07
10
-
11
- Add datatypeLevels to IManageDataSetConfiguration
12
-
13
- ## Version 3.2.8 2025-01-09
14
-
15
- Add IFileResult as part of adding LocalFileService
16
-
17
- ## Version 3.2.7 2025-01-05
18
-
19
- Added level parameter to IFileService.
20
- Used in the READINESS implementation to store files at the tenancy versus at the project level
21
-
22
- ## Version 3.0.47 2025-11-27
23
-
24
- IFileService add context parameter
25
-
26
- ## Version 3.0.47 2025-11-27
27
-
28
- Add getContainerName function to IFileService
29
-
30
- ## Version 3.0.32
31
-
32
- Added
33
- ```
34
- export type IFileChoiceCallback = ()=> IFileSelection[]
35
-
36
- export interface IFileSelection {
37
- id: string
38
- name: string
39
- datasource: any
40
- }
41
- ```
42
- These support the ability to dependency inject a file choice and is used to validate functionality without have a dependency on a particular file
43
-
44
- ## Version 3.0.31
45
-
46
- Added
47
- ```
48
- export type IGetDataByIdsCallback = (ids: string[] ,datatype:string)=> IDatasetTable
49
- export type ICombineExistingAndUpdateCallback = (existing: IDatasetTable ,updates: IDatasetTable)=> IDatasetTable
50
- ```
51
-
52
- ## Version 3.0.28
53
-
54
- Add IDatasetTable, IDatasetsPackage and ICleanTransformCallback type
package/README.md DELETED
@@ -1,13 +0,0 @@
1
- # Dataset Types
2
-
3
- This project that maintains the common types for dataset applications.
4
-
5
- ## To build a new library and publish
6
-
7
- - run `npm start`
8
-
9
- - cd to dist directory
10
-
11
- - remove the _.tgz file `rm _.tgz`
12
-
13
- - run `npm publish` to publish to npm
package/dist/package.json DELETED
@@ -1,36 +0,0 @@
1
- {
2
- "name": "dataset-types",
3
- "version": "3.5.0",
4
- "scripts": {
5
- "start": "npm run build && npm run package",
6
- "build": "tsc --rootDir 'src/types' --outDir './dist'",
7
- "pretty": "prettier . --write",
8
- "package": "cp package.json dist;cd dist;npm pack"
9
- },
10
- "eslintConfig": {
11
- "extends": [
12
- "react-app",
13
- "react-app/jest"
14
- ]
15
- },
16
- "browserslist": {
17
- "production": [
18
- ">0.2%",
19
- "not dead",
20
- "not op_mini all"
21
- ],
22
- "development": [
23
- "last 1 chrome version",
24
- "last 1 firefox version",
25
- "last 1 safari version"
26
- ]
27
- },
28
- "devDependencies": {
29
- "nodemon": "^3.1.9",
30
- "prettier": "^3.4.2",
31
- "typescript": "^5.7.2"
32
- },
33
- "dependencies": {
34
- "mathjs": "^15.2.0"
35
- }
36
- }
@@ -1,288 +0,0 @@
1
- import { MathType, Matrix } from "mathjs";
2
- import {IVector, IMatrix} from './valuedata'
3
-
4
- export type INamedEmbedding = {
5
- key: string;
6
- vector?: IVector;
7
- row?: IVector;
8
- probability?: number;
9
- };
10
- export type IEmbedding = { [key: string]: IVector };
11
-
12
- export type IEmbeddingRecord = { [key: string]: IVector[] };
13
-
14
- export type INamedPrediction = { [key: string]: number };
15
-
16
- export type ISequenceEmbeddings = {
17
- names: () => string[];
18
- vectors: () => IVector[];
19
- seqmatrix: () => ISequenceMatrix;
20
- setColumn: (i: number, name: string, v: number[]) => void;
21
- getColumn: (i: number) => INamedEmbedding;
22
- describe: () => string;
23
- };
24
-
25
-
26
- export interface ISequenceMatrix {
27
- columns: () => number[][];
28
- setRow: (i: number, v: number[]) => void;
29
- setColumn: (i: number, v: number[]) => void;
30
- getColumn: (i: number) => number[];
31
- getRow: (i: number) => number[];
32
- getLastColumn: () => ISequenceMatrix;
33
- getColumnString: (i: number) => string;
34
- getRowString: (i: number) => string;
35
- getColumnMatrix: (i: number) => Matrix;
36
- getRowMatrix: (i: number) => Matrix;
37
- matrix: () => Matrix;
38
- rawmatrix: () => number[][];
39
- mask: () => ISequenceMatrix;
40
- dropout: () => ISequenceMatrix;
41
- layerNorm: () => ISequenceMatrix;
42
- softmax: () => ISequenceMatrix;
43
- transpose: () => ISequenceMatrix;
44
- dot: (other: ISequenceMatrix) => ISequenceMatrix;
45
- add: (other: ISequenceMatrix) => ISequenceMatrix;
46
- addColToColumns: (vector: ISequenceMatrix) => ISequenceMatrix;
47
- size: () => string;
48
- toString: () => string;
49
- getValue: (index: number[]) => number;
50
- asFocus: () => any[];
51
- }
52
-
53
- export interface IDenseLayer {
54
- forward: (x: MathType) => Matrix;
55
- backward: (loss: any) => MathType;
56
- inputs: () => number;
57
- neurons: () => number;
58
- weights: () => MathType;
59
- biases: () => MathType;
60
- activationFnName: () => string;
61
- dWeights: () => MathType;
62
- dBiases: () => MathType;
63
- setWeights: (w: MathType) => void;
64
- setBiases: (w: MathType) => void;
65
- }
66
-
67
- export interface IMLP {
68
- addLayer: (l: IDenseLayer) => void;
69
- layers: () => IDenseLayer[];
70
- forward: (x: Matrix) => Matrix;
71
- backward: (loss: any) => void;
72
- toString: () => string;
73
- }
74
-
75
- export interface ISGD {
76
- update: (layer: IDenseLayer) => void;
77
- learningRate: () => number;
78
- }
79
-
80
- export interface ITrainer {
81
- train: (eventcollector: any) => void;
82
- show: () => void;
83
- }
84
-
85
- export interface ITrainData {
86
- X_train: any;
87
- y_train: any;
88
- nSamples: number;
89
- nFeatures: number;
90
- }
91
-
92
- export interface ITransformerTraining {
93
- data: ITransformerExample[];
94
- }
95
-
96
- export interface ITransformerExample {
97
- context: string[];
98
- target: string;
99
- }
100
-
101
- export interface ITransformerSpecification {
102
- VOCAB_LENGTH: number;
103
- EMBEDDING_LENGTH: number;
104
- CONTEXT_LENGTH: number;
105
-
106
- KQ_LENGTH: number;
107
-
108
- V_UP_DOWN_LENGTH: number;
109
-
110
- OUTPUT_UP_LENGTH: number;
111
- OUTPUT_DOWN_LENGTH: number;
112
-
113
- ATTENTION_HEADS_SIZE: number;
114
- }
115
-
116
- export interface ITransformerModel {
117
- parameters: ITransformerSpecification;
118
- matrix_tokens: ISequenceMatrix;
119
- embeddings?: INamedEmbedding[];
120
-
121
- queries?: INamedEmbedding[];
122
- keys?: INamedEmbedding[];
123
-
124
- value_up?: INamedEmbedding[];
125
- value_down?: INamedEmbedding[];
126
-
127
- outputs_up?: INamedEmbedding[];
128
- outputs_bias?: INamedEmbedding[];
129
- outputs_down?: INamedEmbedding[];
130
-
131
- weights_prediction?: INamedEmbedding[];
132
- }
133
-
134
- export interface IModelSpecification {
135
- CONTEXT_SHAPE: number[];
136
- CONTEXT_SIZE: string;
137
- wQ_wK_SHAPE: number[];
138
- wQ_wK_SIZE: string;
139
-
140
- Q_SHAPE: number[];
141
- Q_SIZE: string;
142
- K_SHAPE: number[];
143
- K_SIZE: string;
144
-
145
- wVDown_SHAPE: number[];
146
- wVDown_SIZE: string;
147
-
148
- wVUp_SHAPE: number[];
149
- wVUp_SIZE: string;
150
-
151
- FOCUS_SHAPE: number[];
152
- FOCUS_SIZE: string;
153
-
154
- VDOWN_SHAPE: number[];
155
- VDOWN_SIZE: string;
156
- VUP_SHAPE: number[];
157
- VUP_SIZE: string;
158
-
159
- CHANGES_SHAPE: number[];
160
- CHANGES_SIZE: string;
161
-
162
- WOUTPUT_UP_SHAPE: number[];
163
- WOUTPUT_UP_SIZE: string;
164
-
165
- OUTPUT_UP_SHAPE: number[];
166
- OUTPUT_UP_SIZE: string;
167
-
168
- BIAS_SHAPE: number[];
169
- BIAS_SIZE: string;
170
-
171
- WOUTPUT_DOWN_SHAPE: number[];
172
- WOUTPUT_DOWN_SIZE: string;
173
-
174
- ENRICHED_SHAPE: number[];
175
- ENRICHED_SIZE: string;
176
-
177
- WPREDICTION_SHAPE: number[];
178
- WPREDICTION_SIZE: string;
179
-
180
- PREDICTION_SHAPE: number[];
181
- PREDICTION_SIZE: string;
182
-
183
- ATTENTION_HEADS_SIZE: string;
184
- PARAMETERS: {
185
- pQ: number;
186
- pK: number;
187
- pVUp: number;
188
- pVDown: number;
189
- pWUp: number;
190
- pWBias: number;
191
- pWDown: number;
192
- pWPrediction: number;
193
- total: number;
194
- };
195
- }
196
-
197
- export interface IAttention2Model {
198
- transformerModel: ITransformerModel;
199
- specifications: IModelSpecification;
200
-
201
- getMatrix_Tokens: () => ISequenceMatrix;
202
-
203
- getMatrix_Query: () => ISequenceMatrix;
204
- getMatrix_Key: () => ISequenceMatrix;
205
- getMatrix_ValueUp: () => ISequenceMatrix;
206
- getMatrix_ValueDown: () => ISequenceMatrix;
207
- getMatrix_OutputUp: () => ISequenceMatrix;
208
- getMatrix_OutputDown: () => ISequenceMatrix;
209
-
210
- validateInputs: (td: ITransformerExample) => void;
211
- forward: (context: string[], target: string) => IForwardResult;
212
- prediction: (
213
- context: string[],
214
- target: string,
215
- forwardresult: IForwardResult,
216
- ) => IForwardResult;
217
- }
218
-
219
- export type IAttention2ModelFactory = (
220
- transformerModel: ITransformerModel,
221
- ) => IAttention2Model;
222
-
223
-
224
- export interface IForwardResult {
225
- context: string[];
226
- target: string;
227
-
228
- // transformerModel: ITransformerModel;
229
-
230
- wQ_m: ISequenceMatrix;
231
- wK_m: ISequenceMatrix;
232
- wVDown_m: ISequenceMatrix;
233
- wVUp_m: ISequenceMatrix;
234
- wOUp_m: ISequenceMatrix;
235
- wOBias_m: ISequenceMatrix;
236
- wODown_m: ISequenceMatrix;
237
-
238
- wPrediction_m: ISequenceMatrix;
239
-
240
- X_m: ISequenceMatrix;
241
-
242
- Q_m: ISequenceMatrix;
243
- K_m: ISequenceMatrix;
244
- Qt_m: ISequenceMatrix;
245
- scores_m: ISequenceMatrix;
246
- scoresmasked_m: ISequenceMatrix;
247
- weights_m: ISequenceMatrix;
248
-
249
- XScaled_m: ISequenceMatrix;
250
- VDown_m: ISequenceMatrix;
251
- VUp_m: ISequenceMatrix;
252
- XContextualized_m: ISequenceMatrix;
253
- XContextualizedLayerNorm_m: ISequenceMatrix;
254
-
255
- O_Up_m: ISequenceMatrix;
256
- O_Bias_m: ISequenceMatrix;
257
- O_Down_m: ISequenceMatrix;
258
- O_Down_LayerNorm_m: ISequenceMatrix;
259
-
260
- LastColumn_m?: ISequenceMatrix;
261
- Prediction_m?: ISequenceMatrix;
262
- PredictionProb_m?: ISequenceMatrix;
263
-
264
- predictions?: INamedEmbedding[];
265
- }
266
-
267
- export interface IAttentionModelContextInputs {
268
- queries: INamedEmbedding[];
269
- keys: INamedEmbedding[];
270
- weights: INamedEmbedding[];
271
-
272
- outputs?: INamedEmbedding[];
273
-
274
- prediction_sequence: string[];
275
-
276
- context: number[];
277
-
278
- prediction: INamedPrediction;
279
- }
280
-
281
- export interface IAttentionModelInputs {
282
- useWeights: boolean;
283
- weights_key: Matrix;
284
- weights_query: Matrix;
285
- weights_value: Matrix;
286
-
287
- embeddings: INamedEmbedding[];
288
- }