Comparing version
{ | ||
"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 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2
-60%4
-20%119304
-28.53%23
-8%2969
-21.7%