Skip to content

Commit

Permalink
add browser sanity test, move test types into subdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
harthur committed Sep 19, 2010
1 parent ecb040c commit fdac57c
Show file tree
Hide file tree
Showing 18 changed files with 762 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -40,16 +40,16 @@ The `NeuralNetwork` works in the browser. Download the latest [brain.js](http://
# tests
Running the tests requires [node.js](http://nodejs.org/). To run the suite of API tests:

node test/runtests.js
node test/sanity/runtests.js

### cross-validation tests
The in-repo tests are just sanity/API checks, to really test out the library, run the cross-validation tests. These
test the classifiers on large sets of real training data and give an error value (between 0 and 1) that indicates how good the classifier is at training. You can run the default cross-validation tests with:

node test/runcv.js
node test/cvalidate/runcv.js

(requires network access to the dbs of training data). Specify your own db and options to pass in:

node test/runcv.js --type=neuralnetwork --db=http://localhost:5984/nndata --options='{learningRate:0.6}'
node test/cvalidate/runcv.js --type=neuralnetwork --db=http://localhost:5984/nndata --options='{learningRate:0.6}'

The db must be a [CouchDB](http://couchdb.com) database of JSON objects with 'input' and 'output' fields.

0 comments on commit fdac57c

Please sign in to comment.