# dimred

> Dimensionality reduction methods

Latest version **0.0.3** (published 2021-07-31) · MIT license · 0 weekly downloads

## Install

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

Provides the command `dimred`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-07-31 |
| First published | 2020-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Anton Zemlyansky |
| Maintainers | zemlyansky |
| Keywords | feature-extraction, dimensionality-reduction, embedding, ml, statistics |

## Links

- npm: https://www.npmjs.com/package/dimred
- npm.io page: https://npm.io/package/dimred

## Dependencies (8)

- [tsne](https://npm.io/package/tsne.md) ^1.0.1
- [ml-pca](https://npm.io/package/ml-pca.md) ^4.0.1
- [ml-som](https://npm.io/package/ml-som.md) 0.0.6
- [umap-js](https://npm.io/package/umap-js.md) ^1.3.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [csv-parse](https://npm.io/package/csv-parse.md) ^4.8.9
- [ml-matrix](https://npm.io/package/ml-matrix.md) ^6.4.1
- [autoencoder](https://npm.io/package/autoencoder.md) 0.0.2

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 0.0.3 (latest) — 2021-07-31
- 0.0.2 — 2020-04-26
- 0.0.1 — 2020-04-26

## README

# Dimensionality reduction tools for browsers and Node.js

The `dimred` package is a wrapper around some dimensionality reduction methods implemented in JavaScript. It simplifies their API and makes it possible to try different algorithms without adapting data and code for each case. You can also use `dimred` via CLI to generate a lower-dimensional representation of a dataset without writing codeat all. 

### Supported dimensionality reduction methods
- **PCA** Princinpal Component Analysis (`pca`)
- **SOM** Self-Organizing Map (`som`)
- **tSNE** (`tsne`)
- **UMAP** (`umap`)
- **Autoencoder** (`ae` or `autoencoder`)

### Example
```javascript
const mkdata = require('mkdata')
const dimred = require('dimred')

// Generate a dataset with 1000 samples
// X: Array (1000, 10)
const [X, _] = mkdata.friedman1({
  'nSamples': 1000
}) 

// Run dimensionality reduction
// emb: Array (1000, 2)
const emb = dimred(X, {
  'method': 'pca',
  'dims': 2
}) 
```

### Web demo
All methods included in the **dimred** package are available online on [StatSim Vis](https://statsim.com/vis)

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