Mind.js alternatives and similar libraries
Based on the "Machine Learning" category.
Alternatively, view Mind.js alternatives based on common mentions on social networks and blogs.
-
ConvNetJS
Deep Learning in Javascript. Train Convolutional Neural Networks (or ordinary ones) in your browser. -
m2cgen
Transform ML models into a native code (Java, C, Python, Go, JavaScript, Visual Basic, C#, R, PowerShell, PHP, Dart, Haskell, Ruby, F#, Rust) with zero dependencies -
TensorFlow.js
A JavaScript library for training and deploying ML models in the browser and on Node.js.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Mind.js or a related project?
README
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
- Vectorized - uses a matrix implementation to process training data
- Configurable - allows you to customize the network topology
- Pluggable - download/upload minds that have already learned
Installation
$ yarn add node-mind
Usage
const Mind = require('node-mind');
/**
* Letters.
*
* - Imagine these # and . represent black and white pixels.
*/
const a = character(
'.#####.' +
'#.....#' +
'#.....#' +
'#######' +
'#.....#' +
'#.....#' +
'#.....#'
)
const b = character(
'######.' +
'#.....#' +
'#.....#' +
'######.' +
'#.....#' +
'#.....#' +
'######.'
)
const c = character(
'#######' +
'#......' +
'#......' +
'#......' +
'#......' +
'#......' +
'#######'
)
/**
* Learn the letters A through C.
*/
const mind = new Mind({ activator: 'sigmoid' })
.learn([
{ input: a, output: map('a') },
{ input: b, output: map('b') },
{ input: c, output: map('c') }
])
/**
* Predict the letter C, even with a pixel off.
*/
const result = mind.predict(character(
'#######' +
'#......' +
'#......' +
'#......' +
'#......' +
'##.....' +
'#######'
))
console.log(result) // ~ 0.5
/**
* Turn the # into 1s and . into 0s.
*/
function character(string) {
return string
.trim()
.split('')
.map(integer)
function integer(symbol) {
if ('#' === symbol) return 1
if ('.' === symbol) return 0
}
}
/**
* Map letter to a number.
*/
function map(letter) {
if (letter === 'a') return [ 0.1 ]
if (letter === 'b') return [ 0.3 ]
if (letter === 'c') return [ 0.5 ]
return 0
}
Plugins
Use plugins created by the Mind community to configure pre-trained networks that can go straight to making predictions.
Here's a cool example of the way you could use a hypothetical mind-ocr
plugin:
const Mind = require('node-mind')
const ocr = require('mind-ocr')
const mind = Mind()
.upload(ocr)
.predict(
'.#####.' +
'#.....#' +
'#.....#' +
'#######' +
'#.....#' +
'#.....#' +
'#.....#'
)
To create a plugin, simply call download
on your trained mind:
const Mind = require('node-mind')
const mind = Mind()
.learn([
{ input: [0, 0], output: [ 0 ] },
{ input: [0, 1], output: [ 1 ] },
{ input: [1, 0], output: [ 1 ] },
{ input: [1, 1], output: [ 0 ] }
]);
const xor = mind.download()
Here's a list of available plugins:
API
Mind(options)
Create a new instance of Mind that can learn to make predictions.
The available options are:
activator
: the activation function to use,sigmoid
orhtan
learningRate
: the speed at which the network will learnhiddenUnits
: the number of units in the hidden layer/siterations
: the number of iterations to runhiddenLayers
: the number of hidden layers
.learn()
Learn from training data:
mind.learn([
{ input: [0, 0], output: [ 0 ] },
{ input: [0, 1], output: [ 1 ] },
{ input: [1, 0], output: [ 1 ] },
{ input: [1, 1], output: [ 0 ] }
])
.predict()
Make a prediction:
mind.predict([0, 1])
.download()
Download a mind:
const xor = mind.download()
.upload()
Upload a mind:
mind.upload(xor)
.on()
Listen for the 'data' event, which is fired with each iteration:
mind.on('data', (iteration, errors, results) => {
// ...
})
Releasing / Publishing
CircleCI will handle publishing to npm. To cut a new release, just do:
$ git changelog --tag <version>
$ vim package.json # enter <version>
$ git release <version>
Where <version>
follows the semver spec.
Note
If you're interested in learning more, I wrote a blog post on how to build your own neural network:
Also, here are some fantastic libraries you can check out:
License
stevenmiller888.github.io · GitHub @stevenmiller888 · Twitter @stevenmiller888
*Note that all licence references and agreements mentioned in the Mind.js README section above
are relevant to that project's source code only.