# tensorset

> TensorflowJS Dataset parsing and stringifying

Latest version **1.2.9** (published 2021-06-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install tensorset
pnpm add tensorset
yarn add tensorset
bun add tensorset
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.9 |
| Published | 2021-06-02 |
| First published | 2020-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Auger |
| Maintainers | swimauger |
| Keywords | Tensorflow, KNN Classifier, Dataset, Save, Load, Stringify, Parse |

## Links

- npm: https://www.npmjs.com/package/tensorset
- Repository: https://github.com/swimauger/tensorset
- Homepage: https://github.com/swimauger/tensorset#readme
- Issues: https://github.com/swimauger/tensorset/issues
- npm.io page: https://npm.io/package/tensorset

## Dependencies (1)

- [@tensorflow/tfjs](https://npm.io/package/@tensorflow/tfjs.md) ^2.0.1

## Recent versions

- 1.2.9 (latest) — 2021-06-02
- 1.2.8 — 2021-06-02
- 1.2.7 — 2021-06-02
- 1.2.6 — 2021-03-25
- 1.2.5 — 2021-03-04
- 1.2.4 — 2021-03-04
- 1.2.3 — 2021-03-04
- 1.2.2 — 2021-03-04
- 1.2.1 — 2021-03-04
- 1.2.0 — 2021-03-04
- 1.1.1 — 2021-03-04
- 1.1.0 — 2021-02-24
- 1.0.1 — 2020-07-18
- 1.0.0 — 2020-07-17

## README

# Tensorset

![](https://img.shields.io/npm/dw/tensorset?color=16697A&style=for-the-badge)
![](https://img.shields.io/npm/v/tensorset?color=DB6400&style=for-the-badge)
![](https://img.shields.io/github/license/swimauger/tensorset?color=FFA62B&style=for-the-badge)

TensorflowJS Dataset parsing and stringifying

## **Installation**

`npm install tensorset # or yarn add tensorset`

<br>

## **Getting Started**
```javascript
    // CommonJS
    const Tensorset = require('tensorset');

    // Or ES Modules
    import Tensorset from "tensorset/lib/Tensorset";
```

<br>

## parse (sync)
Parse stringified version of Tensorset generated by `Tensorset.stringify`
```JavaScript
    const dataset = Tensorset.parse(data);
```
| Parameter | Type     | Description                                                                   | Required |
| :-------: | :------: | :---------------------------------------------------------------------------- | :------: |
| data      | String   | Stringified tensorset file generated with assistance of `Tensorset.stringify` | True     |

## stringify (async)
Stringify tensorsets supplied by TensorflowJS models via the `getClassifierDataset` method in knnClassifier
```JavaScript
    const data = await Tensorset.stringify(dataset);
```
| Parameter | Type     | Description                              | Required |
| :-------: | :------: | :--------------------------------------- | :------: |
| dataset   | Object   | JSON parsed version of `Tensorset.parse` | True     |

---
_Source: https://npm.io/package/tensorset · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
