This file contains 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
var createSVG = function($scope, config) { | |
var getLabel = function(variable, circle) { | |
return variable + " (" + circle.name() + ")"; | |
}; | |
var getLabels = function() { | |
var ret = []; | |
_.each(config.groups, function(group, name) { | |
_.each( $scope.filterOnSet(group, name).all(), function(obj) { | |
var circle = obj.key.circle; |
This file contains 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
this.getReducedSTD = function(dimensionGroup, variable) { | |
// see https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Decremental_algorithm | |
var reduceAdd = function (p, v) { | |
var obj = p; | |
var value = +v.variables[variable]; | |
if( _.isNaN(value) ) { | |
//pass | |
} else { | |
obj.n = obj.n + 1; | |
var oldM2 = obj.M2; |
This file contains 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
this.getReducedSTD2 = function(dimensionGroup, variable) { | |
// see https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance | |
var reduceAdd = function (p, v) { | |
var value = +v.variables[variable]; | |
if( _.isNaN(value) ) { | |
//pass | |
} | |
else { | |
if( p.n === 0 ) { | |
p.k = value; |
This file contains 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
var t = beta / _sqrt; | |
console.log("degrees", degrees); | |
console.log("beta", beta, "sqrt", _sqrt); | |
console.log("t=", t, "tprob=", statDist.tprob(degrees, t)); | |
var pvalue = 2 * (1 - statDist.tprob(degrees, t)); | |
console.log("pvalue=", pvalue); | |
Tulosteet ylläolevasta: | |
degrees 82 (program):64 | |
beta 1.0097334538696747 sqrt 0.015688694906613447 (program):65 |
This file contains 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
// Specs: | |
// - As a default, the colour range should be scaled so, that at least 70% (..ish) of the colour range is available for the data shown. | |
// Example: we have a map with lowest positive correlation at r=0.85 and highest at r=0.99 while the negative correlations span from r=-0.2 to r=-0.35. The desired colour range would then be as follows: | |
// 100% red at r=0.99, | |
// 30% red at r=0.85, | |
// white at r=0, | |
// 30% blue at r=-0.2 and | |
// 100% blue at r=-0.35. | |
function CustomScale() { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
$scope.itemMapper = { | |
sizeX: 'window.grid.size.x', | |
sizeY: 'window.grid.size.y', | |
row: 'window.grid.position.row', | |
col: 'window.grid.position.col' | |
}; | |
var emitResize = function($element) { | |
dc.events.trigger( function() { | |
$rootScope.$emit('gridster.resize', $element); |
This file contains 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
_xMatrixTransp size = 2,4084 | |
_xMatrix size = 4084 | |
_normalTargetData size = 4084 |
This file contains 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
# -*- coding: utf-8 -*- | |
# Modified lightsocket import script, based on Lightsocket | |
# example script by James Thornton (http://jamesthornton.com) | |
# mundane modification stuff | |
import os | |
import commands | |
import sys | |
import datetime | |
import re # regexp |
This file contains 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
# -*- coding: utf-8 -*- | |
# Class implementation for importing stuff to Neo4j | |
# based on Lightsocket examples by | |
#James Thornton (http://jamesthornton.com) | |
from java.lang import Long, Double, Integer, String | |
from com.tinkerpop.rexster.util import ElementHelper | |
from com.tinkerpop.blueprints.pgm.impls.neo4j import Neo4jGraph | |
from com.tinkerpop.blueprints.pgm.impls.neo4jbatch import Neo4jBatchGraph |
OlderNewer