Machine learning tools in JavaScript

Overview

ml.js - Machine learning tools in JavaScript

Introduction

This library is a compilation of the tools developed in the mljs organization.
It is mainly maintained for use in the browser. If you are working with Node.js, you might prefer to add to your dependencies only the libraries that you need, as they are usually published to npm more often.
We prefix all our npm package names with ml- (eg. ml-matrix) so they are easy to find.

To include the ml.js library in a web page:

<script src="https://www.lactame.com/lib/ml/4.0.0/ml.min.js"></script>

It will be available as the global ML variable. The package is in UMD format.

List of included libraries

Unsupervised learning

Supervised learning

Artificial neural networks (ANN)

  • Feedforward Neural Networks: ML.FNN
  • Self-organizing map / Kohonen networks: ML.SOM

Regression

Optimization

Math

ML.Array

ML.ArrayXY

Functions dealing with an object containing 2 properties x and y, both arrays.

Example:

let result = ML.ArrayXY.sortX({ x: [2, 3, 1], y: [4, 6, 2] });
// result = {x: [1,2,3], y: [2,4,6]}

Statistics

Data processing

Utility

License

MIT

Comments
  • An in-range update of cheminfo-tools is breaking the build 🚨

    An in-range update of cheminfo-tools is breaking the build 🚨

    The devDependency cheminfo-tools was updated from 1.22.1 to 1.22.2.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    cheminfo-tools is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

    Commits

    The new version differs by 3 commits.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 8
  • Way to reuse model saved and retrieved from JSON?

    Way to reuse model saved and retrieved from JSON?

    Hello,

    I am wondering if there is a way/can be added to reuse a model that has been generated, stored, and retrieved. For instance, I have created a pls model object, stored it as JSON, and inserted it into a database. When I retrieve the model object it says that "predict" is not a function. I found a similar implementation at http://mlweb.loria.fr/demos/mljs-tutorial-storage.html for just SVM and kernel ridge regression. I adjusted it so that I can store and retrieve my pls model perfectly, but the predict functionality is gone.

    opened by davekuntz 5
  • Updated ml npm package

    Updated ml npm package

    Hi guys,

    First of, I love the work and the modular approach to constructing this library.

    When is the next planned semver release on NPM, a lot of the individual packages have been updated (likeml-naivebayes) and it would be great to have them rolled up into a package again.

    Thanks, Yaw

    opened by yawetse 4
  • ml.js Collaborator Meeting 2015-09-08

    ml.js Collaborator Meeting 2015-09-08

    http://www.timeanddate.com/worldclock/fixedtime.html?msg=ml.js+Collaborator+Meeting+2015-09-08&iso=20150908T09&p1=453

    Hangouts link: https://talkgadget.google.com/hangouts/_/g4dqj4v46gjoozkzbk4hfbgukqa

    /cc @mljs/collaborators

    opened by targos 4
  • An in-range update of rollup is breaking the build 🚨

    An in-range update of rollup is breaking the build 🚨

    The devDependency rollup was updated from 1.18.0 to 1.19.0.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

    Commits

    The new version differs by 6 commits.

    • 9af119d 1.19.0
    • b3f361c Update changelog
    • 456f4d2 Avoid variable from empty module name be empty (#3026)
    • 17eaa43 Use id of last module in chunk as name base for auto-generated chunks (#3025)
    • 871bfa0 Switch to a code-splitting build and update dependencies (#3020)
    • 2443783 Unified file emission api (#2999)

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 3
  • Update ml-matrix to the latest version 🚀

    Update ml-matrix to the latest version 🚀

    The dependency ml-matrix was updated from 5.3.0 to 6.0.0.

    This version is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


    Find out more about this release.

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 3
  • how to integrate in browser

    how to integrate in browser

    Hello,

    Can you please post an example how to integrate ml.js with requireJS for use in a browser?

    I'm trying to use ML.savitzkyGolay. I dont't get how to integrate the library.

    It will be available as the global ML variable. The package is in UMD format and can be "required" within webpack or requireJS.

    I don't get a variable ML if I use <script src="https://www.lactame.com/lib/ml/2.2.0/ml.min.js"></script>

    I can get functions like ML.AU.SNV and ML.propertyIsEnumerable with <script src="./src/ml.min.js" charset="utf-8"></script>

    or

    <script src="https://www.lactame.com/lib/ml/2.2.0/ml.min.js"></script>
    ...
    requirejs(["ML"])
    
    

    but none of the function mentioned on the GitHub site are available.

    I would be very thankful if you can point me in the right direction.

    question 
    opened by Opadera 3
  • Update dependencies

    Update dependencies

    Hello @mljs/collaborators, in the CONTRIBUTING.md file I tried to merge all the guidelines, but those are open to discussion off course.

    For example will be interesting decide if we make our own commit guidelines, because it's not always clear which case to use, so won't be a bad idea to look other ones as guides, like the atom's one.

    I also think that we should have a v1.0.0 version, because we have a stable API and is used in production.

    opened by maasencioh 3
  • ml.js Collaborator Meeting 2015-10-13

    ml.js Collaborator Meeting 2015-10-13

    http://www.timeanddate.com/worldclock/fixedtime.html?msg=ml.js+Collaborator+Meeting+2015-10-13&iso=20151013T0915&p1=453

    Hangouts link: https://hangouts.google.com/call/as4k3lvsej6h6itpgbpsulve4qa

    /cc @mljs/collaborators

    opened by targos 3
  • new algorithms

    new algorithms

    • Distance / similarity
      • Tanimoto
      • Tree similarity (check with Andres Castillo)
    • SVM
    • Regression
      • PLS-DA
      • PLSA
    • PCA
    • Neural network ?
      • input -> hidden -> output
    • Clustering
      • k-means
      • hierarchical
    opened by lpatiny 3
  • An in-range update of ml-array-xy-equally-spaced is breaking the build 🚨

    An in-range update of ml-array-xy-equally-spaced is breaking the build 🚨

    The dependency ml-array-xy-equally-spaced was updated from 1.0.2 to 1.1.0.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    ml-array-xy-equally-spaced is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

    Status Details
    • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

    Commits

    The new version differs by commits.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 2
  • chore(master): release 6.0.0

    chore(master): release 6.0.0

    :robot: I have created a release beep boop

    6.0.0 (2022-03-09)

    ⚠ BREAKING CHANGES

    • update dependencies
    • remove support for Node.js 12
    • remove num-sort package exportation
    • update all dependencies
    • Remove dist from git

    Features

    • add lactame.com action release (2547a9a)
    • Remove dist from git (90392a5)
    • remove num-sort package exportation (4b8c47b)
    • update all dependencies (114d814)
    • update and improve GSD (7222a2c)

    Bug Fixes

    • add missing ml-array-sum package (d471033)
    • correct link to lactame.com to v6.0.0 (65e9ca0)
    • update dependencies to fix nGMCA (9b040d0)

    Miscellaneous Chores

    • remove support for Node.js 12 (88c0717)
    • update dependencies (88c0717)

    This PR was generated with Release Please. See documentation.

    autorelease: pending 
    opened by mljs-bot 1
  • Cleanup and update repositories

    Cleanup and update repositories

    There have been a lot of changes in how we structure and test our projects since the creation of this org. Here are some things that need to be cleaned up or changed, and a list of repositories where to do it.

    To do

    1. Rename some config files

    If they exist:

    • .babelrc -> .babelrc.json
    • .prettierrc -> .prettierrc.json

    2. Move Prettier config from package.json to .prettierrc.json.

    There are some projects where the Prettier config is not in a separate file (example). Copy the config to a file named .prettierrc.json and remove the field from the package.json.

    3. Rename prepublishOnly script to prepack

    If it exists in package.json.

    4. Add prettier and prettier-write scripts

    In package.json:

    {
      "scripts": {
        "prettier": "prettier --check src",
        "prettier-write": "prettier --write src"
      }
    }
    

    The "test" script should be updated to call npm run prettier at the end.

    Example

    5. Update dependencies

    ncu -u
    

    Be careful if there are breaking changes in non-dev dependencies. Check the changelog of the dependency and adapt the project if necessary.

    6. Remove eslint-plugin-* from dependencies

    After updating dependencies, we can do this because the eslint-config-cheminfo packages have the plugins as peer dependencies. Make sure to use the latest version of Node.js 16 or 17, otherwise it won't work.

    7. Refactor how tests are run

    There are multiple things to do here. See floyd-warshall for an example of a correct setup.

    • If there is a test-coverage npm script, remove it.
    • If there is a testonly npm script, rename it to test-only.
    • Add --coverage to the test-only npm script. For example: "test-only": "jest --coverage"
    • If there is a "jest" field with only "testEnvironment": "node" in it, remove the field. The latest version of Jest defaults to this environment.
    • Otherwise, if there are more things in the Jest config. Move it to a jest.config.js file.

    8. Rename History.md to CHANGELOG.md

    • Rename the file
    • Add # Changelog + a new line at the beginning.

    Example

    9. Remove Travis config

    • Delete `.travis.yml
    • Delete Travis-related lines from README.md

    10. Remove david config

    Delete david-related lines from README.md

    Example

    11. Remove docs folder

    If it exists.

    12. Setup or update GitHub workflows

    • If the workflow doesn't exist, create it.
    • If the workflow already exists, replace it with the new template. node-version-matrix should contain 12 if Node.js 12 was tested in the old workflow.

    .github/workflows/nodejs.yml

    Template
    name: Node.js CI
    
    on:
      push:
        branches:
          - master
      pull_request:
    
    jobs:
      nodejs:
        # Documentation: https://github.com/zakodium/workflows#nodejs-ci
        uses: zakodium/workflows/.github/workflows/nodejs.yml@nodejs-v1
        with:
          node-version-matrix: '[14, 16]'
    
    

    .github/workflows/release.yml

    Template
    name: Release
    
    on:
      push:
        branches:
          - master
    
    jobs:
      release:
        # Documentation: https://github.com/zakodium/workflows#release
        uses: zakodium/workflows/.github/workflows/release.yml@release-v1
        with:
          npm: true
        secrets:
          github-token: ${{ secrets.BOT_TOKEN }}
          npm-token: ${{ secrets.NPM_BOT_TOKEN }}
    
    

    .github/workflows/documentationjs.yml

    Only do this if there is no typedoc.yml workflow.

    Template
    name: Deploy documentation.js on GitHub pages
    
    on:
      workflow_dispatch:
      release:
        types: [published]
    
    jobs:
      deploy:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2
          - name: Build documentation
            uses: zakodium/documentationjs-action@v1
          - name: Deploy to GitHub pages
            uses: JamesIves/github-pages-deploy-action@releases/v4
            with:
              token: ${{ secrets.BOT_TOKEN }}
              branch: gh-pages
              folder: docs
              clean: true
    
    
    opened by targos 7
  • Any chance of including ExpectationMaximization in the ml.min.js

    Any chance of including ExpectationMaximization in the ml.min.js

    Is it possible to use https://github.com/mljs/expectation-maximization in the frontend? I tried to include the following line, but it was not there.

    <script src="https://www.lactame.com/lib/ml/6.0.0/ml.min.js"></script>
    

    I would like to implement GMM in the frontend, which requires the EM library.

    Thank you.

    opened by pvmilk 0
  • chore: release 6.1.0

    chore: release 6.1.0

    :robot: I have created a release *beep* *boop*

    6.1.0 (2022-02-28)

    Features

    • add lactame.com action release (2547a9a)

    This PR was generated with Release Please. See documentation.

    autorelease: pending 
    opened by mljs-bot 0
Releases(v5.3.0)
Owner
ml.js
Machine learning and numerical analysis tools in JavaScript for Node.js and the Browser
ml.js
JavaScript Machine Learning Toolkit

The JavaScript Machine Learning Toolkit, or JSMLT, is an open source JavaScript library for education in machine learning.

JSMLT 25 Nov 23, 2022
A JavaScript deep learning and reinforcement learning library.

neurojs is a JavaScript framework for deep learning in the browser. It mainly focuses on reinforcement learning, but can be used for any neural networ

Jan 4.4k Jan 4, 2023
Machine-learning for Node.js

Limdu.js Limdu is a machine-learning framework for Node.js. It supports multi-label classification, online learning, and real-time classification. The

Erel Segal-Halevi 1k Dec 16, 2022
Train and test machine learning models for your Arduino Nano 33 BLE Sense in the browser.

Tiny Motion Trainer Train and test IMU based TFLite models on the Web Overview Since 2009, coders have created thousands of experiments using Chrome,

Google Creative Lab 59 Nov 21, 2022
Friendly machine learning for the web! 🤖

Read our ml5.js Code of Conduct and software licence here! This project is currently in development. Friendly machine learning for the web! ml5.js aim

ml5 5.9k Jan 2, 2023
Machine Learning library for node.js

shaman Machine Learning library for node.js Linear Regression shaman supports both simple linear regression and multiple linear regression. It support

Luc Castera 108 Feb 26, 2021
machinelearn.js is a Machine Learning library written in Typescript

machinelearn.js is a Machine Learning library written in Typescript. It solves Machine Learning problems and teaches users how Machine Learning algorithms work.

machinelearn.js 522 Jan 2, 2023
Unsupervised machine learning with multivariate Gaussian mixture model which supports both offline data and real-time data stream.

Gaussian Mixture Model Unsupervised machine learning with multivariate Gaussian mixture model which supports both offline data and real-time data stre

Luka 26 Oct 7, 2022
Automated machine learning for analytics & production

auto_ml Automated machine learning for production and analytics Installation pip install auto_ml Getting started from auto_ml import Predictor from au

Preston Parry 1.6k Dec 26, 2022
Deep Learning in Javascript. Train Convolutional Neural Networks (or ordinary ones) in your browser.

ConvNetJS ConvNetJS is a Javascript implementation of Neural networks, together with nice browser-based demos. It currently supports: Common Neural Ne

Andrej 10.4k Dec 31, 2022
K-nearest neighbors algorithm for supervised learning implemented in javascript

kNear Install npm install knear --save About kNear is a javascript implementation of the k-nearest neighbors algorithm. It is a supervised machine lea

Nathan Epstein 45 Mar 7, 2022
Support Vector Machine (SVM) library for nodejs

node-svm Support Vector Machine (SVM) library for nodejs. Support Vector Machines Wikipedia : Support vector machines are supervised learning models t

Nicolas Panel 296 Nov 6, 2022
Fork, customize and deploy your Candy Machine v2 super quickly

Candy Machine V2 Frontend This is a barebones implementation of Candy Machine V2 frontend, intended for users who want to quickly get started selling

AL 107 Oct 24, 2022
🤖chat discord bot powered by Deep learning algorithm🧠

✨ Akaya ✨ ❗ Discord integration functionality not implemented yet! Only the deep-learning module working. Install git clone https://github.com/LyeZinh

Pedro Kaleb! 3 Jun 23, 2022
[UNMAINTAINED] Simple feed-forward neural network in JavaScript

This project has reached the end of its development as a simple neural network library. Feel free to browse the code, but please use other JavaScript

Heather 8k Dec 26, 2022
A neural network library built in JavaScript

A flexible neural network library for Node.js and the browser. Check out a live demo of a movie recommendation engine built with Mind. Features Vector

Steven Miller 1.5k Dec 31, 2022
Pure Javascript OCR for more than 100 Languages 📖🎉🖥

Version 2 is now available and under development in the master branch, read a story about v2: Why I refactor tesseract.js v2? Check the support/1.x br

Project Naptha 29.2k Dec 31, 2022
WebGL-accelerated ML // linear algebra // automatic differentiation for JavaScript.

This repository has been archived in favor of tensorflow/tfjs. This repo will remain around for some time to keep history but all future PRs should be

null 8.5k Dec 31, 2022
Differential Programming in JavaScript.

April 19, 2018 TensorFlow.js was recently released. It is well engineered, provides an autograd-style interface to backprop, and has committed to supp

Propel 2.7k Dec 29, 2022