@datagrok/eda 1.4.13 → 1.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/CHANGELOG.md +7 -5
- package/dist/111.js +1 -1
- package/dist/111.js.map +1 -1
- package/dist/128.js +1 -1
- package/dist/128.js.map +1 -1
- package/dist/153.js +1 -1
- package/dist/153.js.map +1 -1
- package/dist/23.js +1 -1
- package/dist/23.js.map +1 -1
- package/dist/234.js +1 -1
- package/dist/234.js.map +1 -1
- package/dist/242.js +1 -1
- package/dist/242.js.map +1 -1
- package/dist/260.js +1 -1
- package/dist/260.js.map +1 -1
- package/dist/33.js +1 -1
- package/dist/33.js.map +1 -1
- package/dist/348.js +1 -1
- package/dist/348.js.map +1 -1
- package/dist/377.js +1 -1
- package/dist/377.js.map +1 -1
- package/dist/397.js +2 -0
- package/dist/397.js.map +1 -0
- package/dist/412.js +1 -1
- package/dist/412.js.map +1 -1
- package/dist/415.js +1 -1
- package/dist/415.js.map +1 -1
- package/dist/501.js +1 -1
- package/dist/501.js.map +1 -1
- package/dist/531.js +1 -1
- package/dist/531.js.map +1 -1
- package/dist/583.js +1 -1
- package/dist/583.js.map +1 -1
- package/dist/589.js +1 -1
- package/dist/589.js.map +1 -1
- package/dist/603.js +1 -1
- package/dist/603.js.map +1 -1
- package/dist/656.js +1 -1
- package/dist/656.js.map +1 -1
- package/dist/682.js +1 -1
- package/dist/682.js.map +1 -1
- package/dist/705.js +1 -1
- package/dist/705.js.map +1 -1
- package/dist/727.js +1 -1
- package/dist/727.js.map +1 -1
- package/dist/731.js +1 -1
- package/dist/731.js.map +1 -1
- package/dist/738.js +1 -1
- package/dist/738.js.map +1 -1
- package/dist/763.js +1 -1
- package/dist/763.js.map +1 -1
- package/dist/778.js +1 -1
- package/dist/778.js.map +1 -1
- package/dist/783.js +1 -1
- package/dist/783.js.map +1 -1
- package/dist/793.js +1 -1
- package/dist/793.js.map +1 -1
- package/dist/810.js +1 -1
- package/dist/810.js.map +1 -1
- package/dist/860.js +1 -1
- package/dist/860.js.map +1 -1
- package/dist/907.js +1 -1
- package/dist/907.js.map +1 -1
- package/dist/950.js +1 -1
- package/dist/950.js.map +1 -1
- package/dist/980.js +1 -1
- package/dist/980.js.map +1 -1
- package/dist/990.js +1 -1
- package/dist/990.js.map +1 -1
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +5 -5
- package/src/package.ts +2 -1
- package/src/pareto-optimization/pareto-optimizer.ts +1 -1
- package/src/pls/pls-constants.ts +3 -1
- package/src/pls/pls-tools.ts +73 -69
- package/src/probabilistic-scoring/data-generator.ts +48 -3
- package/src/probabilistic-scoring/pmpo-defs.ts +30 -2
- package/src/probabilistic-scoring/pmpo-utils.ts +143 -52
- package/src/probabilistic-scoring/prob-scoring.ts +475 -102
- package/src/probabilistic-scoring/stat-tools.ts +1 -1
- package/src/tests/pareto-tests.ts +13 -15
- package/src/tests/pmpo-tests.ts +643 -3
- package/test-console-output-1.log +221 -93
- package/test-record-1.mp4 +0 -0
|
@@ -13,7 +13,7 @@ import {OPT_TYPE, NumericArray} from '../pareto-optimization/defs';
|
|
|
13
13
|
|
|
14
14
|
const TIMEOUT = 5000;
|
|
15
15
|
|
|
16
|
-
// Test dataset sizes
|
|
16
|
+
// Test dataset sizes
|
|
17
17
|
const ROWS_COUNT = 1000000;
|
|
18
18
|
const M = 1000000;
|
|
19
19
|
const COLS_COUNT = 2;
|
|
@@ -48,11 +48,11 @@ function generateSense(nDims: number, pattern: 'all-min' | 'all-max' | 'mixed'):
|
|
|
48
48
|
const sense: OPT_TYPE[] = [];
|
|
49
49
|
|
|
50
50
|
for (let d = 0; d < nDims; d++) {
|
|
51
|
-
if (pattern === 'all-min')
|
|
51
|
+
if (pattern === 'all-min')
|
|
52
52
|
sense.push(OPT_TYPE.MIN);
|
|
53
|
-
|
|
53
|
+
else if (pattern === 'all-max')
|
|
54
54
|
sense.push(OPT_TYPE.MAX);
|
|
55
|
-
|
|
55
|
+
else {
|
|
56
56
|
// Mixed: alternate between MIN and MAX
|
|
57
57
|
sense.push(d % 2 === 0 ? OPT_TYPE.MIN : OPT_TYPE.MAX);
|
|
58
58
|
}
|
|
@@ -68,31 +68,29 @@ function generateNullIndices(nPoints: number, nullRatio: number): Set<number> {
|
|
|
68
68
|
|
|
69
69
|
// Distribute null indices evenly
|
|
70
70
|
const step = Math.floor(nPoints / nullCount);
|
|
71
|
-
for (let i = 0; i < nullCount; i++)
|
|
71
|
+
for (let i = 0; i < nullCount; i++)
|
|
72
72
|
nullIndices.add(i * step);
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
|
|
75
75
|
return nullIndices;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/** Validates Pareto mask result */
|
|
79
79
|
function validateParetoMask(mask: boolean[], nPoints: number): void {
|
|
80
|
-
if (mask.length !== nPoints)
|
|
80
|
+
if (mask.length !== nPoints)
|
|
81
81
|
throw new Error(`Invalid mask length: expected ${nPoints}, got ${mask.length}`);
|
|
82
|
-
}
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
|
|
84
|
+
const optimalCount = mask.filter((x) => x).length;
|
|
85
|
+
if (optimalCount === 0)
|
|
86
86
|
throw new Error('No optimal points found');
|
|
87
|
-
}
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
|
|
89
|
+
if (optimalCount === nPoints)
|
|
90
90
|
grok.shell.warning('All points are optimal - data may be degenerate');
|
|
91
|
-
}
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
category('Pareto optimization', () => {
|
|
95
|
-
|
|
96
94
|
test(`Performance: ${DATASET_SIZE_LABEL}`, async () => {
|
|
97
95
|
let mask: boolean[] | null = null;
|
|
98
96
|
let error: Error | null = null;
|
|
@@ -246,7 +244,7 @@ category('Pareto optimization', () => {
|
|
|
246
244
|
|
|
247
245
|
expect(mask !== null, true, 'Failed to compute Pareto mask');
|
|
248
246
|
expect(mask!.length, 100, 'Should return mask with correct length');
|
|
249
|
-
const optimalCount = mask!.filter(x => x).length;
|
|
247
|
+
const optimalCount = mask!.filter((x) => x).length;
|
|
250
248
|
expect(optimalCount > 0, true, 'At least some identical points should be optimal');
|
|
251
249
|
expect(error === null, true, error?.message ?? '');
|
|
252
250
|
}, {timeout: TIMEOUT});
|