@datagrok/eda 1.4.13 → 1.5.1

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.
Files changed (87) hide show
  1. package/CHANGELOG.md +11 -5
  2. package/dist/111.js +1 -1
  3. package/dist/111.js.map +1 -1
  4. package/dist/128.js +1 -1
  5. package/dist/128.js.map +1 -1
  6. package/dist/153.js +1 -1
  7. package/dist/153.js.map +1 -1
  8. package/dist/23.js +1 -1
  9. package/dist/23.js.map +1 -1
  10. package/dist/234.js +1 -1
  11. package/dist/234.js.map +1 -1
  12. package/dist/242.js +1 -1
  13. package/dist/242.js.map +1 -1
  14. package/dist/260.js +1 -1
  15. package/dist/260.js.map +1 -1
  16. package/dist/33.js +1 -1
  17. package/dist/33.js.map +1 -1
  18. package/dist/348.js +1 -1
  19. package/dist/348.js.map +1 -1
  20. package/dist/377.js +1 -1
  21. package/dist/377.js.map +1 -1
  22. package/dist/397.js +2 -0
  23. package/dist/397.js.map +1 -0
  24. package/dist/412.js +1 -1
  25. package/dist/412.js.map +1 -1
  26. package/dist/415.js +1 -1
  27. package/dist/415.js.map +1 -1
  28. package/dist/501.js +1 -1
  29. package/dist/501.js.map +1 -1
  30. package/dist/531.js +1 -1
  31. package/dist/531.js.map +1 -1
  32. package/dist/583.js +1 -1
  33. package/dist/583.js.map +1 -1
  34. package/dist/589.js +1 -1
  35. package/dist/589.js.map +1 -1
  36. package/dist/603.js +1 -1
  37. package/dist/603.js.map +1 -1
  38. package/dist/656.js +1 -1
  39. package/dist/656.js.map +1 -1
  40. package/dist/682.js +1 -1
  41. package/dist/682.js.map +1 -1
  42. package/dist/705.js +1 -1
  43. package/dist/705.js.map +1 -1
  44. package/dist/727.js +1 -1
  45. package/dist/727.js.map +1 -1
  46. package/dist/731.js +1 -1
  47. package/dist/731.js.map +1 -1
  48. package/dist/738.js +1 -1
  49. package/dist/738.js.map +1 -1
  50. package/dist/763.js +1 -1
  51. package/dist/763.js.map +1 -1
  52. package/dist/778.js +1 -1
  53. package/dist/778.js.map +1 -1
  54. package/dist/783.js +1 -1
  55. package/dist/783.js.map +1 -1
  56. package/dist/793.js +1 -1
  57. package/dist/793.js.map +1 -1
  58. package/dist/810.js +1 -1
  59. package/dist/810.js.map +1 -1
  60. package/dist/860.js +1 -1
  61. package/dist/860.js.map +1 -1
  62. package/dist/907.js +1 -1
  63. package/dist/907.js.map +1 -1
  64. package/dist/950.js +1 -1
  65. package/dist/950.js.map +1 -1
  66. package/dist/980.js +1 -1
  67. package/dist/980.js.map +1 -1
  68. package/dist/990.js +1 -1
  69. package/dist/990.js.map +1 -1
  70. package/dist/package-test.js +1 -1
  71. package/dist/package-test.js.map +1 -1
  72. package/dist/package.js +1 -1
  73. package/dist/package.js.map +1 -1
  74. package/package.json +5 -5
  75. package/src/package.ts +2 -1
  76. package/src/pareto-optimization/pareto-optimizer.ts +1 -1
  77. package/src/pls/pls-constants.ts +8 -1
  78. package/src/pls/pls-tools.ts +176 -74
  79. package/src/probabilistic-scoring/data-generator.ts +48 -3
  80. package/src/probabilistic-scoring/pmpo-defs.ts +30 -2
  81. package/src/probabilistic-scoring/pmpo-utils.ts +143 -52
  82. package/src/probabilistic-scoring/prob-scoring.ts +477 -104
  83. package/src/probabilistic-scoring/stat-tools.ts +1 -1
  84. package/src/tests/pareto-tests.ts +13 -15
  85. package/src/tests/pmpo-tests.ts +643 -3
  86. package/test-console-output-1.log +224 -86
  87. package/test-record-1.mp4 +0 -0
@@ -1,5 +1,5 @@
1
1
  // Probabilistic scoring (pMPO) statistical tools
2
- // Link: https://pmc.ncbi.nlm.nih.gov/articles/PMC4716604/
2
+ // Link https://pmc.ncbi.nlm.nih.gov/articles/PMC4716604/
3
3
 
4
4
  import * as grok from 'datagrok-api/grok';
5
5
  import * as ui from 'datagrok-api/ui';
@@ -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
- } else if (pattern === 'all-max') {
53
+ else if (pattern === 'all-max')
54
54
  sense.push(OPT_TYPE.MAX);
55
- } else {
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
- const optimalCount = mask.filter(x => x).length;
85
- if (optimalCount === 0) {
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
- if (optimalCount === nPoints) {
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});