ml-basic
v2.2.3
Published
Lightweight, zero dependency, machine learning library
Maintainers
Readme
ml-basic
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/dist/index.js" type="text/javascript"></script>Usage
import { Neural } from 'ml-basic';
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..