{"_id":"gauss","_rev":"60-cc6671b1a0ce4119e9c1a631f31570a7","name":"gauss","description":"JavaScript statistics, analytics, and set library","dist-tags":{"latest":"0.2.12"},"versions":{"0.1.0":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics and analytics library","version":"0.1.0","repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_id":"gauss@0.1.0","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"2d591f865e03d6e59ea9c3b0435a11947133751a","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.1.0.tgz","integrity":"sha512-ozqLa/Sl4Jop/XtzkYKZ+qpMfzNNLqA0AAICnobE4v2gi8WJrcpgWB05ahHztHs+VWl8f0awHeJ0f4tsnJc73w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG72VtuOcCzeQpk2h/8vj3vuAbVMkwEtF5WuzKU5Br7zAiEA69g5xOF/xhn7lAz+N4GueS69AWxNKNK9U5vJQ2/p5fo="}]},"scripts":{},"directories":{}},"0.2.0":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics and analytics library","version":"0.2.0","repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_id":"gauss@0.2.0","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"78b09c98b900cf17e124c08b1162b845a10875e0","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.0.tgz","integrity":"sha512-M7AJPUsavYLOkBpXaxhgKsS58M/i1kMs8p6FWcU1SAMe6ft5eagmQP5+ToflxfcENBc9c2J1CVZ3xeNw7h4XXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhA5zc9mUkU9v6r3MAuA/y+KoWYwPzGkLCjYrS2vwS4gIgCB+uxKvZElzuX721Jp+Ac6uFdyrx4Ja5AgvpWJB2nUc="}]},"scripts":{},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}],"directories":{}},"0.2.1":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics and analytics library","version":"0.2.1","repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_id":"gauss@0.2.1","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"feee02ad6a1c3b02c78e6c34331717c681b02d14","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.1.tgz","integrity":"sha512-4zPzKoyc37MQQB1c/OBkPJqv2c4ZYc1kL5T5fOKh1ft7AP+6SoggHMm+/sJpaa7v53UT3uWfpYbiUSU4b2mEdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKw6iKDyooXE9isRCuZzZfeM0F07MlHjU5NU3HDnlVsgIhAK/XYlMa+IKnMtNNU9s/+JOuJq/KR6vnyxDn6T0wfbGd"}]},"scripts":{},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}],"directories":{}},"0.2.2":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.2","keywords":["statistics","analytics","timeseries","math","gauss"],"repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_npmUser":{"name":"wayoutmind","email":"fgaloso@stackd.com"},"_id":"gauss@0.2.2","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"bab7946f86be438a487ff0017a88a5b4001ee7ab","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.2.tgz","integrity":"sha512-gx2y18JZQWWlbBd7zx8rtYl2jguxdf9G8TVm/fCZwrHGjZMk8c8qsWjBTCBb25HQyMGrCbAYjg1clFb7ZuQatA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEIQ26lgUUEHm/B6JPI4d1tS8+2KrMI30KBwp02Pxs9jAiEAgM0DEs95aBsKLjvusIW1fXZQ7XrMdAb7edVAXkRUnUk="}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.3":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.3","keywords":["statistics","analytics","timeseries","math","gauss"],"repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_npmUser":{"name":"wayoutmind","email":"fgaloso@stackd.com"},"_id":"gauss@0.2.3","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"235afe363ff3a0bc4a9e358316b8fcef16131e31","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.3.tgz","integrity":"sha512-oyVSm/h5sM6RVvQpm3OnC7f8v0UEsZeEbDPJHmmnWi4y6DtWoQwPgg+Je37vgcYF6udoW7M7eZZ8IE9aOHB5aQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRzCJFhi2wGK2ldaZiPviOSYR69LYAi7vkm6JO5EskgwIhAMD4i5aG2Sb1QEuvR6O3LuQfxk7JNMR5rUvkR+DJQqpy"}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.4":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.4","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_npmUser":{"name":"wayoutmind","email":"fgaloso@stackd.com"},"_id":"gauss@0.2.4","_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"4a33225398064b57c3daa07d7e00ba6ac25ac364","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.4.tgz","integrity":"sha512-PtjFnbiedP3mRG1zY1avvnryb14EHq3eqbqyq4t8/PoApAfdtnC7pnzhz5sUCZC6f6HISFuo46WJHMVGFEHK5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDr6wQNbIU8pQIjCNLVUUDVqp76Tl6RzcPqKTfY2QCjzgIgCDcZUYU7ooWRNa8TJzJ6oJI8BtniFIvq2dRaVB4cgY0="}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.5":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.5","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":">=0.3.0"},"_npmUser":{"name":"wayoutmind","email":"fgaloso@stackd.com"},"_id":"gauss@0.2.5","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"d53c74630f44da2cd4a09fd83a7f07ce50947608","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.5.tgz","integrity":"sha512-+uZaAKHOXroPI76gxTv92oLCFMbUuwVKJoObmuTs26QPlKsL8y+j5C3T7CUgeAfyu9wNjDIIiJ+g7m95HFvwhg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJUKKME9rV/jBgrPdDOfj9G0yEoxRvOXYWVWfSTJj0MAIhAP1CjNz3zAvPtyqGulxAwukD2ytX6Z7p533dtzKbTV8p"}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.6":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.6","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":"latest","uglify-js":"latest"},"bin":{"gauss":"./bin/gauss"},"scripts":{"start":"./bin/gauss","test":"node_modules/.bin/vows --spec test/*","build":"node build.js"},"_npmUser":{"name":"wayoutmind","email":"fgaloso@stackd.com"},"_id":"gauss@0.2.6","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"a0adb184e03b98f54725382c37e845b675b91a92","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.6.tgz","integrity":"sha512-/gS9adNloDO7MJnd6Yhuer43CX5vNeD2CpsU8rK61BDqRtrZVbvTSGqVCgsTsNzX/Hu00Se60RYQzWzdvaEfaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrxnuD5XxFMGjsPcTEul6ZIPH7h2V4LKRYDGV58csLBAiBNM2/x3jj6BO4ndKTCzOVvJEsN8NBaTBhITX8N4ZYiCg=="}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.7":{"author":{"name":"Fredrick Galoso","email":"fgaloso@stackd.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.7","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/stackd/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":"latest","uglify-js":"latest"},"bin":{"gauss":"./bin/gauss"},"scripts":{"start":"./bin/gauss","test":"node_modules/.bin/vows test/*","build":"node build.js"},"_npmUser":{"name":"wayoutmind","email":"fgaloso@stackd.com"},"_id":"gauss@0.2.7","_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"48e455b54f8ff2ffcb0bd434b47a7ff43c2bf1b2","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.7.tgz","integrity":"sha512-zJDovmoPiJseDnlOx+/OG0h9u096jyi72d3x9wkOxg2GFSwLvbU/sTy4/L51I8vL0gm7fQbtsutG8tbjTl2alA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICT80RKXvHwH34GviAKy+1ZpxGgCN/ICgIB9kc43ft57AiEAwaQ3gNSJHe+erX0g4aum6O35ESZt9nIOM44m+EQHuM0="}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.8":{"author":{"name":"Fredrick Galoso","email":"fredrickgaloso@gmail.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.8","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/wayoutmind/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":"latest","uglify-js":"latest"},"bin":{"gauss":"./bin/gauss"},"scripts":{"start":"./bin/gauss","test":"node_modules/.bin/vows test/*","build":"node build.js"},"_id":"gauss@0.2.8","dist":{"shasum":"8a40a99b505f3d5ad29b1a9cc6bab87c788d885c","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.8.tgz","integrity":"sha512-ThD9ZmdmoXAxtdned65/kEkVpzBmK/A+SUwQZmLXU13wTVbppTRi9d3pmALMEUK1LeSbe+QjQC1E5vaxI4Noig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0D9o/zPwMV+w06s+EBrph16GCjyDtxM1v8UWBmQAORAiEAuwIrwWz7N/A536jNeXguXb0UjMN7MLfMR3gXLsKAyNc="}]},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.9":{"author":{"name":"Fredrick Galoso","email":"fredrickgaloso@gmail.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.9","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/wayoutmind/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":"latest","uglify-js":"latest"},"bin":{"gauss":"./bin/gauss"},"scripts":{"start":"./bin/gauss","test":"vows test/*","prepublish":"node build.js"},"_id":"gauss@0.2.9","dist":{"shasum":"2e08c83d2e0be69141357e2958e5c19dafe4e8df","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.9.tgz","integrity":"sha512-YEa+SHE+8BVkrUTUYsGXneyBtBsH8rhcrKl9AyjPznggRgblT/M06MSZrjPU8ATPE6w34RRk+2EVgr76qC4eqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTCFKkxEiVzwnRxUu+Mdi3XfAOnRqMnKTe5kxKJmYQ7AiAvOnGxih6NA4OH8o1zBhE76wZvbihMIFQk5AMkmVvMiA=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"wayoutmind","email":"fredrickgaloso@gmail.com"},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.11":{"author":{"name":"Fredrick Galoso","email":"fredrickgaloso@gmail.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.11","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/wayoutmind/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":"latest","uglify-js":"latest"},"bin":{"gauss":"./bin/gauss"},"scripts":{"start":"./bin/gauss","test":"vows test/*","prepublish":"node build.js"},"bugs":{"url":"https://github.com/wayoutmind/gauss/issues"},"_id":"gauss@0.2.11","dist":{"shasum":"70d9de02ff466d0726397e7c43bb3af1b1ecfc51","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.11.tgz","integrity":"sha512-19qce3Bo7XQEngHHbs1lNmU9a5JbEQlY49cH4mpaLDMQhtTvRQmzACyZgHIwh8o7U6p0u9oeyG6eB8OhVPGvtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCR1GazFv3uSCWDN7HngEv1FU1uYE5JP8uX6UnmbPi85AIhALWqClvZv5t4NNfqFNwIB6WVJVVESpzvtlCxDriHC7eq"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"wayoutmind","email":"fredrickgaloso@gmail.com"},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]},"0.2.12":{"author":{"name":"Fredrick Galoso","email":"fredrickgaloso@gmail.com"},"name":"gauss","description":"JavaScript statistics, analytics, and set library","version":"0.2.12","keywords":["statistics","analytics","timeseries","math","gauss","set"],"repository":{"type":"git","url":"git://github.com/wayoutmind/gauss.git"},"main":"index","engines":{"node":"*"},"dependencies":{},"devDependencies":{"vows":"latest","uglify-js":"latest"},"bin":{"gauss":"./bin/gauss"},"scripts":{"start":"./bin/gauss","test":"vows test/*","prepublish":"node build.js"},"bugs":{"url":"https://github.com/wayoutmind/gauss/issues"},"_id":"gauss@0.2.12","dist":{"shasum":"51255ad216c76938b3c5493269763f0fd57753f7","tarball":"https://registry.npmjs.org/gauss/-/gauss-0.2.12.tgz","integrity":"sha512-m1hqIRtJxskvWrZbOD62prG6ERKE84YMkuJC5HN0pVGWT1SLo4ColU3BsHsusxV7xcKPVmXL2txra7ggiEqSCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAPI1GgrRn5so85Jy+zZjNm38KssErehdpCjn6wHwe0AIhANu92SzKvqkcUUeqsKNUzLWNeVB4bDMJ3IfhfJ7SZZpT"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"wayoutmind","email":"fredrickgaloso@gmail.com"},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}]}},"maintainers":[{"name":"wayoutmind","email":"fgaloso@stackd.com"}],"time":{"modified":"2022-06-18T05:02:51.827Z","created":"2011-05-25T18:35:18.552Z","0.1.0":"2011-05-25T18:35:18.870Z","0.2.0":"2011-10-10T22:57:00.840Z","0.2.1":"2011-10-12T17:47:12.933Z","0.2.2":"2012-01-03T21:04:25.443Z","0.2.3":"2012-03-02T00:34:52.274Z","0.2.4":"2012-05-02T21:17:37.183Z","0.2.5":"2012-05-02T23:02:54.643Z","0.2.6":"2012-06-11T20:16:37.672Z","0.2.7":"2012-08-16T17:11:31.438Z","0.2.8":"2013-04-22T02:46:40.589Z","0.2.9":"2014-01-02T19:15:56.320Z","0.2.10":"2014-03-05T04:26:30.365Z","0.2.11":"2014-03-05T12:10:28.892Z","0.2.12":"2014-04-22T02:30:16.632Z"},"author":{"name":"Fredrick Galoso","email":"fredrickgaloso@gmail.com"},"repository":{"type":"git","url":"git://github.com/wayoutmind/gauss.git"},"users":{"26medias":true,"jimnox":true,"gyrostu":true,"mastayoda":true,"extropianer":true,"alcovegan":true},"readme":"Gauss\n=============\n[![Build Status](https://travis-ci.org/wayoutmind/gauss.png?branch=master)](https://travis-ci.org/wayoutmind/gauss)\n[![Dependency Status](https://gemnasium.com/wayoutmind/gauss.png)](https://gemnasium.com/wayoutmind/gauss)\n\n> JavaScript statistics, analytics, and set library - [Node.js](http://nodejs.org/) and web browser ready\n\nEvented, asynchronous, and fast, [Node.js][1] is an attractive platform for data mining, statistics, and data analysis.\n[Gauss](http://en.wikipedia.org/wiki/Carl_Friedrich_Gauss) makes it [easy to calculate and explore data through JavaScript](http://fredrickgaloso.me/talks/gauss.html#9),\nboth on Node.js and within the web browser.\n\n[1]: http://nodejs.org/\n\n## License\nMIT/X11 - See [LICENSE][2]\n\n## Support\nMailing list - [Google Group](https://groups.google.com/forum/?pli=1#!forum/gaussjs)\n\n[2]: http://github.com/wayoutmind/gauss/blob/master/LICENSE\n\n## Getting started\n\n### Install with NPM (Node Package Manager)\n\nGetting started with Gauss + Node.js is easy:\n\n    $ npm install gauss\n\n``` javascript\nvar gauss = require('gauss');\n```\n\n### Using Gauss within a web browser\n\nGauss requires support for ECMAScript 5 `Object.defineProperty`. Compatibility is listed [here](http://kangax.github.com/es5-compat-table/). Download and include [gauss.min.js](https://raw.github.com/wayoutmind/gauss/master/gauss.min.js):\n\n``` html\n<script src=\"gauss.min.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\" charset=\"utf-8\">\n    var Vector = gauss.Vector,\n        TimeSeries = gauss.TimeSeries;\n    var set = new gauss.Vector(5, 1, 3, 2, 21),\n        numbers = new Vector([8, 6, 7, 5, 3, 0, 9]);\n</script>\n```\n\nThe [Bower](http://bower.io/) package manager can also be used to install Gauss:\n\n    $ bower install gauss\n\nGauss is also [Asynchronous Module Definition](http://requirejs.org/docs/whyamd.html) compatible and\nworks with module loaders like [RequireJS](http://requirejs.org):\n\n``` html\n<script async src=\"gauss.min.js\"></script>\n<script>\n    require(['gauss'], function(gauss) {\n        var Collection = gauss.Collection,\n            distribution = new Collection(1, 2, 3).distribution();\n    });\n</script>\n```\n\n### Installing development dependencies and running tests\n\nTo run Gauss's tests you'll need [Vows](http://vowsjs.org/). NPM can automatically resolve this:\n\n    $ npm install gauss --devel\n\nTo invoke the tests:\n\n    $ npm test\n\n## API\n\n### Instantiation\n\n``` javascript\n// List of numbers\nvar set = new gauss.Vector(5, 1, 3, 2, 21);\n// From a regular Array\nvar numbers = new gauss.Vector([8, 6, 7, 5, 3, 0, 9]);\n// After instantiation, Gauss objects can be conveniently used like any Array\nnumbers[0] = 2;\nset[1] = 7;\n```\n\n*Note: To prevent unintended scope/prototype pollution, Gauss versions after 0.2.3 have [removed support for monkey patching](https://github.com/wayoutmind/gauss/issues/6) the native Array data type.\nUse the .toArray() method of any Gauss object to a convert to a vanilla Array.*\n\n### Scope chaining\n\nGauss collections utilize scope chaining for converting between collection types:\n\n``` javascript\nvar Collection = gauss.Collection;\nvar things = new Collection(\n    { type: 1, age: 1 },\n    { type: 2, age: 2 },\n    { type: 1, age: 3 },\n    { type: 2, age: 4 });\nthings\n    .find({ type: 2 })\n    .map(function(thing) { return thing.age; })\n    .toVector() // Scope chained converter, converting mapped collection of ages to Vector\n    .sum();\n```\n\n### Callbacks and method chaining\n\nAll of Gauss's methods accept an *optional* [callback][3]:\n\n[3]: http://en.wikipedia.org/wiki/Callback_(computer_programming)\n\n``` javascript\nset.min();\nset.min(function(result) {\n    result / 2;\n    /* Do more things with the minimum*/\n});\n```\n\nIn addition, for methods that return another Vector, method chaining makes it easy to perform calculations that flow through each other:\n\n``` javascript\nset.quantile(4).stdev(); // Find the standard deviation of data set's quartiles\n```\n\nFinally, you can mix and match both callbacks and chaining:\n\n``` javascript\nset.quantile(4).stdev(function(stdev) {\n    if (stdev > 1) {\n        /* Do something awesome */\n    }\n});\n```\n\n### Collection\n\n#### Collection.indexBy\n\n    .indexBy(predicate, callback)\n\nReturns the first index of an element that matches a condition.\n\n#### Collection.indicesOf\n\n    .indicesOf(element, callback)\n\nReturns the indices of all elements that match a value.\n\n#### Collection.indicesBy\n\n    .indicesBy(predicate, callback)\n\nReturns all indices of an element that match a condition.\n\n#### Collection.lastIndexBy\n\n    .lastIndexBy(predicate, callback)\n\nReturns the last index of an element that matches a condition.\n\n#### Collection.find\n\n    .find(predicate, callback)\n\nReturns all the elements that match a condition.\n\n``` javascript\nvar people = new gauss.Collection(\n  { firstname: 'John', lastname: 'Smith' },\n  { firstname: 'Jane', lastname: 'Doe' },\n  { firstname: 'Mike', lastname: 'Smith' },\n  { firstname: 'Susan', lastname: 'Baker' }\n);\n// Using a predicate Function\npeople.find(function(e) { return e.firstname === 'Jane' });\n> [{ firstname: 'Jane', lastname: 'Doe' }]\n// Using a condition Object\npeople.find({ lastname: 'Smith' });\n> [{ firstname: 'John', lastname: 'Smith' },\n  { firstname: 'Mike', lastname: 'Smith' }]\n```\n\n#### Collection.findOne\n\n    .findOne(predicate, callback)\n\nReturns the first element that matches a condition.\n\n``` javascript\n// Using a predicate Function\npeople.findOne(function(e) { return e.firstname === 'Jane' });\n> { firstname: 'Jane', lastname: 'Doe' }\n// Using a condition Object\npeople.findOne({ lastname: 'Smith' });\n> { firstname: 'John', lastname: 'Smith' }\n```\n\n#### Collection.split\n\n    .split(predicate[, callback])\n\nReturns a Collection split by a condition (binomial cluster).\n\n``` javascript\nCollection(1, 2, 3, 4).split(function(e) { return e % 2 === 0 });\n> [[1, 3], [2, 4]]\n```\n\n#### Collection.mode\n\n    .mode(callback)\n\nReturns the value(s) that occur the most frequently in a data set. If there is a tie, returns a Collection of values.\n\n#### Collection.frequency\n\n    .frequency(element, callback)\n\nReturns the number of occurrences of value within a data set.\n\n#### Collection.distribution\n\n    .distribution(format, callback)\n\nReturns an `Object` containing the (frequency) distribution of values within the Collection. Default format: `absolute`; `relative` returns ratio of occurrences and total number of values in a data set.\n\n``` javascript\nset.distribution();\n> {\n    1: 1,\n    2: 1,\n    3: 1,\n    5: 1,\n    21: 1\n  }\nset.distribution('relative');\n> {\n    1: 0.2,\n    2: 0.2,\n    3: 0.2,\n    5: 0.2,\n    21: 0.2\n  }\n```\n\n#### Collection.append\n\n    .append(that, callback)\n\nReturn Collection appended with an Array.\n\n``` javascript\nvar numbers = new Collection(1, 2, 3).append([1, 2, 3]);\n> [1, 2, 3, 1, 2, 3]\n```\n\n#### Collection.unique\n\n    .unique(callback)\n\nReturn a Collection with unique values.\n\n``` javascript\nvar numbers = new Collection(1, 2, 3, 3, 4, 4).unique();\n> [1, 2, 3, 4]\n```\n\n#### Collection.union\n\n    .union(array, callback)\n\nReturn the union of a Collection with another array.\n\n``` javascript\nvar union = new Collection('a', 'b', 'c').union(['c', 'd', 'e']);\n> ['a', 'b', 'c', 'd', 'e']\n```\n\n#### Collection.extend\n\n    .extend(methods, callback)\n\nReturns a Collection extended with named functions.\n\n### Vector\n\nExtends *Collection* methods with numerical functions.\n\n#### Vector.min\n\n    .min(callback)\n\nReturns the smallest number.\n\n#### Vector.max\n\n    .max(callback)\n\nReturns the largest number.\n\n#### Vector.equal\n\n    .equal(that)\n\nReturns `true` or `false` if Vector values are equal to another Vector or Array.\n\n#### Vector.sum\n\n    .sum(callback)\n\nReturns the sum of the numbers.\n\n#### Vector.product\n\n    .product(callback)\n\nReturns the product of the numbers.\n\n#### Vector.push\n\n    .push(number1, ..., numberN, callback)\n\nReturns the updated Vector with one or more elements appended to the end; performs/maintains streaming calculations.\n\n``` javascript\nvar Vector = require('gauss').Vector,\n    digits = new Vector();\n// Push some numbers in\ndigits.push(1, 2, 3);\n> 3\ndigits.sum();\n> 6\n// Keep on pushing; sum is updated as numbers are pushed\n digits.push(4, 5, 6);\n> 6\n```\n*Note: Streaming calculations like sum(), product(), variance(), and functions dependent on streaming capable functions benefit from O(1) amortized performance.*\n\n#### Vector.range\n\n    .range(callback)\n\nReturns the difference between the largest and smallest value in a data set.\n\n#### Vector.mean\n\n    .mean(callback)\n\nReturns the arithmetic mean.\n\n#### Vector.gmean\n\n    .gmean(callback)\n\nReturns the geometric mean.\n\n#### Vector.hmean\n\n    .hmean(callback)\n\nReturns the harmonic mean.\n\n#### Vector.qmean\n\n    .qmean(callback)\n\nReturns the quadratic mean (RMS, root mean square).\n\n#### Vector.pmean\n\n    .pmean(p, callback)\n\nReturns the power/generalized mean given an order or power *p*.\n\n```javascript\n// p = -1, harmonic mean\nset.pmean(-1);\n// p = 1, arithmetic mean\nset.pmean(1);\n// p = 2, quadratic mean\nset.pmean(2);\n```\n\n#### Vector.median\n\n    .median(callback)\n\nReturns the median. If there are an even amount of numbers in the data set, returns the arithmetic mean of the two middle values.\n\n#### Vector.mode\n\n    .mode(callback)\n\nReturns the value(s) that occur the most frequently in a data set. If there is a tie, returns a Vector of values.\n\n#### Vector.variance\n\n    .variance(callback)\n\nReturns a measure of how far a set of numbers are spread out from each other.\n\n#### Vector.stdev\n\n    .stdev(percent, callback)\n\nReturns the standard deviation of data set. If a percent is given, returns the standard deviation with respect to a percentile of the population.\n\n#### Vector.frequency\n\n    .frequency(value, callback)\n\nReturns the number of occurrences of value within a data set.\n\n#### Vector.percentile\n\n    .percentile(value, callback)\n\nReturns the value that below which a certain percent of observations fall within the data set.\n\n#### Vector.density\n\n    .density(percent, callback)\n\nReturns a Vector which is a percentile subset of values occurring within a data set.\n\n#### Vector.distribution\n\n    .distribution(format, callback)\n\nReturns an `Object` containing the (frequency) distribution of values within the Vector. Default format: `absolute`; `relative` returns ratio of occurrences and total number of values in a data set.\n\n``` javascript\nset.distribution();\n> {\n    1: 1,\n    2: 1,\n    3: 1,\n    5: 1,\n    21: 1\n  }\nset.distribution('relative');\n> {\n    1: 0.2,\n    2: 0.2,\n    3: 0.2,\n    5: 0.2,\n    21: 0.2\n  }\n```\n\n#### Vector.quantile\n\n    .quantile(quantity, callback)\n\nReturns a Vector of values that divide a frequency distribution into equal groups, each containing the same fraction of the total data set.\n\n``` javascript\nset.quantile(4); // Quartiles\n```\n\n#### Vector.sma\n\n    .sma(period, callback)\n\nReturns a Vector of the simple moving average (SMA); unweighted means of the previous n data points. `period` is the length of observation window for moving average.\n\n``` javascript\nvar prices = [22.2734, 22.194, 22.0847, 22.1741, 22.184, 22.1344,\n22.2337, 22.4323, 22.2436, 22.2933, 22.1542, 22.3926,\n22.3816, 22.6109, 23.3558, 24.0519, 23.753, 23.8324,\n23.9516, 23.6338, 23.8225, 23.8722, 23.6537, 23.187,\n23.0976, 23.326, 22.6805, 23.0976, 22.4025, 22.1725];\n\nprices = prices.toVector();\n\n// 10-period SMA\nprices.sma(10);\n> [ 22.22475, 22.21283, 22.232689999999998,\n    22.26238, 22.30606, 22.42324,\n    22.61499, 22.76692, 22.90693,\n    23.07773, 23.211779999999997, 23.37861,\n    23.52657, 23.653779999999998, 23.711389999999998,\n    23.68557, 23.61298, 23.50573,\n    23.43225, 23.27734, 23.13121\n  ]\n```\n\n#### Vector.ema\n\n    .ema(options, callback)\n\nReturns a Vector of the exponential moving average (EMA); weighted means of the previous n data points.\n`options` is\n\n- Number Length of the observation window for moving average, using the default smoothing ratio (2 / period + 1) **or**\n- Object.period Length of the observation window for moving average\n- Object.ratio Function returning a Number to be used as smoothing ratio\n\n``` javascript\n// 10-period EMA\nprices.ema(10);\n> [ 22.22475, 22.21192272727273, 22.24477314049587,\n    22.269650751314803, 22.331696069257568, 22.51789678393801,\n    22.796806459585646, 22.970659830570074, 23.127339861375514,\n    23.27720534112542, 23.34204073364807, 23.429396963893875,\n    23.509906606822263, 23.536050860127308, 23.47258706737689,\n    23.40440760058109, 23.390151673202713, 23.261124096256765,\n    23.231392442391897, 23.080684725593372, 22.91556023003094\n  ]\n\n// 10-period Welles Wilder EMA\nprices.ema({\n    period: 10,\n    ratio: function(n) { return 1 / n; }\n});\n> [ 22.22475, 22.217695, 22.2351855,\n    22.24982695, 22.285934255, 22.3929208295,\n    22.55881874655, 22.678236871895, 22.793653184705498,\n    22.90944786623495, 22.981883079611453, 23.065944771650308,\n    23.146570294485276, 23.19728326503675, 23.196254938533073,\n    23.186389444679765, 23.20035050021179, 23.14836545019061,\n    23.14328890517155, 23.069210014654395, 22.979539013188955\n  ]\n```\n\n#### Vector.delta\n\n    .delta(callback)\n\nReturns a Vector of values containing the sequential difference between numbers in a sequence.\n\n#### Vector.add\n\n    .add(other, callback)\n\nReturns a new vector which is the result of adding the input, element-wise to existing vector.\nTakes input of a Array of same length as the existing Vector, or a scalar.\n\n``` javascript\nvar a = new Vector(1,2);\nvar b = new Vector(3,4);\na.add(b)\n> [4,6]\na.add(10)\n> [11,13]\n```\n\n#### Vector.subtract\n\n    .subtract(other, callback)\n\nReturns a new vector which is the result of subtracting the input, element-wise from the existing vector.\nTakes input of a Array of same length as the existing Vector, or a scalar.\n\n#### Vector.multiply\n\n    .multiply(other, callback)\n\nReturns a new vector which is the result of element-wise multiplying the existing vector by the input.\nTakes input of a Array of same length as the existing Vector, or a scalar.\n\n#### Vector.divide\n\n    .divide(other, callback)\n\nReturns a new vector which is the result of element-wise dividing the existing vector by the input.\nTakes input of a Array of same length as the existing Vector, or a scalar.\n\n#### Vector.extend\n\n    .extend(methods, callback)\n\nReturns a Vector extended with named functions.\n\nWithin the function body, `this` is attached to the Vector being extended and the function may take zero or more arguments.\nTo maintain chainability, return `this`.\n\n``` javascript\n// Instantiate a new Vector with extensions\nvar set = new Vector(14, 6, 9, 3, 18,\n    7, 11, 1, 2, 20,\n    12, 16, 8, 4, 5,\n    19, 15, 17, 10, 13\n).extend({\n    head: function() {\n        return this[0];\n    },\n    tail: function() {\n        return this.slice(1);\n    }\n});\nset.head()\n> 14\nset.tail()\n> [ 6, 9, 3, 18,\n    7, 11, 1, 2, 20,\n    12, 16, 8, 4, 5,\n    19, 15, 17, 10, 13\n  ]\n// Extend instantiated objects\nset.extend({\n    // Distribution of deltas\n    ddist: function(format) {\n        return this.delta().distribution(format);\n    }\n});\nset.ddist('relative')\n> {\n    '1': 0.10526315789473684,\n    '2': 0.05263157894736842,\n    '3': 0.10526315789473684,\n    '4': 0.10526315789473684,\n    '14': 0.05263157894736842,\n    '15': 0.05263157894736842,\n    '18': 0.05263157894736842,\n    '-11': 0.05263157894736842,\n    '-10': 0.05263157894736842,\n    '-8': 0.15789473684210525,\n    '-7': 0.05263157894736842,\n    '-6': 0.05263157894736842,\n    '-4': 0.10526315789473684\n  }\n```\n\n#### Vector.copy\n\n    .copy(callback)\n\nReturns a copy of the data set.\n\n#### Vector.clone\n\n    .clone(callback)\n\nReturns another instance of the Vector object and data.\n\n### Sample\n\nBy default, `Vector` calculates values against the population `n`. However, sample statistics functions on `n - 1` are available by using the `sample` modifier for the following functions:\n\n``` javascript\nVector().sample\n{ mean: [Function],\n  gmean: [Function],\n  hmean: [Function],\n  qmean: [Function],\n  pmean: [Function],\n  variance: [Function],\n  stdev: [Function] }\n```\n\n### Math\n\n`Vector` supports applying all the [Math](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math#Methods) object methods to an entire Vector set of numbers.\n\nFor example, applying `pow` primitive method on a set to calculate the quadratic mean\n\n``` javascript\nvar squares = set.pow(2); // A Vector of set's members squared\n> [25, 1, 9, 4, 441]\nMath.sqrt(squares.sum() / squares.length); // Sum the squares -> find average -> quadratic mean (RMS)\n> 9.797958971132712\n```\n\n### TimeSeries\n\n*Deprecated*\n\nPerform time series analysis. TimeSeries currently accepts time in epoch milliseconds followed by a numeric value.\n\n``` javascript\nvar gauss = require('gauss');\nvar set = new gauss.TimeSeries([1315378833000, 3.5], [1315789015000, 7.826]);\n```\n\n#### TimeSeries.times\n\n    .times(callback)\n\nReturns a Vector of the times.\n\n#### TimeSeries.values\n\n    .values(callback)\n\nReturns a Vector of the time series values.\n\n### Using the REPL console\n\nTo experiment with Gauss or to quickly start a Node.js command-line environment for number crunching, Gauss ships with a lightweight REPL (Read–eval–print loop). Start the REPL with `npm start` within the source directory, or `gauss` if installed globally (via `npm install -g gauss`).\n\nFor example, using the `help()` function and analyzing a data file from the Gauss REPL:\n\n``` javascript\n$ gauss\ngauss> help()\nGauss 0.2.12\n   /* https://github.com/wayoutmind/gauss#api */\n   Functions: print, inspect, cwd, clear, install, uninstall, help\n   Usage:\n     var set = new Vector(1, 2, 3);\n     var times = new gauss.TimeSeries();\n{ version: '0.2.10',\n  Collection: [Function],\n  Vector: [Function],\n  TimeSeries: [Function] }\ngauss> var fs = require('fs');\ngauss> var data = fs.readFileSync('data.txt').toString();\ngauss> data = data.split('\\n');\n[ '8',\n  '6',\n  '7',\n  '5',\n  '3',\n  '0',\n  '9' ]\ngauss> data = data.map(function(line) { return parseInt(line) });\ngauss> var set = new Vector(data);\ngauss> set.mean()\n5.428571428571429\n```\n","keywords":["statistics","analytics","timeseries","math","gauss","set"],"readmeFilename":"README.md","bugs":{"url":"https://github.com/wayoutmind/gauss/issues"}}