@datagrok/eda 1.4.3 → 1.4.4

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 (152) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/_d4c0.js +279 -0
  3. package/dist/_d4c0.js.map +1 -0
  4. package/dist/node_modules_datagrok-libraries_math_src_dbscan_wasm_clustering-worker_js.js +279 -0
  5. package/dist/node_modules_datagrok-libraries_math_src_dbscan_wasm_clustering-worker_js.js.map +1 -0
  6. package/dist/node_modules_datagrok-libraries_ml_src_MCL_mcl-sparse-matrix-mult-worker_js.js +59 -0
  7. package/dist/node_modules_datagrok-libraries_ml_src_MCL_mcl-sparse-matrix-mult-worker_js.js.map +1 -0
  8. package/dist/node_modules_datagrok-libraries_ml_src_distance-matrix_distance-matrix-worker_js.js +284 -0
  9. package/dist/node_modules_datagrok-libraries_ml_src_distance-matrix_distance-matrix-worker_js.js.map +1 -0
  10. package/dist/node_modules_datagrok-libraries_ml_src_distance-matrix_single-value-knn-worker_js.js +265 -0
  11. package/dist/node_modules_datagrok-libraries_ml_src_distance-matrix_single-value-knn-worker_js.js.map +1 -0
  12. package/dist/node_modules_datagrok-libraries_ml_src_distance-matrix_sparse-matrix-worker_js.js +287 -0
  13. package/dist/node_modules_datagrok-libraries_ml_src_distance-matrix_sparse-matrix-worker_js.js.map +1 -0
  14. package/dist/package-test.js +26140 -1
  15. package/dist/package-test.js.map +1 -1
  16. package/dist/package.js +30337 -1
  17. package/dist/package.js.map +1 -1
  18. package/dist/src_workers_softmax-worker_ts.js +154 -0
  19. package/dist/src_workers_softmax-worker_ts.js.map +1 -0
  20. package/dist/src_workers_tsne-worker_ts.js +244 -0
  21. package/dist/src_workers_tsne-worker_ts.js.map +1 -0
  22. package/dist/src_workers_umap-worker_ts.js +252 -0
  23. package/dist/src_workers_umap-worker_ts.js.map +1 -0
  24. package/dist/vendors-node_modules_datagrok-libraries_math_src_dbscan_wasm_dbscan_js.js +1253 -0
  25. package/dist/vendors-node_modules_datagrok-libraries_math_src_dbscan_wasm_dbscan_js.js.map +1 -0
  26. package/dist/vendors-node_modules_datagrok-libraries_math_src_hierarchical-clustering_wasm_clustering-worker_js.js +942 -0
  27. package/dist/vendors-node_modules_datagrok-libraries_math_src_hierarchical-clustering_wasm_clustering-worker_js.js.map +1 -0
  28. package/dist/vendors-node_modules_datagrok-libraries_math_src_webGPU_sparse-matrix_webGPU-sparse-matrix_js-07693f.js +1525 -0
  29. package/dist/vendors-node_modules_datagrok-libraries_math_src_webGPU_sparse-matrix_webGPU-sparse-matrix_js-07693f.js.map +1 -0
  30. package/dist/vendors-node_modules_datagrok-libraries_ml_src_MCL_mcl-worker_js-node_modules_datagrok-librar-e4203d.js +2244 -0
  31. package/dist/vendors-node_modules_datagrok-libraries_ml_src_MCL_mcl-worker_js-node_modules_datagrok-librar-e4203d.js.map +1 -0
  32. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_knn-threshold-worker_js.js +286 -0
  33. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_knn-threshold-worker_js.js.map +1 -0
  34. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_knn-worker_js.js +280 -0
  35. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_knn-worker_js.js.map +1 -0
  36. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_sparse-matrix-threshold-worker_js.js +282 -0
  37. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_sparse-matrix-threshold-worker_js.js.map +1 -0
  38. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_utils_js-node_modules_datagrok-72c7b2.js +1821 -0
  39. package/dist/vendors-node_modules_datagrok-libraries_ml_src_distance-matrix_utils_js-node_modules_datagrok-72c7b2.js.map +1 -0
  40. package/dist/vendors-node_modules_datagrok-libraries_ml_src_multi-column-dimensionality-reduction_mulit-co-3800a0.js +7776 -0
  41. package/dist/vendors-node_modules_datagrok-libraries_ml_src_multi-column-dimensionality-reduction_mulit-co-3800a0.js.map +1 -0
  42. package/dist/vendors-node_modules_keckelt_tsne_lib_index_js.js +379 -0
  43. package/dist/vendors-node_modules_keckelt_tsne_lib_index_js.js.map +1 -0
  44. package/dist/vendors-node_modules_ml-matrix_matrix_mjs.js +5946 -0
  45. package/dist/vendors-node_modules_ml-matrix_matrix_mjs.js.map +1 -0
  46. package/dist/vendors-node_modules_umap-js_dist_index_js.js +2284 -0
  47. package/dist/vendors-node_modules_umap-js_dist_index_js.js.map +1 -0
  48. package/dist/wasm_EDAForWebWorker_js-wasm_callWasmForWebWorker_js.js +779 -0
  49. package/dist/wasm_EDAForWebWorker_js-wasm_callWasmForWebWorker_js.js.map +1 -0
  50. package/dist/wasm_workers_errorWorker_js.js +267 -0
  51. package/dist/wasm_workers_errorWorker_js.js.map +1 -0
  52. package/dist/wasm_workers_fitLinearRegressionParamsWithDataNormalizingWorker_js.js +267 -0
  53. package/dist/wasm_workers_fitLinearRegressionParamsWithDataNormalizingWorker_js.js.map +1 -0
  54. package/dist/wasm_workers_fitLinearRegressionParamsWorker_js.js +267 -0
  55. package/dist/wasm_workers_fitLinearRegressionParamsWorker_js.js.map +1 -0
  56. package/dist/wasm_workers_fitSoftmaxWorker_js.js +267 -0
  57. package/dist/wasm_workers_fitSoftmaxWorker_js.js.map +1 -0
  58. package/dist/wasm_workers_generateDatasetWorker_js.js +267 -0
  59. package/dist/wasm_workers_generateDatasetWorker_js.js.map +1 -0
  60. package/dist/wasm_workers_normalizeDatasetWorker_js.js +267 -0
  61. package/dist/wasm_workers_normalizeDatasetWorker_js.js.map +1 -0
  62. package/dist/wasm_workers_partialLeastSquareRegressionWorker_js.js +267 -0
  63. package/dist/wasm_workers_partialLeastSquareRegressionWorker_js.js.map +1 -0
  64. package/dist/wasm_workers_predictByLSSVMWorker_js.js +267 -0
  65. package/dist/wasm_workers_predictByLSSVMWorker_js.js.map +1 -0
  66. package/dist/wasm_workers_principalComponentAnalysisNipalsWorker_js.js +267 -0
  67. package/dist/wasm_workers_principalComponentAnalysisNipalsWorker_js.js.map +1 -0
  68. package/dist/wasm_workers_principalComponentAnalysisWorkerUpd_js.js +271 -0
  69. package/dist/wasm_workers_principalComponentAnalysisWorkerUpd_js.js.map +1 -0
  70. package/dist/wasm_workers_trainAndAnalyzeLSSVMWorker_js.js +267 -0
  71. package/dist/wasm_workers_trainAndAnalyzeLSSVMWorker_js.js.map +1 -0
  72. package/dist/wasm_workers_trainLSSVMWorker_js.js +267 -0
  73. package/dist/wasm_workers_trainLSSVMWorker_js.js.map +1 -0
  74. package/dist/wasm_workers_xgboostWorker_js.js +279 -0
  75. package/dist/wasm_workers_xgboostWorker_js.js.map +1 -0
  76. package/package.json +5 -4
  77. package/src/package-api.ts +259 -0
  78. package/src/package.g.ts +522 -0
  79. package/src/package.ts +907 -678
  80. package/test-console-output-1.log +78 -93
  81. package/test-record-1.mp4 +0 -0
  82. package/tsconfig.json +2 -2
  83. package/webpack.config.js +5 -0
  84. package/dist/111.js +0 -2
  85. package/dist/111.js.map +0 -1
  86. package/dist/128.js +0 -2
  87. package/dist/128.js.map +0 -1
  88. package/dist/153.js +0 -2
  89. package/dist/153.js.map +0 -1
  90. package/dist/23.js +0 -2
  91. package/dist/23.js.map +0 -1
  92. package/dist/234.js +0 -2
  93. package/dist/234.js.map +0 -1
  94. package/dist/242.js +0 -2
  95. package/dist/242.js.map +0 -1
  96. package/dist/260.js +0 -2
  97. package/dist/260.js.map +0 -1
  98. package/dist/33.js +0 -2
  99. package/dist/33.js.map +0 -1
  100. package/dist/348.js +0 -2
  101. package/dist/348.js.map +0 -1
  102. package/dist/377.js +0 -2
  103. package/dist/377.js.map +0 -1
  104. package/dist/412.js +0 -2
  105. package/dist/412.js.map +0 -1
  106. package/dist/415.js +0 -2
  107. package/dist/415.js.map +0 -1
  108. package/dist/501.js +0 -2
  109. package/dist/501.js.map +0 -1
  110. package/dist/531.js +0 -2
  111. package/dist/531.js.map +0 -1
  112. package/dist/583.js +0 -2
  113. package/dist/583.js.map +0 -1
  114. package/dist/589.js +0 -2
  115. package/dist/589.js.map +0 -1
  116. package/dist/603.js +0 -2
  117. package/dist/603.js.map +0 -1
  118. package/dist/656.js +0 -2
  119. package/dist/656.js.map +0 -1
  120. package/dist/682.js +0 -2
  121. package/dist/682.js.map +0 -1
  122. package/dist/705.js +0 -2
  123. package/dist/705.js.map +0 -1
  124. package/dist/727.js +0 -2
  125. package/dist/727.js.map +0 -1
  126. package/dist/731.js +0 -2
  127. package/dist/731.js.map +0 -1
  128. package/dist/738.js +0 -3
  129. package/dist/738.js.LICENSE.txt +0 -51
  130. package/dist/738.js.map +0 -1
  131. package/dist/763.js +0 -2
  132. package/dist/763.js.map +0 -1
  133. package/dist/778.js +0 -2
  134. package/dist/778.js.map +0 -1
  135. package/dist/783.js +0 -2
  136. package/dist/783.js.map +0 -1
  137. package/dist/793.js +0 -2
  138. package/dist/793.js.map +0 -1
  139. package/dist/801.js +0 -2
  140. package/dist/801.js.map +0 -1
  141. package/dist/810.js +0 -2
  142. package/dist/810.js.map +0 -1
  143. package/dist/860.js +0 -2
  144. package/dist/860.js.map +0 -1
  145. package/dist/907.js +0 -2
  146. package/dist/907.js.map +0 -1
  147. package/dist/950.js +0 -2
  148. package/dist/950.js.map +0 -1
  149. package/dist/980.js +0 -2
  150. package/dist/980.js.map +0 -1
  151. package/dist/990.js +0 -2
  152. package/dist/990.js.map +0 -1
@@ -0,0 +1,154 @@
1
+ var eda;
2
+ /******/ (() => { // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ var __webpack_modules__ = ({
5
+
6
+ /***/ "./src/workers/softmax-worker.ts":
7
+ /*!***************************************!*\
8
+ !*** ./src/workers/softmax-worker.ts ***!
9
+ \***************************************/
10
+ /***/ (function() {
11
+
12
+
13
+ // Worker for softmax training
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ onmessage = function (evt) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const X = evt.data.features;
26
+ const transposedX = evt.data.transposed;
27
+ const Y = evt.data.oneHot;
28
+ const classesWeights = evt.data.classesWeights;
29
+ const iterations = evt.data.iterations;
30
+ const rate = evt.data.rate;
31
+ const penalty = evt.data.penalty;
32
+ const tolerance = evt.data.tolerance;
33
+ const targetRaw = evt.data.targetRaw;
34
+ let loss = 0;
35
+ let lossPrev = 0;
36
+ const n = transposedX.length;
37
+ const m = X.length;
38
+ const c = classesWeights.length;
39
+ // 1. Init params
40
+ // Xavier initialization scale value
41
+ const xavierScale = 2 * Math.sqrt(6.0 / (c + n));
42
+ const params = new Array(c);
43
+ for (let i = 0; i < c; ++i) {
44
+ const current = new Float32Array(n + 1);
45
+ // initialize bias, b
46
+ current[n] = 0;
47
+ //Xavier initialization of weights, w
48
+ for (let j = 0; j < n; ++j)
49
+ current[j] = (Math.random() - 0.5) * xavierScale;
50
+ params[i] = current;
51
+ }
52
+ // 2. Fitting
53
+ // Routine
54
+ let xBuf;
55
+ let wBuf;
56
+ let zBuf;
57
+ let sum;
58
+ let sumExp;
59
+ let yTrue;
60
+ let yPred;
61
+ let dWbuf;
62
+ const Z = new Array(m);
63
+ for (let i = 0; i < m; ++i)
64
+ Z[i] = new Float32Array(c);
65
+ const dZ = new Array(c);
66
+ for (let i = 0; i < c; ++i)
67
+ dZ[i] = new Float32Array(m);
68
+ const dW = new Array(c);
69
+ for (let i = 0; i < c; ++i)
70
+ dW[i] = new Float32Array(n + 1);
71
+ // Fitting
72
+ for (let iter = 0; iter < iterations; ++iter) {
73
+ // 2.1) Forward propagation
74
+ for (let j = 0; j < m; ++j) {
75
+ xBuf = X[j];
76
+ zBuf = Z[j];
77
+ sum = 0;
78
+ sumExp = 0;
79
+ for (let i = 0; i < c; ++i) {
80
+ wBuf = params[i];
81
+ sum = wBuf[n];
82
+ for (let k = 0; k < n; ++k)
83
+ sum += wBuf[k] * xBuf[k];
84
+ zBuf[i] = Math.exp(sum) * classesWeights[i];
85
+ sumExp += zBuf[i];
86
+ }
87
+ for (let i = 0; i < c; ++i)
88
+ zBuf[i] /= sumExp;
89
+ }
90
+ // 2.2) Loss
91
+ loss = 0;
92
+ for (let i = 0; i < m; ++i)
93
+ loss += -Math.log(Z[i][targetRaw[i]]);
94
+ loss /= m;
95
+ if (Math.abs(loss - lossPrev) < tolerance)
96
+ break;
97
+ lossPrev = loss;
98
+ // 2.3) Backward propagation
99
+ // 2.3.1) dZ
100
+ for (let j = 0; j < m; ++j) {
101
+ yPred = Z[j];
102
+ yTrue = Y[j];
103
+ for (let i = 0; i < c; ++i)
104
+ dZ[i][j] = yPred[i] - yTrue[i];
105
+ }
106
+ // 2.3.2) dB
107
+ for (let i = 0; i < c; ++i) {
108
+ sum = 0;
109
+ zBuf = dZ[i];
110
+ for (let j = 0; j < m; ++j)
111
+ sum += zBuf[j];
112
+ dW[i][n] = sum / m;
113
+ }
114
+ // 2.3.3) dW
115
+ for (let i = 0; i < c; ++i) {
116
+ zBuf = dZ[i];
117
+ wBuf = dW[i];
118
+ for (let j = 0; j < n; ++j) {
119
+ xBuf = transposedX[j];
120
+ sum = 0;
121
+ for (let k = 0; k < m; ++k)
122
+ sum += zBuf[k] * xBuf[k];
123
+ wBuf[j] = sum / m;
124
+ }
125
+ }
126
+ // 2.4) Update weights
127
+ for (let i = 0; i < c; ++i) {
128
+ wBuf = params[i];
129
+ dWbuf = dW[i];
130
+ for (let j = 0; j < n; ++j)
131
+ wBuf[j] = (1 - rate * penalty / m) * wBuf[j] - rate * dWbuf[j];
132
+ wBuf[n] -= rate * dWbuf[n];
133
+ }
134
+ } // for iter
135
+ postMessage({ 'params': params, 'loss': loss });
136
+ });
137
+ };
138
+
139
+
140
+ /***/ })
141
+
142
+ /******/ });
143
+ /************************************************************************/
144
+ /******/
145
+ /******/ // startup
146
+ /******/ // Load entry module and return exports
147
+ /******/ // This entry module is referenced by other modules so it can't be inlined
148
+ /******/ var __webpack_exports__ = {};
149
+ /******/ __webpack_modules__["./src/workers/softmax-worker.ts"]();
150
+ /******/ eda = __webpack_exports__;
151
+ /******/
152
+ /******/ })()
153
+ ;
154
+ //# sourceMappingURL=src_workers_softmax-worker_ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src_workers_softmax-worker_ts.js","mappings":";;;;;;;;;;;;AAAA,8BAA8B;;;;;;;;;;AAE9B,SAAS,GAAG,UAAe,GAAG;;QAC5B,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC5B,MAAM,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QACxC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1B,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;QAC/C,MAAM,UAAU,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QACvC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QACjC,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QACrC,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QACrC,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,QAAQ,GAAG,CAAC,CAAC;QAEjB,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC;QAC7B,MAA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AG,KAAK,CAAC,CAAC,CAAC,CAAC;gBAEjE,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC,WAAW;QAEb,WAAW,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;IAChD,CAAC;CAAA,CAAC;;;;;;;;UEjJF;UACA;UACA;UACA;UACA","sources":["webpack://eda/./src/workers/softmax-worker.ts","webpack://eda/webpack/before-startup","webpack://eda/webpack/startup","webpack://eda/webpack/after-startup"],"sourcesContent":["// Worker for softmax training\n\nonmessage = async function(evt) {\n const X = evt.data.features;\n const transposedX = evt.data.transposed;\n const Y = evt.data.oneHot;\n const classesWeights = evt.data.classesWeights;\n const iterations = evt.data.iterations;\n const rate = evt.data.rate;\n const penalty = evt.data.penalty;\n const tolerance = evt.data.tolerance;\n const targetRaw = evt.data.targetRaw;\n let loss = 0;\n let lossPrev = 0;\n\n const n = transposedX.length;\n const m = X.length;\n const c = classesWeights.length;\n\n // 1. Init params\n // Xavier initialization scale value\n const xavierScale = 2 * Math.sqrt(6.0 / (c + n));\n const params = new Array<Float32Array>(c);\n for (let i = 0; i < c; ++i) {\n const current = new Float32Array(n + 1);\n\n // initialize bias, b\n current[n] = 0;\n\n //Xavier initialization of weights, w\n for (let j = 0; j < n; ++j)\n current[j] = (Math.random() - 0.5) * xavierScale;\n\n params[i] = current;\n }\n\n // 2. Fitting\n\n // Routine\n let xBuf: Float32Array;\n let wBuf: Float32Array;\n let zBuf: Float32Array;\n let sum: number;\n let sumExp: number;\n let yTrue: Uint8Array;\n let yPred: Float32Array;\n let dWbuf: Float32Array;\n const Z = new Array<Float32Array>(m);\n for (let i = 0; i < m; ++i)\n Z[i] = new Float32Array(c);\n const dZ = new Array<Float32Array>(c);\n for (let i = 0; i < c; ++i)\n dZ[i] = new Float32Array(m);\n const dW = new Array<Float32Array>(c);\n for (let i = 0; i < c; ++i)\n dW[i] = new Float32Array(n + 1);\n\n // Fitting\n for (let iter = 0; iter < iterations; ++iter) {\n // 2.1) Forward propagation\n for (let j = 0; j < m; ++j) {\n xBuf = X[j];\n zBuf = Z[j];\n sum = 0;\n sumExp = 0;\n\n for (let i = 0; i < c; ++i) {\n wBuf = params[i];\n sum = wBuf[n];\n\n for (let k = 0; k < n; ++k)\n sum += wBuf[k] * xBuf[k];\n\n zBuf[i] = Math.exp(sum) * classesWeights[i];\n sumExp += zBuf[i];\n }\n\n for (let i = 0; i < c; ++i)\n zBuf[i] /= sumExp;\n }\n\n // 2.2) Loss\n loss = 0;\n\n for (let i = 0; i < m; ++i)\n loss += -Math.log(Z[i][targetRaw[i]]);\n\n loss /= m;\n\n if (Math.abs(loss - lossPrev) < tolerance)\n break;\n\n lossPrev = loss;\n\n // 2.3) Backward propagation\n\n // 2.3.1) dZ\n for (let j = 0; j < m; ++j) {\n yPred = Z[j];\n yTrue = Y[j];\n\n for (let i = 0; i < c; ++i)\n dZ[i][j] = yPred[i] - yTrue[i];\n }\n\n // 2.3.2) dB\n for (let i = 0; i < c; ++i) {\n sum = 0;\n zBuf = dZ[i];\n\n for (let j = 0; j < m; ++j)\n sum += zBuf[j];\n\n dW[i][n] = sum / m;\n }\n\n // 2.3.3) dW\n for (let i = 0; i < c; ++i) {\n zBuf = dZ[i];\n wBuf = dW[i];\n\n for (let j = 0; j < n; ++j) {\n xBuf = transposedX[j];\n\n sum = 0;\n for (let k = 0; k < m; ++k)\n sum += zBuf[k] * xBuf[k];\n\n wBuf[j] = sum / m;\n }\n }\n\n // 2.4) Update weights\n for (let i = 0; i < c; ++i) {\n wBuf = params[i];\n dWbuf = dW[i];\n\n for (let j = 0; j < n; ++j)\n wBuf[j] = (1 - rate * penalty / m) * wBuf[j] - rate * dWbuf[j];\n\n wBuf[n] -= rate * dWbuf[n];\n }\n } // for iter\n\n postMessage({'params': params, 'loss': loss});\n};\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[\"./src/workers/softmax-worker.ts\"]();\n",""],"names":[],"sourceRoot":""}
@@ -0,0 +1,244 @@
1
+ var eda;
2
+ /******/ (() => { // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ var __webpack_modules__ = ({
5
+
6
+ /***/ "./src/workers/tsne-worker.ts":
7
+ /*!************************************!*\
8
+ !*** ./src/workers/tsne-worker.ts ***!
9
+ \************************************/
10
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11
+
12
+ __webpack_require__.r(__webpack_exports__);
13
+ /* harmony import */ var _keckelt_tsne__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @keckelt/tsne */ "./node_modules/@keckelt/tsne/lib/index.js");
14
+ // Worker for the method t-SNE
15
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+
25
+ onmessage = function (evt) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ const tsne = new _keckelt_tsne__WEBPACK_IMPORTED_MODULE_0__.TSNE({
28
+ epsilon: evt.data.options.learningRate,
29
+ perplexity: evt.data.options.perplexity,
30
+ dim: evt.data.options.components,
31
+ });
32
+ tsne.initDataRaw(evt.data.data);
33
+ const iterCount = evt.data.options.iterations;
34
+ for (let i = 0; i < iterCount; ++i)
35
+ tsne.step();
36
+ postMessage({ 'embeddings': tsne.getSolution() });
37
+ });
38
+ };
39
+
40
+
41
+ /***/ })
42
+
43
+ /******/ });
44
+ /************************************************************************/
45
+ /******/ // The module cache
46
+ /******/ var __webpack_module_cache__ = {};
47
+ /******/
48
+ /******/ // The require function
49
+ /******/ function __webpack_require__(moduleId) {
50
+ /******/ // Check if module is in cache
51
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
52
+ /******/ if (cachedModule !== undefined) {
53
+ /******/ return cachedModule.exports;
54
+ /******/ }
55
+ /******/ // Create a new module (and put it into the cache)
56
+ /******/ var module = __webpack_module_cache__[moduleId] = {
57
+ /******/ // no module.id needed
58
+ /******/ // no module.loaded needed
59
+ /******/ exports: {}
60
+ /******/ };
61
+ /******/
62
+ /******/ // Execute the module function
63
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
64
+ /******/
65
+ /******/ // Return the exports of the module
66
+ /******/ return module.exports;
67
+ /******/ }
68
+ /******/
69
+ /******/ // expose the modules object (__webpack_modules__)
70
+ /******/ __webpack_require__.m = __webpack_modules__;
71
+ /******/
72
+ /******/ // the startup function
73
+ /******/ __webpack_require__.x = () => {
74
+ /******/ // Load entry module and return exports
75
+ /******/ // This entry module depends on other loaded chunks and execution need to be delayed
76
+ /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["vendors-node_modules_keckelt_tsne_lib_index_js"], () => (__webpack_require__("./src/workers/tsne-worker.ts")))
77
+ /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
78
+ /******/ return __webpack_exports__;
79
+ /******/ };
80
+ /******/
81
+ /************************************************************************/
82
+ /******/ /* webpack/runtime/chunk loaded */
83
+ /******/ (() => {
84
+ /******/ var deferred = [];
85
+ /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
86
+ /******/ if(chunkIds) {
87
+ /******/ priority = priority || 0;
88
+ /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
89
+ /******/ deferred[i] = [chunkIds, fn, priority];
90
+ /******/ return;
91
+ /******/ }
92
+ /******/ var notFulfilled = Infinity;
93
+ /******/ for (var i = 0; i < deferred.length; i++) {
94
+ /******/ var [chunkIds, fn, priority] = deferred[i];
95
+ /******/ var fulfilled = true;
96
+ /******/ for (var j = 0; j < chunkIds.length; j++) {
97
+ /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
98
+ /******/ chunkIds.splice(j--, 1);
99
+ /******/ } else {
100
+ /******/ fulfilled = false;
101
+ /******/ if(priority < notFulfilled) notFulfilled = priority;
102
+ /******/ }
103
+ /******/ }
104
+ /******/ if(fulfilled) {
105
+ /******/ deferred.splice(i--, 1)
106
+ /******/ var r = fn();
107
+ /******/ if (r !== undefined) result = r;
108
+ /******/ }
109
+ /******/ }
110
+ /******/ return result;
111
+ /******/ };
112
+ /******/ })();
113
+ /******/
114
+ /******/ /* webpack/runtime/ensure chunk */
115
+ /******/ (() => {
116
+ /******/ __webpack_require__.f = {};
117
+ /******/ // This file contains only the entry chunk.
118
+ /******/ // The chunk loading function for additional chunks
119
+ /******/ __webpack_require__.e = (chunkId) => {
120
+ /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
121
+ /******/ __webpack_require__.f[key](chunkId, promises);
122
+ /******/ return promises;
123
+ /******/ }, []));
124
+ /******/ };
125
+ /******/ })();
126
+ /******/
127
+ /******/ /* webpack/runtime/get javascript chunk filename */
128
+ /******/ (() => {
129
+ /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint
130
+ /******/ __webpack_require__.u = (chunkId) => {
131
+ /******/ // return url for filenames based on template
132
+ /******/ return "" + chunkId + ".js";
133
+ /******/ };
134
+ /******/ })();
135
+ /******/
136
+ /******/ /* webpack/runtime/global */
137
+ /******/ (() => {
138
+ /******/ __webpack_require__.g = (function() {
139
+ /******/ if (typeof globalThis === 'object') return globalThis;
140
+ /******/ try {
141
+ /******/ return this || new Function('return this')();
142
+ /******/ } catch (e) {
143
+ /******/ if (typeof window === 'object') return window;
144
+ /******/ }
145
+ /******/ })();
146
+ /******/ })();
147
+ /******/
148
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
149
+ /******/ (() => {
150
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
151
+ /******/ })();
152
+ /******/
153
+ /******/ /* webpack/runtime/make namespace object */
154
+ /******/ (() => {
155
+ /******/ // define __esModule on exports
156
+ /******/ __webpack_require__.r = (exports) => {
157
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
158
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
159
+ /******/ }
160
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
161
+ /******/ };
162
+ /******/ })();
163
+ /******/
164
+ /******/ /* webpack/runtime/publicPath */
165
+ /******/ (() => {
166
+ /******/ var scriptUrl;
167
+ /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
168
+ /******/ var document = __webpack_require__.g.document;
169
+ /******/ if (!scriptUrl && document) {
170
+ /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
171
+ /******/ scriptUrl = document.currentScript.src;
172
+ /******/ if (!scriptUrl) {
173
+ /******/ var scripts = document.getElementsByTagName("script");
174
+ /******/ if(scripts.length) {
175
+ /******/ var i = scripts.length - 1;
176
+ /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
177
+ /******/ }
178
+ /******/ }
179
+ /******/ }
180
+ /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
181
+ /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
182
+ /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
183
+ /******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
184
+ /******/ __webpack_require__.p = scriptUrl;
185
+ /******/ })();
186
+ /******/
187
+ /******/ /* webpack/runtime/importScripts chunk loading */
188
+ /******/ (() => {
189
+ /******/ // no baseURI
190
+ /******/
191
+ /******/ // object to store loaded chunks
192
+ /******/ // "1" means "already loaded"
193
+ /******/ var installedChunks = {
194
+ /******/ "src_workers_tsne-worker_ts": 1
195
+ /******/ };
196
+ /******/
197
+ /******/ // importScripts chunk loading
198
+ /******/ var installChunk = (data) => {
199
+ /******/ var [chunkIds, moreModules, runtime] = data;
200
+ /******/ for(var moduleId in moreModules) {
201
+ /******/ if(__webpack_require__.o(moreModules, moduleId)) {
202
+ /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
203
+ /******/ }
204
+ /******/ }
205
+ /******/ if(runtime) runtime(__webpack_require__);
206
+ /******/ while(chunkIds.length)
207
+ /******/ installedChunks[chunkIds.pop()] = 1;
208
+ /******/ parentChunkLoadingFunction(data);
209
+ /******/ };
210
+ /******/ __webpack_require__.f.i = (chunkId, promises) => {
211
+ /******/ // "1" is the signal for "already loaded"
212
+ /******/ if(!installedChunks[chunkId]) {
213
+ /******/ if(true) { // all chunks have JS
214
+ /******/ importScripts(__webpack_require__.p + __webpack_require__.u(chunkId));
215
+ /******/ }
216
+ /******/ }
217
+ /******/ };
218
+ /******/
219
+ /******/ var chunkLoadingGlobal = self["webpackChunkeda"] = self["webpackChunkeda"] || [];
220
+ /******/ var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);
221
+ /******/ chunkLoadingGlobal.push = installChunk;
222
+ /******/
223
+ /******/ // no HMR
224
+ /******/
225
+ /******/ // no HMR manifest
226
+ /******/ })();
227
+ /******/
228
+ /******/ /* webpack/runtime/startup chunk dependencies */
229
+ /******/ (() => {
230
+ /******/ var next = __webpack_require__.x;
231
+ /******/ __webpack_require__.x = () => {
232
+ /******/ return __webpack_require__.e("vendors-node_modules_keckelt_tsne_lib_index_js").then(next);
233
+ /******/ };
234
+ /******/ })();
235
+ /******/
236
+ /************************************************************************/
237
+ /******/
238
+ /******/ // run startup
239
+ /******/ var __webpack_exports__ = __webpack_require__.x();
240
+ /******/ eda = __webpack_exports__;
241
+ /******/
242
+ /******/ })()
243
+ ;
244
+ //# sourceMappingURL=src_workers_tsne-worker_ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src_workers_tsne-worker_ts.js","mappings":";;;;;;;;;;;;;AAAA,8BAA8B;;;;;;;;;;AAEK;AAEnC,SAAS,GAAG,UAAe,GAAG;;QAC5B,MAAM,IAAI,GAAG,IAAI,+CAAI,CAAC;YACpB,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY;YACtC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU;YACvC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU;SACjC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhC,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QAE9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QAEd,WAAW,CAAC,EAAC,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE,EAAC,CAAC,CAAC;IAClD,CAAC;CAAA,CAAC;;;;;;;UCnBF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;;;;WClCA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF,E;;;;;WCRA;WACA;WACA;WACA;WACA,E;;;;;WCJA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC,I;;;;;WCPD,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,kC;;;;;WClBA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,aAAa;WACb;WACA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;;WAEA,kB;;;;;WCpCA;WACA;WACA;WACA,E;;;;;UEHA;UACA","sources":["webpack://eda/./src/workers/tsne-worker.ts","webpack://eda/webpack/bootstrap","webpack://eda/webpack/runtime/chunk loaded","webpack://eda/webpack/runtime/ensure chunk","webpack://eda/webpack/runtime/get javascript chunk filename","webpack://eda/webpack/runtime/global","webpack://eda/webpack/runtime/hasOwnProperty shorthand","webpack://eda/webpack/runtime/make namespace object","webpack://eda/webpack/runtime/publicPath","webpack://eda/webpack/runtime/importScripts chunk loading","webpack://eda/webpack/runtime/startup chunk dependencies","webpack://eda/webpack/before-startup","webpack://eda/webpack/startup","webpack://eda/webpack/after-startup"],"sourcesContent":["// Worker for the method t-SNE\n\nimport {TSNE} from '@keckelt/tsne';\n\nonmessage = async function(evt) {\n const tsne = new TSNE({\n epsilon: evt.data.options.learningRate,\n perplexity: evt.data.options.perplexity,\n dim: evt.data.options.components,\n });\n\n tsne.initDataRaw(evt.data.data);\n\n const iterCount = evt.data.options.iterations;\n\n for (let i = 0; i < iterCount; ++i)\n tsne.step();\n\n postMessage({'embeddings': tsne.getSolution()});\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_keckelt_tsne_lib_index_js\"], () => (__webpack_require__(\"./src/workers/tsne-worker.ts\")))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t\"src_workers_tsne-worker_ts\": 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkeda\"] = self[\"webpackChunkeda\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(\"vendors-node_modules_keckelt_tsne_lib_index_js\").then(next);\n};","","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":[],"sourceRoot":""}