{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# A Glimpse of Daru::Vector\n", "\n", "In [daru](https://github.com/v0dro/daru), the Daru::Vector is a 1 dimensional array with axis labels.\n", "\n", "Labels should be unique. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Statistical methods automatically exclude missing data (currently represented by default as nil).\n", "\n", "Operations between Vectors (+, -, /, , \\*) align values based on their associated index values. The Vectors need not be of similar length. The result index will be the sorted union of the two indexes.\n", "\n", "Daru::Vector is similar to pandas.Series." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The examples below demonstrates how a simple Daru::Vector can be created and its data viewed.\n", "\n", "This first example shows very basic creation of a Vector with missing data (represented by *nil*)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "if(window['d3'] === undefined ||\n", " window['Nyaplot'] === undefined){\n", " var path = {\"d3\":\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\",\"downloadable\":\"https://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\"};\n", "\n", "\n", "\n", " var shim = {\"d3\":{\"exports\":\"d3\"},\"downloadable\":{\"exports\":\"downloadable\"}};\n", "\n", " require.config({paths: path, shim:shim});\n", "\n", "\n", "require(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\n", "\n", "\tvar script = d3.select(\"head\")\n", "\t .append(\"script\")\n", "\t .attr(\"src\", \"https://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\")\n", "\t .attr(\"async\", true);\n", "\n", "\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\n", "\n", "\n", "\t var event = document.createEvent(\"HTMLEvents\");\n", "\t event.initEvent(\"load_nyaplot\",false,false);\n", "\t window.dispatchEvent(event);\n", "\t console.log('Finished loading Nyaplotjs');\n", "\n", "\t};\n", "\n", "\n", "});});\n", "}\n" ], "text/plain": [ "\"if(window['d3'] === undefined ||\\n window['Nyaplot'] === undefined){\\n var path = {\\\"d3\\\":\\\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\\\",\\\"downloadable\\\":\\\"https://cdn.rawgit.com/domitry/d3-downloadable/master/d3-downloadable\\\"};\\n\\n\\n\\n var shim = {\\\"d3\\\":{\\\"exports\\\":\\\"d3\\\"},\\\"downloadable\\\":{\\\"exports\\\":\\\"downloadable\\\"}};\\n\\n require.config({paths: path, shim:shim});\\n\\n\\nrequire(['d3'], function(d3){window['d3']=d3;console.log('finished loading d3');require(['downloadable'], function(downloadable){window['downloadable']=downloadable;console.log('finished loading downloadable');\\n\\n\\tvar script = d3.select(\\\"head\\\")\\n\\t .append(\\\"script\\\")\\n\\t .attr(\\\"src\\\", \\\"https://cdn.rawgit.com/domitry/Nyaplotjs/master/release/nyaplot.js\\\")\\n\\t .attr(\\\"async\\\", true);\\n\\n\\tscript[0][0].onload = script[0][0].onreadystatechange = function(){\\n\\n\\n\\t var event = document.createEvent(\\\"HTMLEvents\\\");\\n\\t event.initEvent(\\\"load_nyaplot\\\",false,false);\\n\\t window.dispatchEvent(event);\\n\\t console.log('Finished loading Nyaplotjs');\\n\\n\\t};\\n\\n\\n});});\\n}\\n\"" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "true" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "require 'daru'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The very basic way to create a Vector is by just passing an Array of values into the constructor.\n", "\n", "Index labels can be specified using the `:index` option and you can also name your Vector something using the `:name` option. In case `:index` isn't specified, the Vector will be assigned an index starting from 0." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:30420060 size: 5
bazinga
a1
b2
c3
d4
e5
" ], "text/plain": [ "\n", "#\n", " bazinga\n", " a 1\n", " b 2\n", " c 3\n", " d 4\n", " e 5\n" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = Daru::Vector.new([1,2,3,4,5], index: [:a, :b, :c, :d, :e], name: :bazinga)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Values can be accessed using their labels with the `#[]` operator." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a[:b]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "OR you can even specify a range with labels..." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:29850660 size: 3
bazinga
b2
c3
d4
" ], "text/plain": [ "\n", "#\n", " bazinga\n", " b 2\n", " c 3\n", " d 4\n" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a[:b..:d]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Values can be assigned with the `#[]=` operator." ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:30420060 size: 5
bazinga
a1
b999
c3
d4
e5
" ], "text/plain": [ "\n", "#\n", " bazinga\n", " a 1\n", " b 999\n", " c 3\n", " d 4\n", " e 5\n" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a[:b] = 999\n", "a" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you want to treat values apart from *nil* as missing, you can specify them using the `:missing_values` option.\n", "\n", "The `#only_valid` method can then be used for obtaining all the *non-missing* values of the Vector. Notice that `only_valid` preserves the indexes (labels) of the data." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:29284260 size: 5
nil
01
12
23
54
66
" ], "text/plain": [ "\n", "#\n", " nil\n", " 0 1\n", " 1 2\n", " 2 3\n", " 5 4\n", " 6 6\n" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = Daru::Vector.new([1,2,3,5,5,4,6,nil,nil], missing_values: [5,nil])\n", "a.only_valid" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The `Vector.[]` class method creates a vector from almost any object that has a `#to_a` method defined on it. It is similar to R's `c` method." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:28825140 size: 9
nil
01
12
23
34
46
57
68
79
810
" ], "text/plain": [ "\n", "#\n", " nil\n", " 0 1\n", " 1 2\n", " 2 3\n", " 3 4\n", " 4 6\n", " 5 7\n", " 6 8\n", " 7 9\n", " 8 10\n" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "b = Daru::Vector[1,2,3,4,6..10]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The *new_with_size* class method lets you create a Daru::Vector by specifying the size as the argument. The optional block, if supplied, is run once for populating each element in the Vector.\n", "\n", "The result of each run of the block is the value that is ultimately assigned to that position in the Vector." ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:28500640 size: 1000
new_vector
02
13
20
3
4
52
62
72
81
91
103
110
122
130
143
151
163
171
183
190
201
211
222
232
242
253
263
272
280
29
303
313
......
9993
" ], "text/plain": [ "\n", "#\n", " new_vector\n", " 0 2\n", " 1 3\n", " 2 0\n", " 3 nil\n", " 4 nil\n", " 5 2\n", " 6 2\n", " 7 2\n", " 8 1\n", " 9 1\n", " 10 3\n", " 11 0\n", " 12 2\n", " 13 0\n", " 14 3\n", " 15 1\n", " 16 3\n", " ... ...\n" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = Daru::Vector.new_with_size(1000, name: :new_vector) { r=rand(5); r == 4 ? nil: r; }" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Use the `#head` method for obtaining the top 10 values of the Vector." ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:27175540 size: 10
new_vector
02
13
20
3
4
52
62
72
81
91
" ], "text/plain": [ "\n", "#\n", " new_vector\n", " 0 2\n", " 1 3\n", " 2 0\n", " 3 nil\n", " 4 nil\n", " 5 2\n", " 6 2\n", " 7 2\n", " 8 1\n", " 9 1\n" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.head" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Sorting\n", "\n", "The `Daru::Vector#sort` method will sort the Vector and preserve the indexes." ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:25317760 size: 8
nil
023
1144
2332
311
42
55
66765
73
" ], "text/plain": [ "\n", "#\n", " nil\n", " 0 23\n", " 1 144\n", " 2 332\n", " 3 11\n", " 4 2\n", " 5 5\n", " 6 6765\n", " 7 3\n" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = Daru::Vector.new([23,144,332,11,2,5,6765,3])" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:24840120 size: 8
nil
42
73
55
311
023
1144
2332
66765
" ], "text/plain": [ "\n", "#\n", " nil\n", " 4 2\n", " 7 3\n", " 5 5\n", " 3 11\n", " 0 23\n", " 1 144\n", " 2 332\n", " 6 6765\n" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a.sort" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Basic Math\n", "\n", "Arithmetic operations done between two vectors will always perform the arithmetic on corresponding elements of the same index.\n", "\n", "The concerned vectors need not have the same size of even the same index. In case of a mismatch, a sorted union of the indexes of both the Vectors is used as an index for the resulting vector.\n", "\n", "In case a particular index exists in one vector but not in the other, the result Vector has a *nil* placed in that index position.\n", "\n", "Daru::Vector supports +, -, \\*, / and \\*\\* operators." ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:24525720 size: 7
nil
a2
b4
c6
d
f
ff
five10
" ], "text/plain": [ "\n", "#\n", " nil\n", " a 2\n", " b 4\n", " c 6\n", " d nil\n", " f nil\n", " ff nil\n", "five 10\n" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = Daru::Vector.new([1,2,3,4,5,6], index: [:a, :b, :c, :d, :five, :f])\n", "b = Daru::Vector.new([1,2,3,4,5], index: [:a, :b, :c, :ff,:five])\n", "\n", "a + b" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:24243560 size: 7
nil
a1
b4
c27
d
f
ff
five3125
" ], "text/plain": [ "\n", "#\n", " nil\n", " a 1\n", " b 4\n", " c 27\n", " d nil\n", " f nil\n", " ff nil\n", "five 3125\n" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a ** b" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Performing arithmetic with a single number will perform the operation on each element in the Vector and return the resultant Vector." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
Daru::Vector:23813900 size: 6
nil
a5
b10
c15
d20
five25
f30
" ], "text/plain": [ "\n", "#\n", " nil\n", " a 5\n", " b 10\n", " c 15\n", " d 20\n", "five 25\n", " f 30\n" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a * 5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Statistics\n", "\n", "Daru::Vector defines a host of statistics methods, which are useful for performing ephemeral statistics on numeric data. All the statistics methods ignore the *missing* values and work only on the valid data.\n", "\n", "For a complete list of statistics functions see the Daru::Maths::Statistics::Vector module in the [docs](https://rubygems.org/gems/daru)." ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "4.0" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "v = Daru::Vector.new([1,2,3,4,5,nil,6,nil,7])\n", "v.mean" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "4.666666666666667" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "v.variance" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "4" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "v.median" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Plotting\n", "\n", "Daru uses [nyaplot](https://github.com/domitry/nyaplot/tree/master) internally for generating interactive plots.\n", "\n", "You can also use rubyvis through [statsample](https://github.com/SciRuby/statsample) for quickly generating scatter plots, histograms and box plots." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A simple scatter plot can be generated by simply calling the `#plot` function on Daru::Vector. Feel free to interact with the generated plot." ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n" ], "text/plain": [ "#[#[#:scatter, :options=>{:x=>\"data0\", :y=>\"data1\"}, :data=>\"af343b05-60ad-4c07-8d00-8fbfb77c0e4c\"}, @xrange=[0, 51], @yrange=[-0.9986295347545738, 0.9998476951563913]>], :options=>{:zoom=>true, :width=>700, :xrange=>[0, 51], :yrange=>[-0.9986295347545738, 0.9998476951563913]}}>], :data=>{\"af343b05-60ad-4c07-8d00-8fbfb77c0e4c\"=>#0, :data1=>0.0}, {:data0=>1, :data1=>0.12186934340514748}, {:data0=>2, :data1=>0.24192189559966773}, {:data0=>3, :data1=>0.35836794954530027}, {:data0=>4, :data1=>0.4694715627858908}, {:data0=>5, :data1=>0.573576436351046}, {:data0=>6, :data1=>0.6691306063588582}, {:data0=>7, :data1=>0.754709580222772}, {:data0=>8, :data1=>0.8290375725550417}, {:data0=>9, :data1=>0.8910065241883678}, {:data0=>10, :data1=>0.9396926207859083}, {:data0=>11, :data1=>0.9743700647852352}, {:data0=>12, :data1=>0.9945218953682733}, {:data0=>13, :data1=>0.9998476951563913}, {:data0=>14, :data1=>0.9902680687415704}, {:data0=>15, :data1=>0.9659258262890683}, {:data0=>16, :data1=>0.9271838545667874}, {:data0=>17, :data1=>0.8746197071393959}, {:data0=>18, :data1=>0.8090169943749475}, {:data0=>19, :data1=>0.7313537016191706}, {:data0=>20, :data1=>0.6427876096865395}, {:data0=>21, :data1=>0.544639035015027}, {:data0=>22, :data1=>0.4383711467890773}, {:data0=>23, :data1=>0.32556815445715703}, {:data0=>24, :data1=>0.20791169081775931}, {:data0=>25, :data1=>0.08715574274765864}, {:data0=>26, :data1=>-0.0348994967025009}, {:data0=>27, :data1=>-0.15643446504023073}, {:data0=>28, :data1=>-0.275637355816999}, {:data0=>29, :data1=>-0.39073112848927355}, {:data0=>30, :data1=>-0.5000000000000001}, {:data0=>31, :data1=>-0.601815023152048}, {:data0=>32, :data1=>-0.6946583704589974}, {:data0=>33, :data1=>-0.7771459614569711}, {:data0=>34, :data1=>-0.848048096156426}, {:data0=>35, :data1=>-0.9063077870366497}, {:data0=>36, :data1=>-0.9510565162951535}, {:data0=>37, :data1=>-0.9816271834476639}, {:data0=>38, :data1=>-0.9975640502598242}, {:data0=>39, :data1=>-0.9986295347545738}, {:data0=>40, :data1=>-0.9848077530122081}, {:data0=>41, :data1=>-0.9563047559630354}, {:data0=>42, :data1=>-0.9135454576426008}, {:data0=>43, :data1=>-0.8571673007021123}, {:data0=>44, :data1=>-0.7880107536067218}, {:data0=>45, :data1=>-0.7071067811865477}, {:data0=>46, :data1=>-0.6156614753256588}, {:data0=>47, :data1=>-0.5150380749100545}, {:data0=>48, :data1=>-0.40673664307580015}, {:data0=>49, :data1=>-0.29237170472273627}, {:data0=>50, :data1=>-0.17364817766693127}, {:data0=>51, :data1=>-0.05233595624294437}]>}, :extension=>[]}>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "v = Daru::Vector.new((0..360).step(7).map { |i| Math.sin((i*Math::PI)/180) })\n", "v.plot" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, lets take some dummy data of a survey that shows the number of people of each age group that are part of this survey. We want to plot the number of people from each age group who have taken the test in a bar graph.\n", "\n", "For this purpose we use the `#plot` function again, but this time supply it with the `:type` option, and set the value of this option as `:bar`. The plot function yeilds the corresponding `Nyaplot::Plot` object in the block, which can then be used for setting different parameters of the final plot. For more configuration methods see the [Nyaplot::Plot](https://rubygems.org/gems/nyaplot) documentation." ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n" ], "text/plain": [ "#[#[#:bar, :options=>{:x=>\"data0\", :y=>\"data1\"}, :data=>\"14350137-a098-4569-b38d-25cad4745a72\"}, @xrange=[\"18-24\", \"24-30\", \"Under 18\", \"30-40\", \"40-50\"], @yrange=[0, 70]>], :options=>{:x_label=>\"Age Groups\", :y_label=>\"Number of People Surveyed\", :width=>700, :xrange=>[\"18-24\", \"24-30\", \"Under 18\", \"30-40\", \"40-50\"], :yrange=>[0, 70]}}>], :data=>{\"14350137-a098-4569-b38d-25cad4745a72\"=>#\"18-24\", :data1=>40}, {:data0=>\"24-30\", :data1=>50}, {:data0=>\"Under 18\", :data1=>20}, {:data0=>\"30-40\", :data1=>70}, {:data0=>\"40-50\", :data1=>10}]>}, :extension=>[]}>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "v = Daru::Vector.new([40,50,20,70,10], index: ['18-24', '24-30', 'Under 18', '30-40', '40-50'], name: \"Age Range\")\n", "v.plot(type: :bar) do |plt|\n", " plt.x_label \"Age Groups\"\n", " plt.y_label \"Number of People Surveyed\"\n", "end" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The third kind of plot that Daru::Vector can easily generate from nyaplot is the histogram.\n", "\n", "To demonstrate, we'll prepare some sample data using the `rnorm` function from the `statsample` ruby gem. The rnorm function just generates normally distributied random variables (1000 in this case) and returns a Daru::Vector object that contains these numbers (in variable `a`).\n", "\n", "A histogram of the normally distributed function has been generated below." ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n" ], "text/plain": [ "#[#[#:histogram, :options=>{:value=>\"data0\"}, :data=>\"5582fbfd-4066-4b7f-b558-b5b1e0ba3ff6\"}, @xrange=[-2.974775982781738, 3.378115062994702], @yrange=[0, 1000]>], :options=>{:yrange=>[0, 200], :y_label=>\"Frequency\", :x_label=>\"Bins\", :width=>700, :xrange=>[-2.974775982781738, 3.378115062994702]}}>], :data=>{\"5582fbfd-4066-4b7f-b558-b5b1e0ba3ff6\"=>#1.4020443336065913}, {:data0=>0.8617777182735051}, {:data0=>0.7051436287725924}, {:data0=>-0.5346899498920613}, {:data0=>-0.5861769917064277}, {:data0=>0.24098874024661054}, {:data0=>-0.4330895097181544}, {:data0=>-1.3512763666198477}, {:data0=>1.1555953239333472}, {:data0=>0.5976927544806819}, {:data0=>-0.8598785116269821}, {:data0=>2.215221472930549}, {:data0=>-1.8609572174059217}, {:data0=>0.016096193488031027}, {:data0=>-0.0447172110611797}, {:data0=>-1.6216082655736728}, {:data0=>0.09523444499869366}, {:data0=>-0.45147257089939696}, {:data0=>0.8162951240684735}, {:data0=>-0.04090360248048619}, {:data0=>0.5912714400132566}, {:data0=>0.2505728549309939}, {:data0=>1.542627381015816}, {:data0=>0.28645779030098456}, {:data0=>1.045266530717952}, {:data0=>-0.9418072507745119}, {:data0=>-0.22311912054699815}, {:data0=>0.34421981571581173}, {:data0=>0.4880403197853546}, {:data0=>-1.24863455276129}, {:data0=>0.10442589810391177}, {:data0=>0.06506662715056408}, {:data0=>0.723450974258321}, {:data0=>-0.08287280205238443}, {:data0=>-1.039078703957884}, {:data0=>-0.2862735122852007}, {:data0=>-1.482579696132541}, {:data0=>-0.8195272339484772}, {:data0=>0.8181617277197701}, {:data0=>0.34776070519456265}, {:data0=>-0.3900697230076725}, {:data0=>-1.205612351246623}, {:data0=>0.549442022547749}, {:data0=>0.20013640141488467}, {:data0=>-0.3894340606653746}, {:data0=>-1.5987500140009152}, {:data0=>-0.35111030875873456}, {:data0=>-0.4037884140768916}, {:data0=>-1.5644442689607103}, {:data0=>0.23741302452339685}, {:data0=>0.827376198712583}, {:data0=>-0.5072086284413815}, {:data0=>0.3838728305967554}, {:data0=>1.3270093422556297}, {:data0=>0.7992914390650363}, {:data0=>2.119613006760656}, {:data0=>2.4364734157210988}, {:data0=>-0.11790242457090172}, {:data0=>-0.704747486240657}, {:data0=>-0.048994965642642475}, {:data0=>0.04358775354352723}, {:data0=>-0.6277990595589834}, {:data0=>-2.309080427332803}, {:data0=>2.5276064505983498}, {:data0=>0.6092288260054272}, {:data0=>1.830660011423748}, {:data0=>-0.9853209710235529}, {:data0=>-1.8746937470925418}, {:data0=>1.333479074278648}, {:data0=>-1.2018883531606988}, {:data0=>0.304238410832959}, {:data0=>1.2015409423862238}, {:data0=>0.7241760305317558}, {:data0=>1.0717811759321398}, {:data0=>0.3607511531803564}, {:data0=>0.4841197284424391}, {:data0=>1.5834111003720361}, {:data0=>-0.9494919083629999}, {:data0=>-0.5783963748776211}, {:data0=>-0.09870511193158824}, {:data0=>-0.6108228922284287}, {:data0=>-0.40373918579283125}, {:data0=>0.8850736442544065}, {:data0=>-0.7057243820008611}, {:data0=>0.8540931581327988}, {:data0=>0.7523149823025486}, {:data0=>-0.31204791814204974}, {:data0=>-1.2982757309926822}, {:data0=>1.4634899140193547}, {:data0=>0.18549619844578066}, {:data0=>1.3976847700667867}, {:data0=>-0.1579449415268966}, {:data0=>1.384645008791801}, {:data0=>-1.2620156949077737}, {:data0=>-1.9357399290367636}, {:data0=>-0.35621553422863456}, {:data0=>-1.1476687317350474}, {:data0=>0.30055921156126997}, {:data0=>-1.1806052872608446}, {:data0=>-0.46809945413980913}, {:data0=>2.120439386283465}, {:data0=>0.009601580388320048}, {:data0=>0.06979103473015193}, {:data0=>-0.24153667634562187}, {:data0=>1.6370305916333687}, {:data0=>-1.0867554300823559}, {:data0=>0.15884710988960787}, {:data0=>0.4524713856308264}, {:data0=>0.2745908621709482}, {:data0=>0.23867696995521437}, {:data0=>0.45875747381046844}, {:data0=>0.7694088628058575}, {:data0=>-0.4956621715325419}, {:data0=>2.028132631686232}, {:data0=>-1.7747056082185455}, {:data0=>-1.3561323088389996}, {:data0=>-0.13529840802790735}, {:data0=>1.8430813760229205}, {:data0=>-1.0130325889607532}, {:data0=>0.8912280144553483}, {:data0=>-0.7981522974397466}, {:data0=>0.8337911303804346}, {:data0=>1.3440737778431247}, {:data0=>0.43466242592454674}, {:data0=>0.9184099302757517}, {:data0=>0.30349973040461803}, {:data0=>0.6271743800608929}, {:data0=>-1.2825604595737634}, {:data0=>1.8930026628044467}, {:data0=>-1.307532280406729}, {:data0=>0.5749747027788138}, {:data0=>1.98069925652786}, {:data0=>0.11371762754822944}, {:data0=>0.33371691204799536}, {:data0=>-0.5140804102527763}, {:data0=>0.3497071199597886}, {:data0=>-0.8172985906733947}, {:data0=>0.15499944932458606}, {:data0=>-0.6838184074718193}, {:data0=>0.9600567017139888}, {:data0=>0.3667127579779447}, {:data0=>1.1217851666237633}, {:data0=>0.9094349916698993}, {:data0=>-1.8183756879681077}, {:data0=>1.195808317527159}, {:data0=>0.7288460275109018}, {:data0=>-0.3450587080801229}, {:data0=>1.2643144592186215}, {:data0=>-0.5124332223654804}, {:data0=>1.200988346632863}, {:data0=>1.3059944292510426}, {:data0=>2.064657936968298}, {:data0=>1.5666061205665291}, {:data0=>0.9931888086607229}, {:data0=>-1.2816367292834683}, {:data0=>1.85108231737446}, {:data0=>-1.5830714571963935}, {:data0=>-1.0503130026411098}, {:data0=>-0.3628406579125325}, {:data0=>0.5223794700552715}, {:data0=>-1.4764993871212333}, {:data0=>0.165996546539338}, {:data0=>-1.2352091425685796}, {:data0=>-1.0089408291118742}, {:data0=>1.0971368116170983}, {:data0=>-1.0309116961194376}, {:data0=>-0.16406586533083153}, {:data0=>-1.0602191284921227}, {:data0=>-1.9166085747279449}, {:data0=>0.3928718768129627}, {:data0=>-1.3218157461417457}, {:data0=>0.365248230035316}, {:data0=>-0.4704699404210912}, {:data0=>-1.1687497953365427}, {:data0=>-1.8057773125882788}, {:data0=>-0.37543863626218366}, {:data0=>0.569561150795338}, {:data0=>-1.5201866479275994}, {:data0=>0.08254015762456603}, {:data0=>-0.5001386252603459}, {:data0=>1.1056029602563449}, {:data0=>0.20831840938776414}, {:data0=>0.2211748587189664}, {:data0=>0.12328552948226004}, {:data0=>0.26053530509115375}, {:data0=>-1.541084685124092}, {:data0=>1.2289679038626091}, {:data0=>-0.7891204742056838}, {:data0=>-0.003419662471449676}, {:data0=>0.12220849863427781}, {:data0=>0.2187098250645324}, {:data0=>0.5641389324557885}, {:data0=>-1.2804363099465623}, {:data0=>0.09510919145018808}, {:data0=>0.8389753855802808}, {:data0=>0.8699462271083958}, {:data0=>1.1176468136047464}, {:data0=>1.880092118794368}, {:data0=>0.9831046974401924}, {:data0=>0.869935223970703}, {:data0=>-0.19393759000154806}, {:data0=>0.8168749058087516}, {:data0=>-0.16296792412763192}, {:data0=>-0.7334952224081366}, {:data0=>1.174883968597057}, {:data0=>-1.2404825772860366}, {:data0=>0.7173917713126859}, {:data0=>0.4132108265084047}, {:data0=>-1.376942456751336}, {:data0=>0.47437400367131705}, {:data0=>-0.31083062617976454}, {:data0=>-0.9262012770046242}, {:data0=>-0.26633642045450623}, {:data0=>-2.144499304712794}, {:data0=>1.3781236267199912}, {:data0=>-0.7923941203809809}, {:data0=>-0.5356861450326339}, {:data0=>-0.27904548588697026}, {:data0=>1.6749577280300836}, {:data0=>1.8713265487884125}, {:data0=>0.36212085732068666}, {:data0=>-0.6255423679991743}, {:data0=>0.45913289915016653}, {:data0=>0.9219448833279364}, {:data0=>0.8443054495482997}, {:data0=>1.0503643888531076}, {:data0=>-0.8415852290633273}, {:data0=>-0.7172621313095601}, {:data0=>-1.059763187723305}, {:data0=>0.6750491367251359}, {:data0=>-1.1127960653141258}, {:data0=>1.1341888554407349}, {:data0=>-0.8255119032045358}, {:data0=>-0.7662835020862329}, {:data0=>0.941700889670876}, {:data0=>0.0069272525529036665}, {:data0=>-0.4171282061995906}, {:data0=>0.17137875542182882}, {:data0=>-0.8703518349390029}, {:data0=>-2.6852561831822475}, {:data0=>3.378115062994702}, {:data0=>-0.01352853876046335}, {:data0=>0.9397626046012452}, {:data0=>-0.666050580006866}, {:data0=>1.7188544341291905}, {:data0=>-0.6529811518834002}, {:data0=>0.20488001239107076}, {:data0=>0.478240404846011}, {:data0=>0.1771871232567103}, {:data0=>1.1872508713148089}, {:data0=>-1.0955441571055984}, {:data0=>0.5148442831665089}, {:data0=>-1.0995558609212217}, {:data0=>-0.7357888062942198}, {:data0=>-0.9946432642624002}, {:data0=>-0.0629710306614572}, {:data0=>3.162084622442127}, {:data0=>-0.007523684637498088}, {:data0=>-1.058838423353439}, {:data0=>-1.0855027691077335}, {:data0=>0.20585651102863786}, {:data0=>-1.3262246477990187}, {:data0=>-0.02756992159717548}, {:data0=>0.12048354128165606}, {:data0=>0.30239646930290737}, {:data0=>1.1052361762202818}, {:data0=>-1.7936147713283475}, {:data0=>-1.8594393795646813}, {:data0=>-0.011692752137536625}, {:data0=>0.7592042442629209}, {:data0=>0.3772167907625433}, {:data0=>-0.20931716445297244}, {:data0=>-2.0138105526954453}, {:data0=>1.9526899037237835}, {:data0=>0.25571486232132623}, {:data0=>-0.2862615485107278}, {:data0=>1.5008210263412753}, {:data0=>2.4963401390353686}, {:data0=>-0.5546666299622813}, {:data0=>-0.13907032950246392}, {:data0=>0.7914047772037657}, {:data0=>-0.6077834928011294}, {:data0=>-0.54496684215421}, {:data0=>0.7252161496024766}, {:data0=>-0.5197574629449402}, {:data0=>-0.9657099359627246}, {:data0=>-0.8420498438035259}, {:data0=>-0.12149246607968157}, {:data0=>-1.2187961631611277}, {:data0=>0.7151624904548256}, {:data0=>1.4853414782263288}, {:data0=>-1.6508844292012277}, {:data0=>-0.8457524547492139}, {:data0=>-0.286576928174511}, {:data0=>0.9577073834715285}, {:data0=>-0.34629330138175024}, {:data0=>-0.007555399751983503}, {:data0=>0.294905777175918}, {:data0=>-0.12925613162185148}, {:data0=>0.07537426929949298}, {:data0=>-0.011719780471941091}, {:data0=>0.2540415218876397}, {:data0=>0.23529039807388316}, {:data0=>1.388321592356692}, {:data0=>1.3270264095803823}, {:data0=>0.48040217485840214}, {:data0=>0.5019694649420698}, {:data0=>0.4817616316777329}, {:data0=>-0.22776601772539753}, {:data0=>-0.19160116814160413}, {:data0=>1.4650776290436176}, {:data0=>-0.7578609096025655}, {:data0=>-0.5452116267012835}, {:data0=>-0.5105798864742537}, {:data0=>0.1910399732101857}, {:data0=>-0.1860766289058918}, {:data0=>0.8755841236158988}, {:data0=>0.02874101203989658}, {:data0=>0.4882751660028105}, {:data0=>0.4553553963794477}, {:data0=>-0.6446519360425749}, {:data0=>0.4246467127678997}, {:data0=>-0.8315691322619724}, {:data0=>-1.1225397598623208}, {:data0=>0.3406507971614099}, {:data0=>0.7171846633585444}, {:data0=>-1.7983571515708117}, {:data0=>-0.25301933488062217}, {:data0=>-0.6677707010701859}, {:data0=>-1.0339935839328105}, {:data0=>0.4201106764138639}, {:data0=>0.26942010175633213}, {:data0=>-0.7834313050373959}, {:data0=>1.2338709038052833}, {:data0=>0.30992620590108366}, {:data0=>0.258897758220736}, {:data0=>-0.6537939031697676}, {:data0=>0.8227116995147135}, {:data0=>1.301433077725286}, {:data0=>1.5942228606700046}, {:data0=>-1.257765894677252}, {:data0=>-1.2960710860606095}, {:data0=>0.2173755178078192}, {:data0=>-2.0003382365257756}, {:data0=>-0.43496904732530406}, {:data0=>2.6965915813712944}, {:data0=>-0.08672645787346894}, {:data0=>-0.5655653676096947}, {:data0=>-1.34562403061253}, {:data0=>0.5156247783385424}, {:data0=>-2.3066147711833542}, {:data0=>-0.30804168695807893}, {:data0=>1.2290222751575446}, {:data0=>-0.7429440474020865}, {:data0=>-1.476949271795799}, {:data0=>-1.3929078974695173}, {:data0=>1.3347225765499027}, {:data0=>-0.7434470563359253}, {:data0=>-0.5410792733505178}, {:data0=>-1.4415988988257395}, {:data0=>1.380789817877228}, {:data0=>-0.21677213021148617}, {:data0=>-2.532230061863529}, {:data0=>0.010574945305422119}, {:data0=>-1.0895816451001494}, {:data0=>0.12525791824747315}, {:data0=>-0.7600226953179976}, {:data0=>0.3085063893656953}, {:data0=>1.0980840021137561}, {:data0=>-1.3053450602983796}, {:data0=>-1.2916679854344486}, {:data0=>0.05945232310067155}, {:data0=>-0.23771156465072693}, {:data0=>1.829450670502156}, {:data0=>0.16592820910334394}, {:data0=>-0.3795834837221924}, {:data0=>0.49282367129635574}, {:data0=>-0.8862159088955834}, {:data0=>0.7279445048716713}, {:data0=>-1.0104159385725182}, {:data0=>-0.6901417358685457}, {:data0=>-1.1400640205102168}, {:data0=>0.5651378370239964}, {:data0=>-0.4035230878872806}, {:data0=>-0.7276249814963923}, {:data0=>1.0652526057533525}, {:data0=>0.5598928494170167}, {:data0=>-0.08948867085225848}, {:data0=>-0.9212847245854605}, {:data0=>-0.3051600772052722}, {:data0=>-0.0083674091433429}, {:data0=>0.5775342493039348}, {:data0=>1.0728538642134824}, {:data0=>1.0995065282594951}, {:data0=>-0.7867186238917696}, {:data0=>1.215563859962077}, {:data0=>0.44056145737707636}, {:data0=>-1.6019076302160016}, {:data0=>0.5212399618444512}, {:data0=>0.08784660630697116}, {:data0=>1.8497444089413317}, {:data0=>-0.145111620939049}, {:data0=>-1.6729644527115808}, {:data0=>2.6890363729368087}, {:data0=>-0.4903298887976856}, {:data0=>0.7060872941493037}, {:data0=>0.1349072398041915}, {:data0=>-0.5159987289503692}, {:data0=>1.4806635098991872}, {:data0=>-0.38262064848222965}, {:data0=>-0.49926979262218285}, {:data0=>0.42759107202894625}, {:data0=>-1.1777695840703923}, {:data0=>0.6974183871372018}, {:data0=>0.47416688253813916}, {:data0=>-0.051745184703571645}, {:data0=>-0.8035583096874013}, {:data0=>-0.564058065565368}, {:data0=>1.2483213123893224}, {:data0=>1.3438414460120436}, {:data0=>-0.8516518983226564}, {:data0=>0.8797644462691173}, {:data0=>2.1311434031625778}, {:data0=>-0.47340590613426475}, {:data0=>1.2201250174563423}, {:data0=>-1.3871639203084936}, {:data0=>1.2832486047015677}, {:data0=>2.644047870496143}, {:data0=>-0.382932381071732}, {:data0=>0.02039515309150468}, {:data0=>-1.9142351314494426}, {:data0=>1.941234196552888}, {:data0=>-0.995294548428015}, {:data0=>-0.29017637499174076}, {:data0=>-1.4286239953893227}, {:data0=>-0.11352035238868723}, {:data0=>2.0632657609062353}, {:data0=>0.10808136310337654}, {:data0=>-0.16098175799393738}, {:data0=>-2.1141586343553898}, {:data0=>-2.2367323883750685}, {:data0=>0.3551165565561956}, {:data0=>0.6978525639634409}, {:data0=>-0.8351081701138658}, {:data0=>0.9011331014055052}, {:data0=>0.8932204517907096}, {:data0=>1.1621610143195589}, {:data0=>-0.19945827927878368}, {:data0=>-0.6993403946605253}, {:data0=>1.1283498363583602}, {:data0=>-2.09782582651944}, {:data0=>0.7205673950385793}, {:data0=>-1.617829736514563}, {:data0=>-0.4709766341757598}, {:data0=>0.49761847376881385}, {:data0=>0.8783876005157527}, {:data0=>-0.12231426991057706}, {:data0=>1.6474060380245574}, {:data0=>0.27320125177056603}, {:data0=>-0.5767335712109615}, {:data0=>0.3483582191419798}, {:data0=>0.2888638093222659}, {:data0=>-0.5113008943586522}, {:data0=>-1.2344652866003485}, {:data0=>-1.432657076439387}, {:data0=>-0.16390133983137098}, {:data0=>-0.44339673535438434}, {:data0=>-0.6255028430931128}, {:data0=>-1.5435062930631884}, {:data0=>-0.9790355818496452}, {:data0=>0.7803093956867242}, {:data0=>2.364666003029481}, {:data0=>-0.2709487053183928}, {:data0=>-2.187913641698411}, {:data0=>-0.1309933770088556}, {:data0=>-1.0755175177034948}, {:data0=>-0.8466078238616729}, {:data0=>1.090618250013266}, {:data0=>1.404491024779471}, {:data0=>-0.842736729158939}, {:data0=>1.6047523879493044}, {:data0=>0.4539501929190958}, {:data0=>-1.9113773675321004}, {:data0=>1.9605259634714354}, {:data0=>0.29216668213193464}, {:data0=>-0.49407450554289434}, {:data0=>0.7237265934335316}, {:data0=>-0.41253666134071004}, {:data0=>1.7472438153586738}, {:data0=>-1.1573168945959489}, {:data0=>0.8948911551936088}, {:data0=>-1.190942951315226}, {:data0=>-1.0307396962000956}, {:data0=>1.355835637834133}, {:data0=>0.42588338327008735}, {:data0=>-0.21800514215327713}, {:data0=>-1.7379088743527558}, {:data0=>-0.6007492880102308}, {:data0=>-1.978438008786505}, {:data0=>0.20614041096530716}, {:data0=>1.0052491415535414}, {:data0=>-0.8763008305398376}, {:data0=>0.031192271745069975}, {:data0=>1.4527047533059034}, {:data0=>0.05604729035116765}, {:data0=>2.498024639433972}, {:data0=>0.019218509071894055}, {:data0=>0.7197343650694429}, {:data0=>0.04572641057073721}, {:data0=>-0.9395671931250217}, {:data0=>0.2520685813910979}, {:data0=>-0.9220038460662552}, {:data0=>0.4292879104553484}, {:data0=>-0.4787289553900083}, {:data0=>2.1229531273801605}, {:data0=>0.7068469153245301}, {:data0=>0.03577907878016428}, {:data0=>1.0466895491257362}, {:data0=>-1.2982273030353162}, {:data0=>-0.18270029734554483}, {:data0=>-1.2788011900880474}, {:data0=>0.20970411291270033}, {:data0=>-0.14487527637220865}, {:data0=>-1.4806281529286043}, {:data0=>1.04108202553086}, {:data0=>-0.2108800734403492}, {:data0=>-1.3367105200815985}, {:data0=>0.8120332742037758}, {:data0=>0.38458810503860985}, {:data0=>0.8814434313248091}, {:data0=>2.3220319672304877}, {:data0=>-0.7561584625596001}, {:data0=>0.6865080266401015}, {:data0=>0.3238430953524218}, {:data0=>0.3226736482348205}, {:data0=>0.1883349122055981}, {:data0=>-0.8610937986439013}, {:data0=>0.9053368529086382}, {:data0=>-0.09096373019796114}, {:data0=>-1.2374301221497068}, {:data0=>-1.3963283079250335}, {:data0=>1.3187406159107284}, {:data0=>-0.04353877274258444}, {:data0=>0.11081688735308327}, {:data0=>-0.7359238180769404}, {:data0=>-0.12489194189145866}, {:data0=>-0.5580030880945855}, {:data0=>-0.2500048927611081}, {:data0=>-0.57909293709809}, {:data0=>-2.190114304747847}, {:data0=>0.6901297548599596}, {:data0=>0.23512085033123822}, {:data0=>1.2490691872471456}, {:data0=>1.0288221103110904}, {:data0=>-0.6515675558995799}, {:data0=>0.4957854928782748}, {:data0=>0.9573978426870762}, {:data0=>-1.2833604792246243}, {:data0=>3.270910909051103}, {:data0=>1.668103801543472}, {:data0=>1.235679789285947}, {:data0=>-0.05346883342577789}, {:data0=>0.6000261101672569}, {:data0=>-1.7565196359897413}, {:data0=>0.1653454826030151}, {:data0=>0.7822809299332195}, {:data0=>-1.5922792529392311}, {:data0=>-1.0822297417173972}, {:data0=>-0.08187390745440155}, {:data0=>1.1025661112618514}, {:data0=>-0.09434683204307061}, {:data0=>2.917653933824302}, {:data0=>0.65150257339694}, {:data0=>0.7083537648571951}, {:data0=>0.10068779783296807}, {:data0=>0.11680359400129178}, {:data0=>0.8268397462559143}, {:data0=>-0.8911205102146641}, {:data0=>-0.3008856690953934}, {:data0=>0.29839205337981095}, {:data0=>-1.9986716025256466}, {:data0=>-0.9575822453863644}, {:data0=>0.36171710473428803}, {:data0=>-0.13267857929300647}, {:data0=>0.3206829777636025}, {:data0=>-0.0850652714544774}, {:data0=>0.40065820447766765}, {:data0=>-0.027967528875223486}, {:data0=>-1.4954632453306618}, {:data0=>1.282004555258087}, {:data0=>0.8764874802099303}, {:data0=>-2.0080654010865264}, {:data0=>0.524664572735274}, {:data0=>0.29658645013780277}, {:data0=>0.5646645158303951}, {:data0=>-1.4522818965338604}, {:data0=>0.29562034845289353}, {:data0=>-0.5074029616331627}, {:data0=>-0.8505125358243486}, {:data0=>0.7288361242460355}, {:data0=>-0.3306129903023185}, {:data0=>-0.6460253357472265}, {:data0=>1.0011178137748928}, {:data0=>0.3638183128080044}, {:data0=>0.08210280947173647}, {:data0=>-1.1127653326722253}, {:data0=>0.5071401534743204}, {:data0=>-0.530456581731716}, {:data0=>-0.7070730526324711}, {:data0=>1.4270206240945165}, {:data0=>-1.0235370522294593}, {:data0=>0.34856579665800197}, {:data0=>-0.5023765699668441}, {:data0=>-0.25888664346379975}, {:data0=>0.4937468663661009}, {:data0=>0.043236079682937786}, {:data0=>0.39940466523460005}, {:data0=>-1.195218884160756}, {:data0=>-2.2464732160108998}, {:data0=>-2.6049758943986636}, {:data0=>-0.4387780724375299}, {:data0=>-0.3113688492200691}, {:data0=>-0.6214326369468597}, {:data0=>-0.1279652360203367}, {:data0=>0.7741989049821161}, {:data0=>1.339804309987978}, {:data0=>-1.1610061329778716}, {:data0=>-0.7253423949514134}, {:data0=>-0.31250245356836287}, {:data0=>1.1769248079272567}, {:data0=>-1.5459405216140034}, {:data0=>0.177877250081685}, {:data0=>-0.3743480118143762}, {:data0=>0.12382157864835673}, {:data0=>-1.7261915646027544}, {:data0=>1.6572441296750051}, {:data0=>-1.4158386040078146}, {:data0=>-0.14968449928674735}, {:data0=>-0.844423721565218}, {:data0=>0.0032962631541457866}, {:data0=>0.6660775151342374}, {:data0=>-0.09833785312891463}, {:data0=>2.060014181079775}, {:data0=>-0.7942292240616315}, {:data0=>-0.8092344785433856}, {:data0=>-0.8425357279349921}, {:data0=>-0.5931766206243528}, {:data0=>0.060296996032103437}, {:data0=>-0.09369216936095534}, {:data0=>1.1130964674993244}, {:data0=>0.8120328278322927}, {:data0=>1.9654602679875692}, {:data0=>-1.0511750137433546}, {:data0=>-2.0140452092307504}, {:data0=>0.810207319303796}, {:data0=>-0.029623705581032046}, {:data0=>-0.7337450251038337}, {:data0=>0.8385023537181567}, {:data0=>-1.0670517474558316}, {:data0=>0.9852445281838136}, {:data0=>-0.45994901563076473}, {:data0=>0.8961240495742715}, {:data0=>0.39579280048007415}, {:data0=>2.953078695913731}, {:data0=>-0.14034509887049829}, {:data0=>-0.34225240868560447}, {:data0=>-0.4954646167415411}, {:data0=>-0.8457352979066316}, {:data0=>-0.5343850657684656}, {:data0=>-1.5541109852360322}, {:data0=>1.244958143544791}, {:data0=>1.1177901848573466}, {:data0=>-0.06436868213269895}, {:data0=>1.2020423180332083}, {:data0=>0.5418863960736321}, {:data0=>0.5309177217249504}, {:data0=>-2.6076076256052474}, {:data0=>-0.48071623156496035}, {:data0=>-0.361529011260024}, {:data0=>0.7835437627173348}, {:data0=>-0.4991388072566356}, {:data0=>-0.7610359367129818}, {:data0=>-0.7268930663345617}, {:data0=>1.1002561920665963}, {:data0=>1.2032684640491547}, {:data0=>-0.09110203300211267}, {:data0=>-0.4005274174252996}, {:data0=>-0.9826630737549062}, {:data0=>1.0730381184849516}, {:data0=>-0.6370742716146379}, {:data0=>1.5925022963676203}, {:data0=>0.6117786870805872}, {:data0=>0.4982727968375673}, {:data0=>-1.4778750459463843}, {:data0=>0.60173850287624}, {:data0=>0.5580219956866992}, {:data0=>0.4351115401535602}, {:data0=>1.7698653895825718}, {:data0=>-0.7914088761116405}, {:data0=>-0.6077921151019083}, {:data0=>0.20986209543688097}, {:data0=>0.7450229117743006}, {:data0=>-1.1069072926864632}, {:data0=>0.30259380611766906}, {:data0=>0.4608845206006606}, {:data0=>0.2647775730114845}, {:data0=>-0.037050088856541465}, {:data0=>-0.5915013912672595}, {:data0=>-0.6043876252778387}, {:data0=>0.8651347229767141}, {:data0=>-0.8551297633480018}, {:data0=>1.3681543546406916}, {:data0=>1.1982452673852548}, {:data0=>-0.15437043100981607}, {:data0=>0.3040243087319314}, {:data0=>0.5935143632128818}, {:data0=>-0.6905886155968228}, {:data0=>-0.07786269516593983}, {:data0=>0.29730738372703125}, {:data0=>1.8950886395663238}, {:data0=>1.2981195220151656}, {:data0=>0.5181852643750645}, {:data0=>0.0017956235295356314}, {:data0=>-0.1449008712976705}, {:data0=>-0.13574098648552085}, {:data0=>-1.6753187679405073}, {:data0=>0.2915886734067373}, {:data0=>0.13577419375495364}, {:data0=>-0.487572550639249}, {:data0=>0.5258971231688984}, {:data0=>-0.6735857204852275}, {:data0=>0.9925157149714999}, {:data0=>0.7023615305714933}, {:data0=>1.4867383909856755}, {:data0=>0.08087571209780105}, {:data0=>-0.040000101120821085}, {:data0=>-1.1493194185553595}, {:data0=>0.554997083803567}, {:data0=>-0.48103607100946233}, {:data0=>-0.7241340867428957}, {:data0=>0.3174305149402051}, {:data0=>0.38633966194240077}, {:data0=>-0.34224799198901384}, {:data0=>0.6540859926148643}, {:data0=>-1.6398026500167262}, {:data0=>-1.4913894407578507}, {:data0=>0.262257673474337}, {:data0=>0.17261711181440947}, {:data0=>-1.8590485243402894}, {:data0=>0.7069133343440117}, {:data0=>0.7844730463765195}, {:data0=>-0.15554146617636658}, {:data0=>0.9996521832593939}, {:data0=>1.0895835952433697}, {:data0=>-0.8038165673667046}, {:data0=>-0.44485363534656364}, {:data0=>0.5718363393967948}, {:data0=>0.4851912325251913}, {:data0=>-0.07415978516882148}, {:data0=>-2.264700268380605}, {:data0=>-0.08122692498605019}, {:data0=>0.3066356910300257}, {:data0=>-0.365576188068914}, {:data0=>1.2965634092675298}, {:data0=>1.1258605183305828}, {:data0=>0.8343161128130124}, {:data0=>0.39604145414539854}, {:data0=>0.6262963844795292}, {:data0=>-0.30259525691440037}, {:data0=>0.4997205206808023}, {:data0=>1.159078654493193}, {:data0=>0.26465832476514045}, {:data0=>-0.1809983145829842}, {:data0=>-1.2214697454406631}, {:data0=>-0.7728520740086676}, {:data0=>1.0060461712524367}, {:data0=>0.5964316902005132}, {:data0=>0.6418160434233002}, {:data0=>-1.455805830859328}, {:data0=>-0.055154490283128875}, {:data0=>-0.1770559359610533}, {:data0=>0.13832112011664718}, {:data0=>-0.7845099763080008}, {:data0=>-0.6146144081527342}, {:data0=>0.53983290069069}, {:data0=>-0.5690540264612385}, {:data0=>-2.154785202425728}, {:data0=>1.067931539638013}, {:data0=>0.5721387368636478}, {:data0=>0.26329364522528226}, {:data0=>0.40573086739654374}, {:data0=>-0.3812752310763744}, {:data0=>-0.3105004674835421}, {:data0=>-0.004968555195669654}, {:data0=>-1.1340548100400618}, {:data0=>0.32486386131765443}, {:data0=>-1.2402025305852236}, {:data0=>1.109496368516859}, {:data0=>-1.3984475817232849}, {:data0=>0.12565787356011685}, {:data0=>1.0321922287521617}, {:data0=>0.09883193563341242}, {:data0=>0.033799223636375914}, {:data0=>1.2561462646958161}, {:data0=>-2.9244589180801337}, {:data0=>-0.6155456016138214}, {:data0=>-0.9820125833588023}, {:data0=>0.20555120181910563}, {:data0=>-0.4965644782037666}, {:data0=>-1.8298254491658665}, {:data0=>0.30520152099281117}, {:data0=>-0.5916366582561133}, {:data0=>1.4081696572092406}, {:data0=>-0.4348225376411867}, {:data0=>0.5418801679296334}, {:data0=>-1.5410969953263376}, {:data0=>-0.33973965301280074}, {:data0=>-0.03667270368526408}, {:data0=>0.4831051808787539}, {:data0=>-0.09912423087266106}, {:data0=>1.7828863236374801}, {:data0=>0.37385443122053214}, {:data0=>-0.9847001846962927}, {:data0=>0.8318301813542789}, {:data0=>-0.5326397264932448}, {:data0=>0.9213663185789263}, {:data0=>1.057353798069604}, {:data0=>-0.2593063529307806}, {:data0=>1.039259988252802}, {:data0=>-0.2132879883098582}, {:data0=>-0.5270270301440446}, {:data0=>-1.0035871169154977}, {:data0=>0.8458542343744203}, {:data0=>-1.6274766651596058}, {:data0=>-1.454075849441914}, {:data0=>1.580231933037021}, {:data0=>-0.35082775627689294}, {:data0=>-0.6063672127067085}, {:data0=>-1.083057215836017}, {:data0=>-1.072290341869927}, {:data0=>-0.7783935885663902}, {:data0=>1.9529789731242904}, {:data0=>1.1187536011909636}, {:data0=>2.085191797704872}, {:data0=>-0.05346535423256478}, {:data0=>-0.5910851744020976}, {:data0=>-0.1766734945497552}, {:data0=>0.7122390459769035}, {:data0=>-0.39715507664114064}, {:data0=>-0.08741754506739595}, {:data0=>-0.8912914975193087}, {:data0=>-0.45370807259948187}, {:data0=>-1.735862666090072}, {:data0=>0.3686915998734382}, {:data0=>1.1441140299370574}, {:data0=>0.6592012077996653}, {:data0=>0.2522325009616383}, {:data0=>-0.017209819480458053}, {:data0=>-2.974775982781738}, {:data0=>0.9266214771996197}, {:data0=>-0.10643405960295962}, {:data0=>-0.7611310789709396}, {:data0=>0.8735469618906677}, {:data0=>0.5609979139591126}, {:data0=>0.0922628984227096}, {:data0=>1.262157719923008}, {:data0=>-0.2550048955559651}, {:data0=>0.5050114803236814}, {:data0=>0.7898221078279738}, {:data0=>-0.3248658090631966}, {:data0=>0.906892812900735}, {:data0=>1.7166146105604394}, {:data0=>0.37142257739061846}, {:data0=>-1.5130762275148117}, {:data0=>-0.795467527582461}, {:data0=>-0.3306642410515903}, {:data0=>0.24157177516890596}, {:data0=>1.2743848104215407}, {:data0=>-1.5951501432446138}, {:data0=>-0.8124855139021875}, {:data0=>-0.7745203247550428}, {:data0=>1.1749400582807588}, {:data0=>-1.4714907173379177}, {:data0=>0.8906575483156354}, {:data0=>1.7453561924900016}, {:data0=>0.9296502505705411}, {:data0=>-1.3326874665069444}, {:data0=>-0.9344554205037052}, {:data0=>0.7253918600418694}, {:data0=>1.2819324669818328}, {:data0=>0.8787039036211918}, {:data0=>-1.6365372519172499}, {:data0=>-1.7599066766025488}, {:data0=>0.07192944064202883}, {:data0=>-0.22253219576489325}, {:data0=>-0.19097016162414474}, {:data0=>-0.40952386506790484}, {:data0=>-1.4470970366190243}, {:data0=>-0.00981550022796002}, {:data0=>-1.4426211420783015}, {:data0=>0.4187687791554053}, {:data0=>0.4580388014364283}, {:data0=>0.5563629172172578}, {:data0=>-1.436244139321719}, {:data0=>1.2739815696588952}, {:data0=>0.824080414809103}, {:data0=>-0.4957733272563236}, {:data0=>-0.8562718422261189}, {:data0=>-0.17691401715317245}, {:data0=>-1.451078789803433}, {:data0=>-0.1994065890625743}, {:data0=>0.1190124276823276}, {:data0=>0.40361581076477954}, {:data0=>1.7615527532087525}, {:data0=>-0.8584592464462572}, {:data0=>0.4953832523630317}, {:data0=>-0.7694323749521119}, {:data0=>0.2994331291571862}, {:data0=>2.1483343133494004}, {:data0=>0.4752216423522813}, {:data0=>-1.001963894231636}, {:data0=>0.276443580269399}, {:data0=>1.8060269114135772}, {:data0=>-0.5445577215145291}, {:data0=>-1.2344044043529694}, {:data0=>-0.7758182379617352}, {:data0=>0.22147961205668995}, {:data0=>0.30673597894020677}, {:data0=>0.18732349546859098}, {:data0=>0.8857936540623543}, {:data0=>-1.5687339838250696}, {:data0=>-0.768829940183807}, {:data0=>-1.1276119518913899}, {:data0=>0.11035847780152651}, {:data0=>-0.2709426573945341}, {:data0=>-0.07665176808775626}, {:data0=>1.00052216891239}, {:data0=>1.553024244755281}, {:data0=>-1.4375941934936738}, {:data0=>1.2611815832380797}, {:data0=>1.147364205645772}, {:data0=>0.671699115819471}, {:data0=>0.007200453093249738}, {:data0=>-0.2823542654731861}, {:data0=>-1.4663791557078065}, {:data0=>1.1075318013096533}, {:data0=>1.3389120686698377}, {:data0=>-1.4279793329717274}, {:data0=>-0.46148068212016236}, {:data0=>1.8338090304194585}, {:data0=>-0.044089721462203996}, {:data0=>0.5845332398829641}, {:data0=>0.38748971508867636}, {:data0=>0.11887335952549942}, {:data0=>1.4338410620203126}, {:data0=>-0.36677103965098223}, {:data0=>-0.4617449590935603}, {:data0=>1.7272829214892138}, {:data0=>-1.3540040372902953}, {:data0=>-0.11971828808580127}, {:data0=>0.7665722139394209}, {:data0=>-0.340882134201442}, {:data0=>-0.23836060932252215}, {:data0=>-1.1615543678333486}, {:data0=>0.5543541214300249}, {:data0=>1.0419936874524247}, {:data0=>-0.043800622503585476}, {:data0=>1.6533378185780658}, {:data0=>-1.5723519261272068}, {:data0=>0.2240848631951269}, {:data0=>-0.2694113797259306}, {:data0=>0.23961279404897928}, {:data0=>0.3848307323865309}, {:data0=>-0.9641830484054629}, {:data0=>-0.5824021432305646}, {:data0=>-0.8120477726507855}, {:data0=>1.1833344536097663}, {:data0=>-2.053137981619307}, {:data0=>-1.1075151641367635}, {:data0=>1.1574011571775211}, {:data0=>-0.2656919286012438}, {:data0=>-0.7023785590741812}, {:data0=>-1.9338802063996285}, {:data0=>1.3255070480334399}, {:data0=>-0.48572529512049023}, {:data0=>0.008148865323563051}, {:data0=>-0.6492946407631371}, {:data0=>0.18577874092561605}, {:data0=>-0.5322743833401391}, {:data0=>0.81433707293633}, {:data0=>-0.1613167156000288}, {:data0=>0.3423787323408424}, {:data0=>-0.4154973601863245}, {:data0=>0.012625409287664261}, {:data0=>-0.6872724521883021}, {:data0=>0.35800534784137467}, {:data0=>0.5054476899625263}, {:data0=>-0.3733026632253558}, {:data0=>-0.7315914289714286}, {:data0=>0.8724563900383125}]>}, :extension=>[]}>" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "require 'statsample'\n", "include Statsample::Shorthand\n", "\n", "a = rnorm(1000)\n", "a.plot type: :histogram do |p|\n", " p.yrange [0,200]\n", " p.y_label \"Frequency\"\n", " p.x_label \"Bins\"\n", "end" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### More plotting support\n", "\n", "Apart from interfacing with nyaplot, Daru::Vector also works out-of-the-box with rubyvis through statsample. To see generating plots with statsample and rubyvis in action, checkout the following notebooks:\n", "\n", "* [Histogram](http://nbviewer.ipython.org/github/SciRuby/sciruby-notebooks/blob/master/Visualization/Creating%20a%20Histogram.ipynb)\n", "* [Scatter Plot](http://nbviewer.ipython.org/github/SciRuby/sciruby-notebooks/blob/master/Visualization/Scatterplot%20with%20statsample.ipynb)\n", "* [Box Plot](http://nbviewer.ipython.org/github/SciRuby/sciruby-notebooks/blob/master/Visualization/Boxplot%20with%20daru%20and%20statsample.ipynb)" ] } ], "metadata": { "kernelspec": { "display_name": "Ruby 2.2.1", "language": "ruby", "name": "ruby" }, "language_info": { "file_extension": ".rb", "mimetype": "application/x-ruby", "name": "ruby", "version": "2.2.1" } }, "nbformat": 4, "nbformat_minor": 0 }