Skip to content
Fredrick Galoso edited this page May 2, 2013 · 5 revisions

Gauss

Evented, asynchronous, and fast, Node.js is an attractive platform for data mining, statistics, and data analysis. Gauss makes it easy to calculate and explore data through JavaScript, both on Node.js and within the web browser.

Why Gauss?

Any application that can be written in JavaScript, will eventually be written in JavaScript.

Jeff Atwood, The Principle of Least Power

  • JavaScript is everywhere.
  • Ubiquity has driven the development of fast runtimes.
  • Environments are event driven on web browsers (DOM) or on the server (Node.js). Events lead to the collection and analysis of data.
  • Least common denominator, languages compile to JavaScript like CoffeeScript and ClojureScript.

Gauss fills the need for an easy to use, documented, and loosely coupled data library for JavaScript. It focuses on interacting with data as pipelines.

Quick start

Installation

Install with NPM (Node Package Manager)

$ npm install gauss
var gauss = require('gauss');

Using Gauss within a web browser

Gauss requires support for ECMAScript 5 Object.defineProperties. Compatibility is listed here. Download and include gauss.min.js:

<script src="gauss.min.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
    var Vector = gauss.Vector,
        TimeSeries = gauss.TimeSeries;
    var set = new gauss.Vector(5, 1, 3, 2, 21),
        numbers = new Vector([8, 6, 7, 5, 3, 0, 9]),
        times = new TimeSeries([1315378833000, 3.5], [1315789015000, 7.826]);
</script>

Installing development dependencies and running tests

To run Gauss's tests you'll need Vows. NPM can automatically resolve this:

$ npm install gauss --devel

To invoke the tests:

$ npm test

API

  • Collection, general purpose Array with functions for mapping, filtering, combining, and describing any type of data.
  • Vector, one dimensional Number Array composed of Collection functions with statistics and math functions.
  • TimeSeries, two dimensional Array for working with time and value pairs.