brainlog

1.3.0 • Public • Published

brainlog

Machine learning library for Node.js

Introduction

The current implementation supports three algorithms:

Installation

# npm
npm install brainlog

# yarn
yarn add brainlog

Usage

Here's a basic example of usage:

# To train Logistic Matrix Factorization

const engine = require('brainlog').engine;

const ratingMatrix = [
  [ 1, 0, 3, 4 ],
  [ 0, 8, 0, 7 ],
  [ 6, 0, 5, 0 ],
];

const factors = 3;
const iterations = 30;
const regularization = 0.1;
const gamma = 1.0;
const seed = 1;

const modelMatrix = engine.trainLogisticMF(ratingMatrix, regularization, gamma, factors, iterations, seed);

/brainlog/

    Package Sidebar

    Install

    npm i brainlog

    Weekly Downloads

    7

    Version

    1.3.0

    License

    MIT

    Last publish

    Collaborators

    • iceonepiece