This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Perceptron(opts) { | |
if (!opts) opts = {} | |
var debug = 'debug' in opts ? opts.debug : false; | |
var weights = 'weights' in opts | |
? opts.weights.slice() | |
: [] | |
var threshold = 'threshold' in opts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview Pearson correlation score algorithm. | |
* @author [email protected] (Matt West) | |
* @license Copyright 2013 Matt West. | |
* Licensed under MIT (http://opensource.org/licenses/MIT). | |
*/ | |
/** | |
* Calculate the person correlation score between two items in a dataset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest' | |
# = simple_google_analytics.rb | |
# | |
# Chris Le <chris at iamchrisle dot com> | |
# | |
# This module is an wrapper to export data from Google Analytics as a flattened | |
# hash suitable for database storage. It does not require any other gems other | |
# than 'oauth'. I used this simply to get metrics and directly store them in | |
# a database. |