Neural Network module for Pattern Recognition and Function Approximation
neurler is a Neural Network library built for performance and ease of use and can be used for tasks such as pattern recognition and function approximation.
npm install neurler
jasmine-node specs/ --verbose
var Neurler =var neurler =// this example shows how we could train it to approximate sin(x)// from a random set of input/output data.net// send it a new input to see its trained outputvar output = net // => 0.48031129953896595
var net = neurler(opts)
Creates a Neural Network instance. Pass in an optional
opts object to configure the instance. Any values specified in
opts will override the corresponding defaults.
The default configuration is shown below:
// hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.layers: 3// maximum training epochs to perform on the training dataiterations: 20000// maximum acceptable error thresholderrorThresh: 00005// activation function ('logistic' and 'hyperbolic' supported)activation: 'logistic'// learning ratelearningRate: 04// learning momentummomentum: 05// logging frequency to show training progress. 0 = never, 10 = every 10 iterations.log: 0
nn instance, using
trainingData. You can pass in a single training entry as an object with
output keys, or an array of training entries. The network will train itself from the supplied training data, until the error threshold has been reached, or the max number of iterations has been reached.
Sends your neural network the input data and returns its output.
input is an array of numbers. Typically you'll call this function after training your network.
Tezel's nn module.This library is an minified/improved version of
(The MIT License)
Copyright (c) by Manish Shivanandhan email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.