Socket
Socket
Sign inDemoInstall

dimred

Package Overview
Dependencies
14
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dimred

Dimensionality reduction methods


Version published
Maintainers
1
Install size
1.81 MB
Created

Readme

Source

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

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

Keywords

FAQs

Last updated on 31 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc