Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

machine_learning

> 编程语言
Open source

Machine learning library for Node.js

732 stars0 likes1 views
WebsiteGitHub

About

Machine learning library for Node.js

machine_learning

Machine learning library for node.js. You can also use this library in browser.

Demo in Browser!

API Documentation

Installation

Node.js

$ npm install machine_learning

To use this library in browser, include machine_learning.min.js file.

xml

Demo in Browser!

Here is the API Documentation. (Still in progress)

Features

  • Logistic Regression
  • MLP (Multi-Layer Perceptron)
  • SVM (Support Vector Machine)
  • KNN (K-nearest neighbors)
  • K-means clustering
  • 3 Optimization Algorithms (Hill-Climbing, Simulated Annealing, Genetic Algorithm)
  • Decision Tree
  • NMF (non-negative matrix factorization)

Implementation Details

SVM is using Sequential Minimal Optimization (SMO) for its training algorithm.

For Decision Tree, Classification And Regression Tree (CART) was used for its building algorithm.

Usage

Logistic Regression

…

MLP (Multi-Layer Perceptron)

…

SVM (Support Vector Machine)

…

KNN (K-nearest neighbors)

…

K-means clustering

…

Hill-Climbing

javascript
var ml = require('machine_learning');

var costf = function(vec) {
    var cost = 0;
    for(var i =0; i higher selection pressure
});

console.log("vec : ",vec);
console.log("cost : ",costf(vec));

Decision Tree

…

NMF (Non-negative matrix factorization)

javascript
var ml = require('machine_learning');
var matrix = [[22,28],
              [49,64]];

var result = ml.nmf.factorize({
    matrix : matrix,
    features : 3,
    epochs : 100
});

console.log("First Matrix : ",result[0]);
console.log("Second Matrix : ",result[1]);

##License

(The MIT License)

Copyright (c) 2014 Joon-Ku Kang <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言