machinelearn.js is a Machine Learning library written in Typescript

Overview

machinelearn.js

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

Build Status Build status FOSSA Status Slack ZenHub

User Installation

Using yarn

$ yarn add machinelearn

Using NPM

$ npm install --save machinelearn

On the browsers

We use jsdeliver to distribute browser version of machinelearn.js

">
<script src="https://cdn.jsdelivr.net/npm/machinelearn/machinelearn.min.js">script>
<script>
    const { RandomForestClassifier } = ml.ensemble;
    const cls = new RandomForestClassifier();
script>

Please see https://www.jsdelivr.com/package/npm/machinelearn for more details.

Accelerations

By default, machinelearning.js will use pure Javascript version of tfjs. To enable acceleration through C++ binding or GPU, you must import machinelearn-node for C++ or machinelearn-gpu for GPU.

  1. C++
  • installation
yarn add machinelearn-node
  • activation
import 'machinelearn-node';
  1. GPU
  • installation
yarn add machinelearn-gpu
  • activation
import 'machinelearn-gpu';

Highlights

  • Machine Learning on the browser and Node.js
  • Learning APIs for users
  • Low entry barrier

Development

We welcome new contributors of all level of experience. The development guide will be added to assist new contributors to easily join the project.

  • You want to participate in a Machine Learning project, which will boost your Machine Learning skills and knowledge
  • Looking to be part of a growing community
  • You want to learn Machine Learning
  • You like Typescript ❤️ Machine Learning

Simplicity

machinelearn.js provides a simple and consistent set of APIs to interact with the models and algorithms. For example, all models have follow APIs:

  • fit for training
  • predict for inferencing
  • toJSON for saving the model's state
  • fromJSON for loading the model from the checkpoint

Testing

Testing ensures you that you are currently using the most stable version of machinelearn.js

$ npm run test

Supporting

Simply give us a 🌟 by clicking on

Contributing

We simply follow "fork-and-pull" workflow of Github. Please read CONTRIBUTING.md for more detail.

Further notice

Great references that helped building this project!

Contributors

Thanks goes to these wonderful people (emoji key):


Jason Shin

📝 🐛 💻 📖 ⚠️

Jaivarsan

💬 🤔 📢

Oleg Stotsky

🐛 💻 📖 ⚠️

Ben

💬 🎨 📢 🐛 💻

Christoph Reinbothe

💻 🤔 🚇 👀

Adam King

💻 ⚠️ 📖
Comments
  • Fix SVM types to match libsvm-js parameters

    Fix SVM types to match libsvm-js parameters

    Reference: https://github.com/mljs/libsvm

    • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    Bug fix

    • What is the current behavior? (You can also link to an open issue here)

    The SVM fit, predict, and predictOne functions have incorrect TS typings, causing them to not work correctly with libsvm-js.

    • What is the new behavior (if this is a feature change)?

    Fix the typings to match the required parameters for libsvm-js.

    • Other information:
    opened by notadamking 10
  • Feature: Husky pre-commit hook

    Feature: Husky pre-commit hook

    • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Feature

    This Pull Request adds husky pre-commit hook that runs prettier, tslint and then build script. If any of those return anything other than 0, the commit fails. That would help in enforcing consistent style between contributors, as well as enhancing stability of a project.

    enhancement feature 
    opened by OlegStotsky 7
  • SVM is not created until .fit() is called and cannot be serialized/deserialized.

    SVM is not created until .fit() is called and cannot be serialized/deserialized.

    • I'm submitting a ... [ x] bug report

    • Summary

    Due to the asynchronous nature of creating an SVM, the decision has been made to not instantiate an SVM until the asynchronous fit() method is called. This not only feels incorrect, it prevents the deserialization of previous SVMs. This is part of the reason why the .toJSON() and .fromJSON() methods do not work.

    I have a PR in the works to fix this.

    enhancement 
    opened by notadamking 6
  • refactor/naive bayes with tensors

    refactor/naive bayes with tensors

    • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Rewrite of GaussianNB with Tensorflow support.

    The PR also introduces:

    • Iterator implementation for predict
    • Tensorflow Linear Algebra refactoring
    • Updating the doc-processor to support native types such as IterableIteration
    enhancement feature 
    opened by sudo-ben 6
  • Restructure SVM to Fix #168

    Restructure SVM to Fix #168

    • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    https://github.com/kalimdorjs/kalimdorjs/issues/168

    Instead of using synchronous constructor, SVMs should now be instantiated with an asynchronous .create() method. This is to facilitate the asynchronous nature of importing the libsvm-js package, and to allow for the correct [de]serialization of SVMs.

    • What is the current behavior? (You can also link to an open issue here)

    SVMs are not fully initialize until the .fit() method is called. The .toJSON() method and corresponding .fromJSON() method do not work to [de]serialize SVMs.

    • What is the new behavior (if this is a feature change)?

    SVMs are initialized with a static asynchronous SVM.create(options: SVMOptions) call. The toJSON() method and fromJSON() method now work as expected.

    • Other information:

    type: Type has been moved into the SVMOptions interface.

    opened by notadamking 5
  • feature/metrics - mean_squared_log_error

    feature/metrics - mean_squared_log_error

    • I'm submitting a ... [/] feature request

    • Summary Implement https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_squared_log_error.html

    help wanted good first issue feature 
    opened by JasonShin 5
  • Usage improvements -> fixing some errors

    Usage improvements -> fixing some errors

    • I'm submitting a ... [/] bug report

    • Summary I realised there are a few issues that you encounter when you try to use machinelearn.js

    1. libsvm.js might prevent npm install if the project does not have git init already run
    2. Cannot use the module unless you install fs-extra
    3. tensorflow.js warning still shows up when using the library
    opened by JasonShin 4
  • Investigate using Appveyor for CI instead of Travis

    Investigate using Appveyor for CI instead of Travis

    • I'm submitting a ...

    [/] enhancement

    • Summary

    Due to the demand for supporting Windows for the development and the production environment, it would be nice to have a Windows CI environment, but it is not supported by Travis CI. After conducting an initial investigation, Appveyor stands out as an alternative to Travis since it is free for open source and provides both Windows and Linux build environments. The ticket aims to do a further investigation and possibly make a pull request with Appveyor CI config file.

    enhancement 
    opened by JasonShin 4
  • Feature/decomposition pca

    Feature/decomposition pca

    adding PCA API References:

    • http://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html#sklearn.decomposition.PCA

    This implementation does not factor in n_components

    opened by JasonShin 4
  • release/investigate the best way to release purejs, cpu and gpu versions of the library

    release/investigate the best way to release purejs, cpu and gpu versions of the library

    • I'm submitting a ... [/] devops [/] release

    • Summary This ticket aims to investigate and propose a potential solution for releasing different types of the library based on the tfjs backend, which varies between purejs, cpu, and gpu distributions.

    Ideas:

    1. Publishing multiple modules according to the tfjs backend type. For example, kalimdor-core, kalimdor-cpu, and kalimdor-gpu

    ... more investigations required...

    help wanted 
    opened by JasonShin 3
  • Appveyor script for both Windows and Linux using Node 8 LTS and Node 10 LTS

    Appveyor script for both Windows and Linux using Node 8 LTS and Node 10 LTS

    • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) This PR adds support for building Kalimdor.JS via Appveyor for both Windows and Linux.

    • What is the current behavior? (You can also link to an open issue here) Kalimdor.JS is currently build via Travis for Linux only. See Issue here: https://github.com/kalimdorjs/kalimdorjs/issues/87

    • What is the new behavior (if this is a feature change)? Building and testing via Appveyor

    • Other information:

    • In order to enable your build for Appveyor, you need an Appveyor account and add Kalimdor.JS as project. Then it will run on commits on every branch.
    • After adding Kalimdor.JS to Appveyor you'll find the URLs for the building badges to be included in README.md under Projects --> kalimdorjs --> Settings --> Badges
    • Building the docker image during integration test is disabled for Windows for now because by default Docker for Windows which is pre-installed on Apveyor's machines is only accepting Windows container.
    enhancement 
    opened by LSBOSS 3
  • chore(deps): bump qs from 6.5.2 to 6.5.3

    chore(deps): bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump shell-quote from 1.6.1 to 1.7.3

    chore(deps): bump shell-quote from 1.6.1 to 1.7.3

    Bumps shell-quote from 1.6.1 to 1.7.3.

    Release notes

    Sourced from shell-quote's releases.

    v1.7.2

    • Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. (144e1c2)

    v1.7.1

    • Fix $ being removed when not part of an environment variable name. (@​Adman in #32)

    v1.7.0

    • Add support for parsing >> and >& redirection operators. (@​forivall in #16)
    • Add support for parsing <( process substitution operator. (@​cuonglm in #15)

    v1.6.3

    • Fix Windows path quoting problems. (@​dy in #34)

    v1.6.2

    • Remove dependencies in favour of native methods. (@​zertosh in #21)
    Changelog

    Sourced from shell-quote's changelog.

    1.7.3

    • Fix a security issue where the regex for windows drive letters allowed some shell meta-characters to escape the quoting rules. (CVE-2021-42740)

    1.7.2

    • Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. (144e1c2)

    1.7.1

    • Fix $ being removed when not part of an environment variable name. (@​Adman in #32)

    1.7.0

    • Add support for parsing >> and >& redirection operators. (@​forivall in #16)
    • Add support for parsing <( process substitution operator. (@​cuonglm in #15)

    1.6.3

    • Fix Windows path quoting problems. (@​dy in #34)

    1.6.2

    • Remove dependencies in favour of native methods. (@​zertosh in #21)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3

    chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3

    Bumps trim-off-newlines from 1.0.1 to 1.0.3.

    Commits
    • c3b28d3 1.0.3
    • 6226c95 Merge pull request #4 from Trott/fix-it-again
    • c77691d fix: remediate ReDOS further
    • 76ca93c chore: pin mocha to version that works with 0.10.x
    • 8cd3f73 1.0.2
    • fcbb73d Merge pull request #3 from Trott/patch-1
    • 6d89476 fix: update regular expression to remove ReDOS
    • 0cd87f5 chore: pin xo to latest version that works with current code
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by trott, a new releaser for trim-off-newlines since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump prismjs from 1.16.0 to 1.27.0

    chore(deps): bump prismjs from 1.16.0 to 1.27.0

    Bumps prismjs from 1.16.0 to 1.27.0.

    Release notes

    Sourced from prismjs's releases.

    v1.27.0

    Release 1.27.0

    v1.26.0

    Release 1.26.0

    v1.25.0

    Release 1.25.0

    v1.24.1

    Release 1.24.1

    v1.24.0

    Release 1.24.0

    v1.23.0

    Release 1.23.0

    v1.22.0

    Release 1.22.0

    v1.21.0

    Release 1.21.0

    v1.20.0

    Release 1.20.0

    v1.19.0

    Release 1.19.0

    v1.18.0

    Release 1.18.0

    v1.17.1

    Release 1.17.1

    v1.17.0

    Release 1.17.0

    Changelog

    Sourced from prismjs's changelog.

    1.27.0 (2022-02-17)

    New components

    Updated components

    Updated plugins

    Other

    • Core
      • Added better error message for missing grammars (#3311) 2cc4660b

    1.26.0 (2022-01-06)

    New components

    Updated components

    ... (truncated)

    Commits
    Maintainer changes

    This version was pushed to npm by rundevelopment, a new releaser for prismjs since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump ajv from 6.10.0 to 6.12.6

    chore(deps): bump ajv from 6.10.0 to 6.12.6

    Bumps ajv from 6.10.0 to 6.12.6.

    Release notes

    Sourced from ajv's releases.

    v6.12.6

    Fix performance issue of "url" format.

    v6.12.5

    Fix uri scheme validation (@​ChALkeR). Fix boolean schemas with strictKeywords option (#1270)

    v6.12.4

    Fix: coercion of one-item arrays to scalar that should fail validation (failing example).

    v6.12.3

    Pass schema object to processCode function Option for strictNumbers (@​issacgerges, #1128) Fixed vulnerability related to untrusted schemas (CVE-2020-15366)

    v6.12.2

    Removed post-install script

    v6.12.1

    Docs and dependency updates

    v6.12.0

    Improved hostname validation (@​sambauers, #1143) Option keywords to add custom keywords (@​franciscomorais, #1137) Types fixes (@​boenrobot, @​MattiAstedrone) Docs:

    v6.11.0

    Time formats support two digit and colon-less variants of timezone offset (#1061 , @​cjpillsbury) Docs: RegExp related security considerations Tests: Disabled failing typescript test

    v6.10.2

    Fix: the unknown keywords were ignored with the option strictKeywords: true (instead of failing compilation) in some sub-schemas (e.g. anyOf), when the sub-schema didn't have known keywords.

    v6.10.1

    Fix types Fix addSchema (#1001) Update dependencies

    Commits
    • fe59143 6.12.6
    • d580d3e Merge pull request #1298 from ajv-validator/fix-url
    • fd36389 fix: regular expression for "url" format
    • 490e34c docs: link to v7-beta branch
    • 9cd93a1 docs: note about v7 in readme
    • 877d286 Merge pull request #1262 from b4h0-c4t/refactor-opt-object-type
    • f1c8e45 6.12.5
    • 764035e Merge branch 'ChALkeR-chalker/fix-comma'
    • 3798160 Merge branch 'chalker/fix-comma' of git://github.com/ChALkeR/ajv into ChALkeR...
    • a3c7eba Merge branch 'refactor-opt-object-type' of github.com:b4h0-c4t/ajv into refac...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(2.1.5)
  • 2.1.5(Aug 3, 2019)

  • 2.1.4(Aug 2, 2019)

    • Merge pull request #256 from machinelearnjs/hotfix (18a8c3a)
    • doc(CHANGELOG.md): adding 2.1.4 (9de04cb)
    • Merge pull request #255 from machinelearnjs/fix/browser-install-new (f74645b)
    • docs(REAMDME.md): adding jsdeliver link (d7592b8)
    • docs(README.md): adding a browser loading example (cbb5d05)
    • docs(*): adding a note to mention the APIs that are not available on the browsers (49a8c08)
    • refactor(*): cleanups including adding a prod webpack, removing ts module config (aaf50e7)
    • refactor(Dockerfile): removing global typescript install (0648a4c)
    • feature(webpack.config.js): adding webpack for browser bundling and an explicit index.ts for browser (d5ddd6d)
    • Merge pull request #247 from machinelearnjs/fix/linksinreadme (f0f9a5e)
    • fix: links in readme (78b32bd)
    • chore(MathExtra.ts): ignore genRandomIndex in docs (a4a46ad)
    Source code(tar.gz)
    Source code(zip)
  • 2.1.3(Jun 15, 2019)

  • 2.1.2(May 19, 2019)

    [2.1.2]

    :bug: Installation issues :bug:

    • fix: SVM APIs are now based on libsvm-ts, a new module managed by machinelearn.js! It solves various issues and introduces friendlier/easy-to-use APIs
    • fix: fs-extra is no longer a production dependency
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(May 8, 2019)

  • 2.1.0(Apr 11, 2019)

    :rocket: New API! :rocket:

    • feature: Logistic Regression by @OlegStotsky
    • feature: Heart Disease dataset by @OlegStotsky
    • enhance: Various internal code enhancement
    Source code(tar.gz)
    Source code(zip)
  • 2.0.2(Jan 28, 2019)

    :bug: API consistency update :bug:

    • enhance: MinMaxScaler now implements transform and fit_transform correctly accroding to ScikitLearn MinMaxScaler
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Jan 14, 2019)

  • 2.0.0(Jan 5, 2019)

    • chore: adding a working release-it config (40b8a5c)
    • Merge pull request #191 from machinelearnjs/v2 (52018c0)
    • Merge branch 'master' into v2 (000de54)
    • Merge pull request #190 from machinelearnjs/refactor/everything-to-machinelearn (5f256d1)
    • refactor: contribution and docs config (07c7178)
    • refactor: updating project url in pakcage json, release tests and fixing doc helper tests (15a1493)
    • refactor: doc homepage (37926be)
    • refactor: contributing (415e034)
    • docs: roadmap (223529e)
    • refactor: few files in the root dir, kalimdor to machinelearn (709be4d)
    • refactor: readme (9fbbc25)
    • refactor: changelog (f1be6ad)
    • refactor: docs (b810c4e)
    • refactor: src's example snippets kalimdor -> machinelearn (019dd27)
    • refactor: updating integration tests to use machinelearn (b3e3f14)
    • Merge pull request #184 from kalimdorjs/enhance/tfjs-proper-impl (9208193)
    • Merge remote-tracking branch 'origin/v2' into enhance/tfjs-proper-impl (7429b3b)
    • Merge pull request #189 from kalimdorjs/enhance/v2-iris-load-from-local (a13be00)
    • chore: loading iris from local fs (fb25737)
    • test: doubling jest timeout for the functional tests against models such as Lasso (80f9b26)
    • chore: resetting tslint.json (807856b)
    • chore: removing no optional from yarn install in appveyor config (026388f)
    • chore: adding installation instructions for C++ and GPU (8c7cc28)
    • chore: removing test-unit.js (06f7d40)
    • chore: refactoring unit test to simple jest test invocation instead of docker version (c3b0eec)
    • chore: adding test-unit.js to run the unit tests in a temporary docker container (1a01192)
    • chore: removing tfjs-node and tfjs-node-gpu (6f970ba)
    • chore: removing installTF script in favour of separate modules to enable tfjs-node and tfjs-node-gpu (d7e04dd)
    • test: removing console.dir and updating the snapshots (0c103e8)
    • chore: requiring node-gpu as well (449589f)
    • doc: removing travis token from readme (cec277d)
    • chore: re-enabling windows test env in Appveyor and adding tfjs-node and tfjs-node-gpu as optional deps (64a5338)
    • chore: removing travis and visual studio test env from appveyor (12e11cc)
    • chore: updating node minimum version in package.json to 8.11.0 (f87675f)
    • chore: removing travis 6 and 7 tests since tfjs-core is only support for version greater than 8 (0c00474)
    • Merge remote-tracking branch 'origin/v2' into enhance/tfjs-proper-impl (5b64457)
    • Merge pull request #185 from kalimdorjs/fix/remove-snyk-from-ci (9af6ab3)
    • chore: removing test:snyk from yarn:test (c9e18e1)
    • chore: removing snyks from CI configs (536f2f7)
    • chore: fixing helper snapshot (15a9cc6)
    • Merge pull request #183 from kalimdorjs/feature/v2-fix-docs (2433926)
    • chore: adding the installation helper in lib/index.ts (1061bdf)
    • chore: adding TFJS-node installation helper (ed03a14)
    • chore: adding tfjs-node and importing it in index (f945cd1)
    • docs: updating OneHotEncoder (2ec5a37)
    • Merge pull request #182 from kalimdorjs/feature/v2-fix-docs (3245414)
    • docs: gaussianNB docs fix except for the generic type issue (c475fda)
    • doc: fixing docs for kfold (0a94d80)
    • doc: updating confusion matrix (01f2667)
    • doc: fixing lasso, ridge, SGDRegressor, accuracyScore, zeroOneLoss (e060674)
    • doc: fixing docs for kmeans and linear regression (3616337)
    • chore: updating zeroOneLoss to display doc definition correctly and simple parameters based API (2cd3ab4)
    • refactor: zeroOneLoss params (ff92f1c)
    • doc: fixing Type2DMatrix incorrectly displaying for mean_absolute_error (d37fa52)
    • Merge pull request #180 from kalimdorjs/refactor/uninstall (da6f5f9)
    • chore: remove mathjs (87506ac)
    • doc: adding a note to fix the typing for dataSync in linear_regression later (aad715f)
    • chore: updating all math.mean to tf.mean (15deaa3)
    • refactor: polynomialfeatures; removing all mathjs usages (#178) (d3eda77)
    • refactor: removing subset usage in Imputer and using the new APIs for… (#177) (1bdccc7)
    • Test/improve doc processor unit tests robustness (#173) (ce723c9)
    • Merge pull request #163 from kalimdorjs/refactor/MinMaxScaler-tfjs-core (acec0c9)
    • chore: removing math.js usage in normalize method (#164) (18c2ef3)
    • Merge remote-tracking branch 'origin/develop' into v2 (0edacaa)
    • feature: implemented yarn audit in package.json, travis and appveyor (#171) (aec246b)
    • Merge pull request #167 from kalimdorjs/bug/mainstream-remove-nsp (391ca7a)
    • chore: removing nsp for the mainstream merge (252b9d9)
    • Merge pull request #162 from kalimdorjs/refactor/add_dummy_features-tfjs (17b780b)
    • bug: tf.min to tf.max and updating the tests (585e9e0)
    • chore: deleting clone (13610f4)
    • wip: updating to tfjs-core (ae9f034)
    • refactor: refacotring add_dummy_feature to tfjs-core (786ebca)
    • Merge pull request #142 from kalimdorjs/bayes-tensors (1a578de)
    • chore: implementing alpha value (b133889)
    • chore: updating changelog (c117851)
    • refactor: exception tests and improving doc strings (a59ee9d)
    • chore: simplifying types and updating docstrings (8b51713)
    • chore: adding MultinomialNB into require tests (35409ce)
    • chore: exposing multinomial through index.ts (933a81d)
    • chore: simplifying GaussianNB validation and typings (571340f)
    • refactor: simplifying fit validations (4e430c4)
    • chore: adding exception tests (0d22ba3)
    • chore: simplifying validations in predict and fit using the validation utilities (37044eb)
    • refactor: removing type when using tf.tensor1d, we can rely on type inferencing (90edece)
    • refactor: removing unnecessary try catches (fb72a40)
    • refactor: simplifying typecheck and validation for predict (9520761)
    • refactor: simplifying typings 1. toJSON and fromJSON now leverages reshape method 2. fixing TF warnings with typing (1410990)
    • Merge remote-tracking branch 'origin/v2' into bayes-tensors (5d6d162)
    • wip: refactoring types (0c54700)
    • chore: updating code 1. Removing duplicate interface types. InterfaceFitModel and InterfaceFitModelAsArray can be consolidated 2. removing modelState, we can just save them as class fields 3. Using Type1DMatrix and Type2DMatrix instead of ReadOnlyArray as type 4. Refactring toJSON and fromJSON accordingly 5. Refactoring fitModel function, mostly typings 6. using tf's sum reduction to get product reduced row (e649663)
    • chore: removing excessive comments (d4be97a)
    • refactor: updating tfc. to tf. (79489ca)
    • chore: adding as tfc.Tensor (1806cc3)
    • chore: refactor Tensor to tf.Tensor (a15e7d4)
    • feature/v2_mean_absolute_error (#152) (e1440e2)
    • refactor/PCA to tfjs (#154) (5d4336d)
    • refactor/confusion matrix tfjs (#155) (752bf1f)
    • Added multinomial naive bayes machine learning algorithm (e94b478)
    • Added support for constraint in doc types (5069987)
    • Merge pull request #150 from kalimdorjs/enhance/expose-reshape-through-index (93f3930)
    • fix: exposing reshape through index (c7e7d94)
    • fix: doc processor updated to support native TS types (1aa7fa7)
    • Merge pull request #149 from kalimdorjs/feature/util-tensor-data-reconstruct (ab37d3d)
    • Merge remote-tracking branch 'origin/v2' into bayes-tensors (12b2d4a)
    • Merge remote-tracking branch 'origin/v2' into feature/util-tensor-data-reconstruct (6c018cd)
    • docs: updating docs (aafd4f3)
    • doc: updating docstring (3127a8b)
    • doc: adding a reason why we need reshape (4491bb1)
    • chore: adding more examples to the reshape method (cbcf0b3)
    • chore: moving the reshape method to ops/tensor_ops.ts; adding more exception tests (8d9b585)
    • chore: adding more tests against the reshape method (1d3ced0)
    • chore: adding reshape, copied from math.js (9b64d9f)
    • wip: matrix reshaping (9b6f0f5)
    • Merge remote-tracking branch 'origin/master' into v2 (7aaa06e)
    • chore: adding a placeholder tensor.ts (f5b6940)
    • naive bayes with tensors (6f842e9)
    • Enhance/doc processor unit tests (#140) (589060b)
    • chore: updating versions for npm install -g release-it to 8.0.0 (#139) (d1e8490)
    • chore: updating package.json repo url to kalimdorjs/kalimdorjs (607556b)
    • chore: install release-it 7.3.0 in the release-in-docker scripts (28f65e5)
    • chore: fixing pre-release-it.sh file name (d9f94b1)
    • Feature/v2 lasso and ridge (#134) (2dbead3)
    • Enhance/pre release (#135) (e72eccb)
    • feature/mean_squared_error (#138) (40549b9)
    • Merge pull request #132 from kalimdorjs/enhance/v2-refactor-input-validation (bc187dc)
    • chore: updating kmeans and PCA (ea7e11a)
    • fix: IMlModel ModelState is not key: any instead or key: specific type (d2e25e8)
    • chore: updating model data type using class generics (36708d2)
    • chore: PCA now implements IMlModel (c9bf307)
    • chore: ignoring ops methods (e3f4b57)
    • chore: updating train_test_split API to be consistent with the others (1ee6f35)
    • refactor: normalize refactor -> new validation API (c6bbb07)
    • chore: updating polynomialFeatures and add_dummy_features tests & API (c78f213)
    • refactor: binarizer now uses the new validation API (6e3cb0d)
    • chore: MinMaxScaler adding exception tests & inverse transform tests (df06db7)
    • refactor: SGDRegressor and SGDClassifier with the new validation API and updating the unit tests (738541b)
    • chore: updating gaussian and knn examples (a69c762)
    • chore: updating SGD with the new validation APIs (371856a)
    • chore: refactoring KFold to use the new typing and validation API (df9af26)
    • chore: fixing the build error on singlePredict function (a918c0e)
    • chore: CounterVectorizer validation refactor (3446955)
    • chore: updating LabelEncoder fit and transform (8c75d0b)
    • chore: updating SVM to use the new validation API (b407998)
    • chore: implementing the new validation APIs to PCA (fc1caee)
    • fix: build error in the repl file (72c73ff)
    • chore: fix & adding matrix validation to LinearRegression (7a7f4b1)
    • chore: adding a TODO to check datatype when validating matrix (ad8e7b2)
    • chore: updating KNN tests to reflect the input validation improvment (c7bc3a6)
    • wip: refactoring KNN to use the new typing system (d41511c)
    • fix (c2f371d)
    • chore: refactoring input validation for predict and fit for RandomForestClassifier; adding tests against the refactor (ec5a008)
    • chore: adding sample vs target shape compare; refactor gaussian to use the new input validations (41940ba)
    • chore: adding some examples to the docstring for inferShape (4fc1289)
    • chore: implementing the new validation method to tree.predict (3a5c8fa)
    • chore: replacing validation code with the new API (e8a46a3)
    • chore: removing prettier fix, just rely on TSLint fix. Adding more unit tests for the ops code (52c1b5a)
    • chore: adding iris test for validateFitInputs (0dca050)
    • chore: adding tests for validateFitInputs (e161a50)
    • chore: adding validate functions for 2d 1d and fit train inputs (390b1be)
    • enhancement/better Typescript typings (#117) (d0f6a2d)
    • Enhance/v2 sgd regressor classifier (#119) (5d62b0c)
    • Merge remote-tracking branch 'origin/develop' into v2 (02678f5)
    • Feature/v2 tensor ops (#124) (ed81d76)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.6(Nov 28, 2018)

  • 1.2.5(Nov 27, 2018)

  • 1.2.4(Oct 28, 2018)

    :rocket: bug fixes :rocket:

    • docs: Removing an extra text from the site footer
    • bug: Boston Dataset is not correctly exported from index.ts
    Source code(tar.gz)
    Source code(zip)
  • 1.2.3(Oct 23, 2018)

    [1.2.3]

    :rocket: bug fixes :rocket:

    • docs: all-contributors module for contribution recognisation
    • devops: Husky precommit hooks to ensure all commits satisfy the linters. Thanks @OlegStotsky !!
    • docs: Removed the codacy badge and its integration
    • devops: Development environment now supports Windows environment. Thanks @LSBOSS !
    • bug: PolynomialFeatures and normalize exports in preprocessing/index.ts
    • bug: SGDClassifier and SGDRegressor exports in linear_model/index.ts
    Source code(tar.gz)
    Source code(zip)
  • 1.2.2(Oct 4, 2018)

    :rocket: Adding Examples page, more linear models and more datasets :rocket:

    • docs: Examples page on the doc site - Titanic Datasets using RandomForest
    • **docs: ** Hiding utils functions from showing up in the doc
    • feature: Adding PolynomialFeature extraction
    • **docs: ** KMeans clustering demo
    • **bug: ** Incorrect import statement on KMeans clustering example
    Source code(tar.gz)
    Source code(zip)
  • 1.2.1(Aug 26, 2018)

  • 1.2.0(Aug 23, 2018)

    :rocket: Introducing new features! :rocket:

    Updates:

    • feature: preprocessing/add_dummy_feature
    • feature: linear_model/SGDClassifier
    • feature: linear_model/SGDRegressor
    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Aug 16, 2018)

    Updates:

    • enhance: ensemble/RandomForest
    • docs: Better rendering for object and promise type return values
    • enhance: Datasets APIs are now based on promise
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Aug 6, 2018)

    :raised_hands: Minor release to deliver a couple improvements :raised_hands:

    In this minor release, it focuses on the first enhancement of existing APIs and delivers new features. As the release contains a feature, GaussianNB, and an enhancement of DecisionTree, we thought a minor release is suitable for it.

    Updates:

    • feature: GaussianNB (Gaussian Naive Bayes Classifier) -- What is Naive Bayes? Please check out https://machinelearningmastery.com/naive-bayes-for-machine-learning/
    • enhancement: DecisionTree -- Fixed the way that the DecisionTree returns the prediction results -- Instead of returning all the possible Leafs, it will return the most occurred target Leaf according to a voting process
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jul 30, 2018)

    :baby_chick: hooray! initial release :baby_chick:

    In the first release of Kalimdorjs, it aims to deliver the essential models and algorithms required to conduct the fundamental Machine Learning experiment and development. Some APIs still might be unstable but they will be improved over time as we receive feedback from people. You will be seeing new patches being delivered constantly to make gradual improvements until the library reaches a certain level of maturity.

    • feature: cluster/KMeans
    • feature: datasets/Iris
    • feature: decomposition/PCA
    • feature: ensemble/RandomForest
    • feature: feature_extraction/CountVectorizer
    • feature: linear_model/LinearRegression
    • feature: metrics/accuracyScore
    • feature: metrics/confusion_matrix
    • feature: metrics/zeroOneLoss
    • feature: model_selection/KFold
    • feature: model_selection/train_test_split
    • feature: neighbors/KDTree
    • feature: neighbors/KNeighborClassifier
    • feature: preprocessing/Binarizer
    • feature: preprocessing/Imputer
    • feature: preprocessing/LabelEncoder
    • feature: preprocessing/MinMaxScaler
    • feature: preprocessing/OneHotEncoder
    • feature: svm/NuSVC
    • feature: svm/NuSVR
    • feature: svm/OneClassSVM
    • feature: svm/SVC
    • feature: svm/SVR
    • feature: tree/DecisionTreeClassifier
    Source code(tar.gz)
    Source code(zip)
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
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 tools in JavaScript

ml.js - Machine learning tools in JavaScript Introduction This library is a compilation of the tools developed in the mljs organization. It is mainly

ml.js 2.3k Jan 1, 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
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
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
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
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
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
🤖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
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
architecture-free neural network library for node.js and the browser

Synaptic Important: Synaptic 2.x is in stage of discussion now! Feel free to participate Synaptic is a javascript neural network library for node.js a

Juan Cazala 6.9k Dec 27, 2022
A lightweight library for neural networks that runs anywhere

Synapses A lightweight library for neural networks that runs anywhere! Getting Started Why Sypapses? It's easy Add one dependency to your project. Wri

Dimos Michailidis 65 Nov 9, 2022
A WebGL accelerated JavaScript library for training and deploying ML models.

TensorFlow.js TensorFlow.js is an open-source hardware-accelerated JavaScript library for training and deploying machine learning models. ⚠️ We recent

null 16.9k Jan 4, 2023
A library for prototyping realtime hand detection (bounding box), directly in the browser.

Handtrack.js View a live demo in your browser here. Handtrack.js is a library for prototyping realtime hand detection (bounding box), directly in the

Victor Dibia 2.7k Jan 3, 2023