0.3.3 • Published 8 months ago

wasm-bhtsne v0.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

License: MIT

This is the wasm version of the bhtsne crate.

Parallel implementations of Barnes-Hut and exact implementations of the t-SNE algorithm written in Rust to run in wasm. The tree-accelerated version of the algorithm is described with fine detail in this paper by Laurens van der Maaten. The exact, original, version of the algorithm is described in this other paper by G. Hinton and Laurens van der Maaten. Additional implementations of the algorithm, are listed at this page.

Installation

npm i wasm-bhtsne

Example

import init, { tSNE } from "wasm_bhtsne";

await init();

function createRandomMatrix(rows, columns) {
    return Array.from({ length: rows }, () =>
        Array.from({ length: columns }, () => Math.random())
    );
}

// create random points and dimensions
const data = createRandomMatrix(500, 4);

const tsne_encoder = new tSNE(data);

// as argument the number of epochs,
const compressed_vectors = tsne_encoder.barnes_hut(1000);

console.log("Compressed Vectors:", compressed_vectors);
0.3.3

8 months ago

0.3.2

8 months ago

0.3.1

8 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago