Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.1 KB

README.md

File metadata and controls

57 lines (41 loc) · 1.1 KB

ml-basic

NPM package NPM bundle size Last commit NPM weekly downloads NPM downloads

Lightweight, zero dependency, machine learning library for use in NodeJS and browsers.

Table of contents

Importing

CommonJS

const MLBasic = require('ml-basic');

ESM

import MLBasic from 'ml-basic';

Browser

<script src="https://unpkg.com/browse/ml-basic/index.js" type="text/javascript"></script>

Usage

const net = new Neural({
    layers: [
        ...
    ]
});

const result = net.predict([1, 0]);

// result = [0.532..]

Training

import { DataFrame } from 'ml-basic';

const data = new DataFrame([ ... ]);

const error = await net.fit(data);

// error = 0.532..