Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stitch-ml

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stitch-ml

An experimental machine learning library written in Javascript.

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Stitch ML

This package is still in Alpha. All future versions are subject to breaking changes until the official first version, at which point the full documentation will be released and Semantic Versioning will be used.

Stitch ML is an experimental machine learning library written in pure Javascript.

Overview

Installation

npm install stitch-ml --save

Usage

With CommonJS:

const StitchML = require('stitch-ml');

With ES Modules:

import StitchML from 'stitch-ml';

Input Data Format

0 <= x <= 1

[
  {
    "input": [x, x, x, x, x, x, ...],
    "output": [x, x, x, x, ...]
  },
  ...
]

Examples

// Create a new network
const network = new StitchML.Network({
  structure: [784, 100, 10],
});

// Train the network for one epoch
network.train({ data: trainingData });

// Predict a single point
network.predict(input);

// Save the network
const modelToSave = network.save();
fs.writeFileSync('model.json', JSON.stringify(modelToSave));

// Load a network
const modelToLoad = JSON.parse(fs.readFileSync('model.json'));
const networkFromModel = new Stitch.Network(modelToLoad);

Performance

MNIST
Dataset: MNIST Handwritten Digits
Device: 2014 Macbook Pro, 2.5 GHz Quad-Core Intel Core i7
Training Set Size: 60000, One Epoch
Test Set Size: 10000
---------------------------------------------------------
Training Time: 2:57.259 (m:ss.mmm)
Prediction Time: 0.789 ms
Accuracy: 9441 / 10000

Keywords

FAQs

Package last updated on 28 Jan 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc