wasm-bhtsne 0.3.2 → 0.3.3

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/README.md CHANGED
@@ -19,7 +19,9 @@ npm i wasm-bhtsne
19
19
  ### Example
20
20
 
21
21
  ```javascript
22
- import { tSNE } from "wasm-bhtsne";
22
+ import init, { tSNE } from "wasm_bhtsne";
23
+
24
+ await init();
23
25
 
24
26
  function createRandomMatrix(rows, columns) {
25
27
  return Array.from({ length: rows }, () =>
@@ -28,14 +30,13 @@ function createRandomMatrix(rows, columns) {
28
30
  }
29
31
 
30
32
  // create random points and dimensions
31
- const data = createRandomMatrix(5000, 512);
33
+ const data = createRandomMatrix(500, 4);
32
34
 
33
35
  const tsne_encoder = new tSNE(data);
34
36
 
35
- let compressed_vectors = []
36
-
37
37
  // as argument the number of epochs,
38
- compressed_vectors = tsne_encoder.barnes_hut(1000);
38
+ const compressed_vectors = tsne_encoder.barnes_hut(1000);
39
39
 
40
40
  console.log("Compressed Vectors:", compressed_vectors);
41
+
41
42
  ```
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "lv291 <baiunco291@proton.me>"
5
5
  ],
6
6
  "description": "Exact and Barnes-Hut implementations of t-SNE in wasm",
7
- "version": "0.3.2",
7
+ "version": "0.3.3",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
Binary file