{"_id":"nn","_rev":"44-f01ddf20e4e2de2c3e5149a3fcda19b9","name":"nn","description":"Fast and simple neural network for node.js","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.0":{"name":"nn","version":"0.0.0","description":"ERROR: No README.md file found!","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":"","author":{"name":"Tolga Tezel"},"license":"MIT","readme":"ERROR: No README.md file found!","_id":"nn@0.0.0","dist":{"shasum":"8c00d9fa9a76fbb76c54c42c821a7a3ed553ba7e","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.0.tgz","integrity":"sha512-4kWtMWsut7dZtKH6x18BFQzxAk/oYUjhf8QrRtVgQ9zqLuMqI0WjFJllyCOSWuBd4AWs9Z0KAi/Ev5EYDPOc5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDo3FDwSl/Bgf/yFNRIT0xLp9lwdftN922wEdKGVecMZAiBMbsx9DxCIc3vr23grriePChgddYoqmPriWDMDC530ZQ=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.1":{"name":"nn","version":"0.0.1","description":"Simple, flexible neural network for node.js","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn"},"keywords":["neural","net","network","AI"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"readme":"#`nn`\n\n#Simple, fast Neural Network for node.js\n\n##Install\n```\nnpm install nn\n```\n\n##Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// train the neural network with input/output sets\nnet.train({ input: [1, 2, 3], output: [0, 1, 0] })\n\n// or train in bulk with an array of input/output sets\nnet.train([\n    { input: [0.1, 0.4, 0.6], output: [0.18, 0.2, 0.82] },\n    { input: [0.8, 0.6, 0.4], output: [0.9, 0.12, 0.054] },\n    ...\n])\n\n// send it an input array to see its trained output\nvar output = net.send([0.1, 0.2])\n```\n\n##API\n\n###`nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. The default configuration is shown below. Any values specified in `opts` will override the corresponding defaults.\n\n```\n{\n    // hidden layers eg. [ 4, 2 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // initial weight on each connection\n    weight: 0.1,\n    // training epochs to perform on the training data\n    iterations: 2000,\n    // minimum acceptable error threshold\n    errorThresh: 0.005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.3,\n    // learning momentum\n    momentum: 0.1,\n    // initial bias value for each neuron\n    bias: 0.1,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n###`.train(trainingData)`\n\nTrain your `nn` instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `output` keys, or an array of training entries. By default, `nn` will perform 2000 epochs of training on the data passed in, or less if it manages to achieve an error margin of less than `errorThresh` on the data.\n\n###`.send(input)`\n\nSend your `nn` instance input data to see its output. Typically you'll want to call this function after training your instance.\n\n-------\n\n## License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"nn@0.0.1","dist":{"shasum":"e16cae6152d9d85e0d74f533219b514549ac0927","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.1.tgz","integrity":"sha512-aveKg9qos0SAQ62Dq/M+Oi2qgToNPM8tp1A8SXDil3XcRHnxU1sRJJhLKrMNdBvJmD6xSS30VstRnkCIHrBwoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDE3RjFOvXdzo/3lIkLIgK1ugumkGBLX27D2r+lm7klfAIhAP7MbOwWyxtK3A9swCeaUcPa2DbH3OJytzxG7BQJkjO/"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.2":{"name":"nn","version":"0.0.2","description":"Fast and simple neural network for node.js","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn"},"keywords":["neural","network","net","AI","regression","pattern","recognition"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"readme":"#`nn`\n\n#Fast and simple Neural Network for node.js\n\n#Install\n```\nnpm install nn\n```\n\n#Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// train the neural network with input/output sets\nnet.train({ input: [1, 2, 3], output: [0, 1, 0] })\n\n// or train in bulk with an array of input/output sets\nnet.train([\n    { input: [0.1, 0.4, 0.6], output: [0.18, 0.2, 0.82] },\n    { input: [0.8, 0.6, 0.4], output: [0.9, 0.12, 0.054] },\n    ...\n])\n\n// send it an input array to see its trained output\nvar output = net.send([0.1, 0.2])\n```\n\n#methods\n\n##`var net = nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. Any values specified in `opts` will override the corresponding defaults.\n\nThe default configuration is shown below:\n```javascript\n{\n    // hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // training epochs to perform on the training data\n    iterations: 20000,\n    // minimum acceptable error threshold\n    errorThresh: 0.005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.3,\n    // learning momentum\n    momentum: 0.1,\n    // initial bias value for each neuron\n    bias: 0.1,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n##`net.train(trainingData)`\n\nTrain your `nn` instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `output` keys, or an array of training entries. By default, `nn` will perform 2000 epochs of training on the data passed in, or less if it manages to achieve an error margin of less than `errorThresh` on the data.\n\n##`net.send(input)`\n\nSend your `nn` instance input data to see its output. Typically you'll want to call this function after training your instance.\n\n-------\n\n# License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"nn@0.0.2","dist":{"shasum":"2744045c59a1f2667f054c4792a46506282c8962","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.2.tgz","integrity":"sha512-FkSHO/26tFf9Xzt5/ungzThkwj/0yc5tn/7+KIUAncA8eLX6GKuwt7hjM8LjPnGK4LpHunjK6ZcXBnW3jNa+Jg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXwm+YfnCowdnFJcaJwffzlW1OxTPo14IzoBI80hD5CAiBPB8AQnNR0klr05liJylNbiSzCNVa1HgcLw7YdNA42kQ=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.3":{"name":"nn","version":"0.0.3","description":"Fast and simple neural network for node.js","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn"},"keywords":["neural","network","net","AI","regression","pattern","recognition"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"readme":"#`nn`\n\n#Fast and simple Neural Network for node.js\n\n#Install\n```\nnpm install nn\n```\n\n#Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// train the neural network with input/output sets\nnet.train({ input: [1, 2, 3], output: [0, 1, 0] })\n\n// or train in bulk with an array of input/output sets\nnet.train([\n    { input: [0.1, 0.4, 0.6], output: [0.18, 0.2, 0.82] },\n    { input: [0.8, 0.6, 0.4], output: [0.9, 0.12, 0.054] },\n    ...\n])\n\n// send it an input array to see its trained output\nvar output = net.send([0.1, 0.2])\n```\n\n#methods\n\n##`var net = nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. Any values specified in `opts` will override the corresponding defaults.\n\nThe default configuration is shown below:\n```javascript\n{\n    // hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // maximum training epochs to perform on the training data\n    iterations: 20000,\n    // minimum acceptable error threshold\n    errorThresh: 0.0005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.4,\n    // learning momentum\n    momentum: 0.5,\n    // initial bias value for each neuron\n    bias: 0.1,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n##`net.train(trainingData)`\n\nTrain your `nn` instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `output` keys, or an array of training entries. By default, `nn` will perform 2000 epochs of training on the data passed in, or less if it manages to achieve an error margin of less than `errorThresh` on the data.\n\n##`net.send(input)`\n\nSend your `nn` instance input data to see its output. Typically you'll want to call this function after training your instance.\n\n-------\n\n# License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"nn@0.0.3","dist":{"shasum":"bc77ef678417dcf3ad2a17908a1ad83e4a7810a8","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.3.tgz","integrity":"sha512-9aeFiIUTS0UkhqzGXKnORCvDz79khAL1smgqnEZ+UD0hUYK+Ls+kAVx4q+LNd1RZbRAeNVzflmJJDSByocFRuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEExpKzNGNh/RxE4o2+T0kAW0Kp12WgpkG8mTDSPFG44AiEA5g9VRO18cTmTdT7sI/xq9aFvYsfGn0cHq7kC8dXpWHc="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.4":{"name":"nn","version":"0.0.4","description":"Fast and simple neural network for node.js","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn"},"keywords":["neural","network","net","AI","regression","pattern","recognition"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"readme":"#`nn`\n\n#Fast and simple Neural Network for node.js\n\n#Install\n```\nnpm install nn\n```\n\n#Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// train the neural network with input/output sets\nnet.train({ input: [1, 2, 3], output: [0, 1, 0] })\n\n// or train in bulk with an array of input/output sets\nnet.train([\n    { input: [0.1, 0.4, 0.6], output: [0.18, 0.2, 0.82] },\n    { input: [0.8, 0.6, 0.4], output: [0.9, 0.12, 0.054] },\n    ...\n])\n\n// send it an input array to see its trained output\nvar output = net.send([0.1, 0.2])\n```\n\n#methods\n\n##`var net = nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. Any values specified in `opts` will override the corresponding defaults.\n\nThe default configuration is shown below:\n```javascript\n{\n    // hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // maximum training epochs to perform on the training data\n    iterations: 20000,\n    // minimum acceptable error threshold\n    errorThresh: 0.0005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.4,\n    // learning momentum\n    momentum: 0.5,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n##`net.train(trainingData)`\n\nTrain your `nn` instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `output` keys, or an array of training entries. By default, `nn` will perform 2000 epochs of training on the data passed in, or less if it manages to achieve an error margin of less than `errorThresh` on the data.\n\n##`net.send(input)`\n\nSend your `nn` instance input data to see its output. Typically you'll want to call this function after training your instance.\n\n-------\n\n# License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"nn@0.0.4","dist":{"shasum":"0a136d75779a4a4f5f9fbf327c60060351531e7f","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.4.tgz","integrity":"sha512-dKOJC5X0zXjB+iDn2B8uMDF7u85DX6UCyKAc/8UvGXJRvm2Z2KO4ovNrlQ/sVt9N0T1/MhUUZJ+OndC2vShVQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDNZDkRo77hmHUdCukk5wc9MW+5VaHAvk5PyYDyhwClcAiAe3ak+bpjg9rVjFn0oUD8gWOJeQenm3H7H09Wll2GWVw=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.5":{"name":"nn","version":"0.0.5","description":"Fast and simple neural network for node.js","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn"},"keywords":["neural","network","net","AI","regression","pattern","recognition"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"readme":"#`nn`\n\n#Fast and simple Neural Network for node.js\n\n`nn` is a Neural Network library built for performance and ease of use. It is easy to configure and has sane defaults. You can use it for tasks such as pattern recognition and function approximation. \n\n#Install\n```\nnpm install nn\n```\n\n#Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// this example shows how we could train it to approximate sin(x)\n// from a random set of input/output sets.\nnet.train([\n    { input: [ 0.5248588903807104 ],    output: [ 0.5010908941521808 ] },\n    { input: [ 0 ],                     output: [ 0 ] },            \n    { input: [ 0.03929789311951026 ],   output: [ 0.03928777911794752 ] },\n    { input: [ 0.07391509227454662 ],   output: [ 0.07384780553540908 ] },\n    { input: [ 0.11062344848178328 ],   output: [ 0.1103979598825075 ] },\n    { input: [ 0.14104655454866588 ],   output: [ 0.14057935309092454 ] },\n    { input: [ 0.06176552915712819 ],   output: [ 0.06172626426511784 ] },\n    { input: [ 0.23915000406559558 ],   output: [ 0.2368769073277496 ] },\n    { input: [ 0.27090200221864513 ],   output: [ 0.267600651550329 ] },\n    { input: [ 0.15760037200525404 ],   output: [ 0.1569487719674096 ] },\n    { input: [ 0.19391102618537845 ],   output: [ 0.19269808506017222 ] },\n    { input: [ 0.42272064974531537 ],   output: [ 0.4102431360805792 ] },\n    { input: [ 0.5248469677288086 ],    output: [ 0.5010805763172892 ] },\n    { input: [ 0.4685300185577944 ],    output: [ 0.45157520770441445 ] },\n    { input: [ 0.6920387226855382 ],    output: [ 0.6381082150316612 ] },\n    { input: [ 0.40666140150278807 ],   output: [ 0.3955452139761714 ] },\n    { input: [ 0.011600911058485508 ],  output: [ 0.011600650849602313 ] },\n    { input: [ 0.404806485096924 ],     output: [ 0.39384089298297537 ] },\n    { input: [ 0.13447276877705008 ],   output: [ 0.13406785820465852 ] },\n    { input: [ 0.22471809106646107 ],   output: [ 0.222831550102815 ] } \n])\n\n// send it a new input to see its trained output\nvar output = net.send([ 0.5 ]) // => 0.48031129953896595\n```\n\n#methods\n\n##`var net = nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. Any values specified in `opts` will override the corresponding defaults.\n\nThe default configuration is shown below:\n```javascript\n{\n    // hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // maximum training epochs to perform on the training data\n    iterations: 20000,\n    // maximum acceptable error threshold\n    errorThresh: 0.0005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.4,\n    // learning momentum\n    momentum: 0.5,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n##`net.train(trainingData)`\n\nTrain your `nn` instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `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.\n\n##`net.send(input)`\n\nSend your `nn` instance data to see its output. Typically you'll call this function after training your network.\n\n##`net.test(testData)`\n\nRun your neural network against `testData` and returns an object with statistics about the performance of the network against the test data. Typically you'll call this function after training your network.\n\n\n-------\n\n# License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"nn@0.0.5","dist":{"shasum":"d06a7327b42c7ce81c694a30d6a08d6d7d47a6c7","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.5.tgz","integrity":"sha512-opBwTf57uaYlF21vXORPCe+D2ga/YPEsPZujRcR6RZc/PcTI0FG+J1knxGp64IT25j1f2S7GLPjn+1R923WZ2Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDW4YI/8HuKPb+RECrYgtl69Hn8LDqit0guJ+uHjltuFwIgbcNmY1mjPdM822sr2DWNA7FbTrthavC0w9gqHlgupNw="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.6":{"name":"nn","version":"0.0.6","description":"Fast and simple neural network for node.js","main":"lib/nn.js","scripts":{"test":"./node_modules/.bin/mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn"},"keywords":["neural","network","net","AI","regression","pattern","recognition","classification"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"readme":"#`nn`\n\n#Fast and simple Neural Network for node.js\n\n`nn` is a Neural Network library built for performance and ease of use. It is easy to configure and has sane defaults. You can use it for tasks such as pattern recognition and function approximation. \n\n#Install\n```\nnpm install nn\n```\n\n#Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// this example shows how we could train it to approximate sin(x)\n// from a random set of input/output data.\nnet.train([\n    { input: [ 0.5248588903807104 ],    output: [ 0.5010908941521808 ] },\n    { input: [ 0 ],                     output: [ 0 ] },            \n    { input: [ 0.03929789311951026 ],   output: [ 0.03928777911794752 ] },\n    { input: [ 0.07391509227454662 ],   output: [ 0.07384780553540908 ] },\n    { input: [ 0.11062344848178328 ],   output: [ 0.1103979598825075 ] },\n    { input: [ 0.14104655454866588 ],   output: [ 0.14057935309092454 ] },\n    { input: [ 0.06176552915712819 ],   output: [ 0.06172626426511784 ] },\n    { input: [ 0.23915000406559558 ],   output: [ 0.2368769073277496 ] },\n    { input: [ 0.27090200221864513 ],   output: [ 0.267600651550329 ] },\n    { input: [ 0.15760037200525404 ],   output: [ 0.1569487719674096 ] },\n    { input: [ 0.19391102618537845 ],   output: [ 0.19269808506017222 ] },\n    { input: [ 0.42272064974531537 ],   output: [ 0.4102431360805792 ] },\n    { input: [ 0.5248469677288086 ],    output: [ 0.5010805763172892 ] },\n    { input: [ 0.4685300185577944 ],    output: [ 0.45157520770441445 ] },\n    { input: [ 0.6920387226855382 ],    output: [ 0.6381082150316612 ] },\n    { input: [ 0.40666140150278807 ],   output: [ 0.3955452139761714 ] },\n    { input: [ 0.011600911058485508 ],  output: [ 0.011600650849602313 ] },\n    { input: [ 0.404806485096924 ],     output: [ 0.39384089298297537 ] },\n    { input: [ 0.13447276877705008 ],   output: [ 0.13406785820465852 ] },\n    { input: [ 0.22471809106646107 ],   output: [ 0.222831550102815 ] } \n])\n\n// send it a new input to see its trained output\nvar output = net.send([ 0.5 ]) // => 0.48031129953896595\n```\n\n#methods\n\n##`var net = nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. Any values specified in `opts` will override the corresponding defaults.\n\nThe default configuration is shown below:\n```javascript\n{\n    // hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // maximum training epochs to perform on the training data\n    iterations: 20000,\n    // maximum acceptable error threshold\n    errorThresh: 0.0005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.4,\n    // learning momentum\n    momentum: 0.5,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n##`net.train(trainingData)`\n\nTrain your `nn` instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `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.\n\n##`net.send(input)`\n\nSends 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.\n\n##`net.test(testData)`\n\nRuns your neural network against `testData` and returns an object with statistics about the performance of the network against the test data. `testData` can be a single object with `input` and `output` keys, or an array of those objects. Typically you'll call this function after training your network.\n\n##`net.toJson()`\n\nReturns a JSON string representing the state of the neural network. You can later use `nn.fromJson()` to get back the neural network from the JSON string.\n\n##`nn.fromJson(jsonString)`\n\nLoad a neural network instance from the JSON representation. Pass in `jsonString` as a string.\n\n\n-------\n\n# License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"nn@0.0.6","dist":{"shasum":"44766858dcdc98498db7e2a5d9d1e159e96026d6","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.6.tgz","integrity":"sha512-G3+XLaPu7mZWdaVPJ0PhH9EiDVPaeb/LK3R1XCYop3J6Tz/eXKF6WiYYfgZSgE/6mH6q29GmXZLEYSUcELSIGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNK6iD+dPVNSKFKi4SYXf387PTAGsdXgOEJcUjDe+NbQIgShV2Hz/0ClOH6HA5/1Ki6W6TPqMAAvuGYkii3KXEBRY="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{}},"0.0.7":{"name":"nn","version":"0.0.7","description":"Fast and simple neural network for node.js","main":"lib/nn.js","scripts":{"test":"mocha -R spec -t 10000"},"repository":{"type":"git","url":"git://github.com/ttezel/nn.git"},"keywords":["neural","network","net","AI","regression","pattern","recognition","classification"],"author":{"name":"Tolga Tezel"},"license":"MIT","dependencies":{"mocha":"~1.8.2"},"gitHead":"62f0ecadf69ffc442ae40ae199ec839514e72e6c","bugs":{"url":"https://github.com/ttezel/nn/issues"},"homepage":"https://github.com/ttezel/nn#readme","_id":"nn@0.0.7","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"ttezel","email":"tolgatezel11@gmail.com"},"dist":{"integrity":"sha512-Elc6dy3FfdUWs6YPjwUpFLY9W+FVAqnuDDGQfoLTZuOl7TLK0Kgu6XfEUryKKkTC45fk1h8llYnOQ+BG55X+/w==","shasum":"62b416931a483f9c39023694de58cab15b8fdffb","tarball":"https://registry.npmjs.org/nn/-/nn-0.0.7.tgz","fileCount":5,"unpackedSize":28303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIutZCRA9TVsSAnZWagAA518P/0lCPulBxSE7gHnjsD/s\n/PO5qtRsMLCH8XsQPlUIzN3XzQTCNt/abC/y1cgcMbGzIh8urX6XRGOFBAlV\nhHTeosRfi8+55M4wCb9vfdq8P6xd8uDrSJY8oCfvcVYOfn/N4XPM0YqEt3zj\nuIfXpetXWeGXlMdgtc+hZcl1IPAit2xlEyRBhwFdhIbC8l7NDD0NPUDaKeqz\nVBrVyqLbRD0Bqmxv0M1MUtZDA3kkP5SnZOfSIpG8XWMz0g3DRnEEcU1hCKfJ\nfPB7DfRizNdhIvj4tov+KCHKS4GiUFm54Etp3++RkBlAl+HL5uKRZVgv/TfZ\n3CvK+/GWF1iYv9uIWf8SrUDxC8Dly6yI/4xqpaDWTIxj/lYXYkJMIfLGsag2\nr54qyVspRnr+Pv4cmxLFrQeJNNRXwTh7z8ijVYQkOYTufWI5NhKaoCBdjbws\nubJH6AbQFc5drCKwxfpFCA8DvDHd00gLlJPNNO7vDF752QQ/PMSiPFLBD83b\nkud9NYZDq7RAKjfI2jMrimVAxTNiS4MORAU8yDwm0UeDO21RVGpcdPNSdMgJ\nmCwarYkGCgnbxPc85orVaT6X9xYY6lgr7upBITVTJadtbXJi2C3OKztwuHr1\nE28HlgfhciXvqZiDjCRyXx3nE1eGayriBamlh/vZmHjM9WKj2hIxGJ8Fe06T\n7RJA\r\n=NEU3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGARPXJkXhKiHvP1ryng5YGBDPSI8Wxk5NtwobfamvccAiEAomPEEiac5nzGm5iK3C4RCSXCOMkE6qte9neWUEtIWKA="}]},"maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nn_0.0.7_1579346777335_0.19740682286838762"},"_hasShrinkwrap":false}},"readme":"# `nn`\n\n# Fast and simple Neural Network for node.js\n\n`nn` is a Neural Network library built for performance and ease of use. It is easy to configure and has sane defaults. You can use it for tasks such as pattern recognition and function approximation. \n\n# Install\n```\nnpm install nn\n```\n\n# Usage\n```javascript\nvar nn = require('nn')\n\nvar net = nn()\n\n// this example shows how we could train it to approximate sin(x)\n// from a random set of input/output data.\nnet.train([\n    { input: [ 0.5248588903807104 ],    output: [ 0.5010908941521808 ] },\n    { input: [ 0 ],                     output: [ 0 ] },            \n    { input: [ 0.03929789311951026 ],   output: [ 0.03928777911794752 ] },\n    { input: [ 0.07391509227454662 ],   output: [ 0.07384780553540908 ] },\n    { input: [ 0.11062344848178328 ],   output: [ 0.1103979598825075 ] },\n    { input: [ 0.14104655454866588 ],   output: [ 0.14057935309092454 ] },\n    { input: [ 0.06176552915712819 ],   output: [ 0.06172626426511784 ] },\n    { input: [ 0.23915000406559558 ],   output: [ 0.2368769073277496 ] },\n    { input: [ 0.27090200221864513 ],   output: [ 0.267600651550329 ] },\n    { input: [ 0.15760037200525404 ],   output: [ 0.1569487719674096 ] },\n    { input: [ 0.19391102618537845 ],   output: [ 0.19269808506017222 ] },\n    { input: [ 0.42272064974531537 ],   output: [ 0.4102431360805792 ] },\n    { input: [ 0.5248469677288086 ],    output: [ 0.5010805763172892 ] },\n    { input: [ 0.4685300185577944 ],    output: [ 0.45157520770441445 ] },\n    { input: [ 0.6920387226855382 ],    output: [ 0.6381082150316612 ] },\n    { input: [ 0.40666140150278807 ],   output: [ 0.3955452139761714 ] },\n    { input: [ 0.011600911058485508 ],  output: [ 0.011600650849602313 ] },\n    { input: [ 0.404806485096924 ],     output: [ 0.39384089298297537 ] },\n    { input: [ 0.13447276877705008 ],   output: [ 0.13406785820465852 ] },\n    { input: [ 0.22471809106646107 ],   output: [ 0.222831550102815 ] } \n])\n\n// send it a new input to see its trained output\nvar output = net.send([ 0.5 ]) // => 0.48031129953896595\n```\n\n# methods\n\n## `var net = nn(opts)`\n\nCreates a Neural Network instance. Pass in an optional `opts` object to configure the instance. Any values specified in `opts` will override the corresponding defaults.\n\nThe default configuration is shown below:\n```javascript\n{\n    // hidden layers eg. [ 4, 3 ] => 2 hidden layers, with 4 neurons in the first, and 3 in the second.\n    layers: [ 3 ],\n    // maximum training epochs to perform on the training data\n    iterations: 20000,\n    // maximum acceptable error threshold\n    errorThresh: 0.0005,\n    // activation function ('logistic' and 'hyperbolic' supported)\n    activation: 'logistic',\n    // learning rate\n    learningRate: 0.4,\n    // learning momentum\n    momentum: 0.5,\n    // logging frequency to show training progress. 0 = never, 10 = every 10 iterations.\n    log: 0   \n}\n```\n\n## `net.train(trainingData)`\n\nTrain your neural network instance, using `trainingData`. You can pass in a single training entry as an object with `input` and `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.\n\n## `net.send(input)`\n\nSends 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.\n\n## `net.test(testData)`\n\nRuns your neural network against `testData` and returns an object with statistics about the performance of the network against the test data. `testData` can be a single object with `input` and `output` keys, or an array of those objects. Typically you'll call this function after training your network.\n\n## `net.toJson()`\n\nReturns a JSON string representing the state of the neural network. You can later use `nn.fromJson()` to get back the neural network from the JSON string.\n\n## `nn.fromJson(jsonString)`\n\nLoad a neural network instance from the JSON representation. Pass in `jsonString` as a string.\n\n\n-------\n\n# License \n\n(The MIT License)\n\nCopyright (c) by Tolga Tezel <tolgatezel11@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","maintainers":[{"name":"ttezel","email":"tolgatezel11@gmail.com"}],"time":{"modified":"2022-06-21T10:57:54.750Z","created":"2013-03-15T19:24:39.136Z","0.0.0":"2013-03-15T19:24:39.966Z","0.0.1":"2013-04-23T20:54:22.933Z","0.0.2":"2013-04-24T03:26:56.445Z","0.0.3":"2013-04-24T03:51:11.430Z","0.0.4":"2013-04-24T04:04:56.258Z","0.0.5":"2013-04-24T16:39:45.091Z","0.0.6":"2013-04-24T22:07:25.887Z","0.0.7":"2020-01-18T11:26:17.450Z"},"author":{"name":"Tolga Tezel"},"repository":{"type":"git","url":"git://github.com/ttezel/nn.git"},"users":{"kkk123321":true},"homepage":"https://github.com/ttezel/nn#readme","keywords":["neural","network","net","AI","regression","pattern","recognition","classification"],"bugs":{"url":"https://github.com/ttezel/nn/issues"},"license":"MIT","readmeFilename":"README.md"}