🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

brain

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brain - npm Package Compare versions

Comparing version

to
0.6.3

{
"name": "brain",
"description": "Neural network library",
"version": "0.6.2",
"version": "0.6.3",
"author": "Heather Arthur <fayearthur@gmail.com>",

@@ -17,8 +17,5 @@ "repository": {

"mocha" : ">=1.0.0",
"canvas" : ">=0.10.0",
"cradle" : ">=0.2.0",
"should" : ">=0.6.0",
"async" : ">=0.1.18"
"canvas" : ">=0.10.0"
},
"keywords": ["neural network", "classifier", "machine learning"]
}

@@ -18,3 +18,3 @@ # brain

# Using in node
## Using in node
If you have [node](http://nodejs.org/) you can install with [npm](http://github.com/isaacs/npm):

@@ -24,6 +24,6 @@

# Using in the browser
## Using in the browser
Download the latest [brain.js](http://github.com/harthur/brain/downloads). Training is computationally expensive, so you should try to train the network offline (or on a Worker) and use the `toFunction()` or `toJSON()` options to plug the pre-trained network in to your website.
# Training
## Training
Use `train()` to train the network with an array of training data. The network has to be trained with all the data in bulk in one call to `train()`. The more training patterns, the longer it will take to train, but the better the network will be at classifiying new patterns.

@@ -56,3 +56,3 @@

The network will train until the training error has gone below the threshold (default `0.004`) or the max number of iterations (default `20000`) has been reached, whichever comes first.
The network will train until the training error has gone below the threshold (default `0.005`) or the max number of iterations (default `20000`) has been reached, whichever comes first.

@@ -76,3 +76,3 @@ By default training won't let you know how its doing until the end, but set `log` to `true` to get periodic updates on the current training error of the network. The training error should decrease every time.

# JSON
## JSON
Serialize or load in the state of a trained network with JSON:

@@ -95,3 +95,3 @@

```
# Streams
## Streams
The network now has a [WriteStream](http://nodejs.org/api/stream.html#stream_class_stream_writable). You can train the network by using `pipe()` to send the training data to the network.

@@ -118,3 +118,3 @@

# Options
## Options
`NeuralNetwork()` takes a hash of options:

@@ -142,4 +142,4 @@

# Bayesian classifier
## Bayesian classifier
The Bayesian classifier that used to be here has moved to its own library, [classifier](https://github.com/harthur/classifier).

@@ -1,3 +0,2 @@

var assert = require("should"),
canvas = require("canvas"),
var canvas = require("canvas"),
_ = require("underscore"),

@@ -63,3 +62,4 @@ brain = require("../../lib/brain"),

var result = crossValidate(brain.NeuralNetwork, {}, data);
console.log("Cross validating");
var result = crossValidate(brain.NeuralNetwork, data, {});

@@ -66,0 +66,0 @@ console.log("\nMisclassifications:");

@@ -1,2 +0,2 @@

var assert = require('should'),
var assert = require("assert"),
brain = require("../../lib/brain");

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

var assert = require('should'),
var assert = require("assert"),
brain = require("../../lib/brain");

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

var assert = require('should'),
var assert = require("assert"),
brain = require("../../lib/brain");

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

var assert = require('should'),
var assert = require("assert"),
lookup = require("../../lib/lookup");

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

var assert = require('should'),
var assert = require("assert"),
_ = require("underscore"),

@@ -3,0 +3,0 @@ brain = require("../../lib/brain");

@@ -1,3 +0,3 @@

var assert = require('should'),
brain = require("../../lib/brain");
var assert = require("assert"),
brain = require("../../lib/brain");

@@ -4,0 +4,0 @@ function StreamTester(opts) {

@@ -1,2 +0,2 @@

var assert = require("should"),
var assert = require("assert"),
brain = require("../../lib/brain");

@@ -3,0 +3,0 @@