Skip to content

Instantly share code, notes, and snippets.

@genya0407
Created May 18, 2017 13:47
Show Gist options
  • Save genya0407/6c4b43826f5c677d912262793857b9cb to your computer and use it in GitHub Desktop.
Save genya0407/6c4b43826f5c677d912262793857b9cb to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 赤ワインと白ワインのどっちがおいしい?\n",
"\n",
"https://archive.ics.uci.edu/ml/datasets/wine\n",
"←このデータから、赤ワインの評価と白ワインの評価に差があるかを調べる"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"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\":\"http://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\", \"http://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\\\":\\\"http://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\\\", \\\"http://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'\n",
"require 'rbplotly'\n",
"require 'daru_plotly'\n",
"require 'statsample'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## csvを読み込む"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
" <tr>\n",
" <th colspan='14'>Daru::DataFrame(10x13)</th>\n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <th></th>\n",
" \n",
" <th>type</th>\n",
" \n",
" <th>fixed acidity</th>\n",
" \n",
" <th>volatile acidity</th>\n",
" \n",
" <th>citric acid</th>\n",
" \n",
" <th>residual sugar</th>\n",
" \n",
" <th>chlorides</th>\n",
" \n",
" <th>free sulfur dioxide</th>\n",
" \n",
" <th>total sulfur dioxide</th>\n",
" \n",
" <th>density</th>\n",
" \n",
" <th>pH</th>\n",
" \n",
" <th>sulphates</th>\n",
" \n",
" <th>alcohol</th>\n",
" \n",
" <th>quality</th>\n",
" \n",
" </tr>\n",
" \n",
"\n",
" \n",
" <tr>\n",
" <td>0</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.4</td>\n",
" \n",
" <td>0.7</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.9</td>\n",
" \n",
" <td>0.076</td>\n",
" \n",
" <td>11</td>\n",
" \n",
" <td>34</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.51</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.8</td>\n",
" \n",
" <td>0.88</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>2.6</td>\n",
" \n",
" <td>0.098</td>\n",
" \n",
" <td>25</td>\n",
" \n",
" <td>67</td>\n",
" \n",
" <td>0.9968</td>\n",
" \n",
" <td>3.2</td>\n",
" \n",
" <td>0.68</td>\n",
" \n",
" <td>9.8</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>2</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.8</td>\n",
" \n",
" <td>0.76</td>\n",
" \n",
" <td>0.04</td>\n",
" \n",
" <td>2.3</td>\n",
" \n",
" <td>0.092</td>\n",
" \n",
" <td>15</td>\n",
" \n",
" <td>54</td>\n",
" \n",
" <td>0.997</td>\n",
" \n",
" <td>3.26</td>\n",
" \n",
" <td>0.65</td>\n",
" \n",
" <td>9.8</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>3</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>11.2</td>\n",
" \n",
" <td>0.28</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>1.9</td>\n",
" \n",
" <td>0.075</td>\n",
" \n",
" <td>17</td>\n",
" \n",
" <td>60</td>\n",
" \n",
" <td>0.998</td>\n",
" \n",
" <td>3.16</td>\n",
" \n",
" <td>0.58</td>\n",
" \n",
" <td>9.8</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>4</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.4</td>\n",
" \n",
" <td>0.7</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.9</td>\n",
" \n",
" <td>0.076</td>\n",
" \n",
" <td>11</td>\n",
" \n",
" <td>34</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.51</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>5</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.4</td>\n",
" \n",
" <td>0.66</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.8</td>\n",
" \n",
" <td>0.075</td>\n",
" \n",
" <td>13</td>\n",
" \n",
" <td>40</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.51</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>6</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.9</td>\n",
" \n",
" <td>0.6</td>\n",
" \n",
" <td>0.06</td>\n",
" \n",
" <td>1.6</td>\n",
" \n",
" <td>0.069</td>\n",
" \n",
" <td>15</td>\n",
" \n",
" <td>59</td>\n",
" \n",
" <td>0.9964</td>\n",
" \n",
" <td>3.3</td>\n",
" \n",
" <td>0.46</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>7</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.3</td>\n",
" \n",
" <td>0.65</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.2</td>\n",
" \n",
" <td>0.065</td>\n",
" \n",
" <td>15</td>\n",
" \n",
" <td>21</td>\n",
" \n",
" <td>0.9946</td>\n",
" \n",
" <td>3.39</td>\n",
" \n",
" <td>0.47</td>\n",
" \n",
" <td>10</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>8</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.8</td>\n",
" \n",
" <td>0.58</td>\n",
" \n",
" <td>0.02</td>\n",
" \n",
" <td>2</td>\n",
" \n",
" <td>0.073</td>\n",
" \n",
" <td>9</td>\n",
" \n",
" <td>18</td>\n",
" \n",
" <td>0.9968</td>\n",
" \n",
" <td>3.36</td>\n",
" \n",
" <td>0.57</td>\n",
" \n",
" <td>9.5</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>9</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.5</td>\n",
" \n",
" <td>0.5</td>\n",
" \n",
" <td>0.36</td>\n",
" \n",
" <td>6.1</td>\n",
" \n",
" <td>0.071</td>\n",
" \n",
" <td>17</td>\n",
" \n",
" <td>102</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.35</td>\n",
" \n",
" <td>0.8</td>\n",
" \n",
" <td>10.5</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
"\n",
" \n",
"</table>"
],
"text/plain": [
"#<Daru::DataFrame(10x13)>\n",
" type fixed acid volatile a citric aci residual s chlorides free sulfu total sulf density pH sulphates alcohol quality\n",
" 0 red 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5\n",
" 1 red 7.8 0.88 0 2.6 0.098 25 67 0.9968 3.2 0.68 9.8 5\n",
" 2 red 7.8 0.76 0.04 2.3 0.092 15 54 0.997 3.26 0.65 9.8 5\n",
" 3 red 11.2 0.28 0.56 1.9 0.075 17 60 0.998 3.16 0.58 9.8 6\n",
" 4 red 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5\n",
" 5 red 7.4 0.66 0 1.8 0.075 13 40 0.9978 3.51 0.56 9.4 5\n",
" 6 red 7.9 0.6 0.06 1.6 0.069 15 59 0.9964 3.3 0.46 9.4 5\n",
" 7 red 7.3 0.65 0 1.2 0.065 15 21 0.9946 3.39 0.47 10 7\n",
" 8 red 7.8 0.58 0.02 2 0.073 9 18 0.9968 3.36 0.57 9.5 7\n",
" 9 red 7.5 0.5 0.36 6.1 0.071 17 102 0.9978 3.35 0.8 10.5 5"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wine = Daru::DataFrame.from_csv('./winequality-both.csv')\n",
"wine.head 10 # 最初の10行を表示"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[\"red\", \"white\"]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wine['type'].uniq.to_a"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[3, 4, 5, 6, 7, 8, 9]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wine['quality'].uniq.to_a.sort"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Object"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"include Daru::Plotly::Initializer # plot"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script>\n",
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
" </script>\n",
"\n",
"\n",
"<div id=\"466ec171-a977-41e1-8b52-d869927741b1\" style=\"height: 100%; width: 100%;\"></div>\n",
"\n",
"<script>\n",
" require(['plotly'], function(Plotly) { \n",
"Plotly.newPlot(\n",
" '466ec171-a977-41e1-8b52-d869927741b1',\n",
" [{\"x\":[5,5,5,6,5,5,5,7,7,5,5,5,5,5,5,5,7,5,4,6,6,5,5,5,6,5,5,5,5,6,5,6,5,6,5,6,6,7,4,5,5,4,6,5,5,4,5,5,5,5,5,6,6,5,6,5,5,5,5,6,5,5,7,5,5,5,5,5,5,6,6,5,5,4,5,5,5,6,5,4,5,5,5,5,6,5,6,5,5,5,5,6,5,5,4,6,5,5,5,6,6,6,6,5,5,5,5,5,6,5,5,5,5,6,5,6,6,6,6,6,5,6,5,5,5,5,5,5,7,5,5,5,5,6,6,5,5,5,5,5,5,5,6,5,6,5,5,5,6,6,6,4,5,5,5,5,5,5,5,6,5,4,6,5,5,5,5,4,6,5,4,6,6,6,5,5,5,6,5,5,5,5,5,5,6,5,5,5,5,5,5,6,5,5,5,5,5,6,7,4,7,5,5,5,6,7,7,5,5,7,6,6,6,5,6,5,5,5,5,5,6,5,5,6,4,6,6,5,6,5,7,6,6,5,6,6,6,6,6,6,5,6,6,7,7,6,5,5,6,6,6,6,5,5,6,5,5,5,5,7,5,4,5,5,5,7,4,8,6,6,6,6,5,5,5,6,6,6,8,7,6,7,5,7,5,5,6,6,7,5,7,5,6,6,6,5,5,5,5,5,6,6,5,5,5,6,5,6,6,6,6,6,6,5,5,6,5,6,7,6,7,5,5,6,6,6,7,5,6,5,6,6,6,5,7,7,6,5,6,7,6,6,6,6,6,5,7,6,6,6,6,6,5,5,6,6,5,7,7,6,5,6,5,5,7,6,7,5,5,7,5,6,6,5,6,7,6,7,6,6,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ot.ly\",\"showLink\":true}\n",
")\n",
"\n",
"window.addEventListener('resize', function() {\n",
" Plotly.Plots.resize(document.getElementById('466ec171-a977-41e1-8b52-d869927741b1'))\n",
"})\n",
" }) \n",
"</script>"
],
"text/plain": [
"#<Plotly::Offline::HTML:0x007f9424eeb758 @id=\"466ec171-a977-41e1-8b52-d869927741b1\", @data=[{:x=>[5, 5, 5, 6, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 4, 6, 6, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 7, 4, 5, 5, 4, 6, 5, 5, 4, 5, 5, 5, 5, 5, 6, 6, 5, 6, 5, 5, 5, 5, 6, 5, 5, 7, 5, 5, 5, 5, 5, 5, 6, 6, 5, 5, 4, 5, 5, 5, 6, 5, 4, 5, 5, 5, 5, 6, 5, 6, 5, 5, 5, 5, 6, 5, 5, 4, 6, 5, 5, 5, 6, 6, 6, 6, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 6, 6, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5, 5, 6, 6, 6, 4, 5, 5, 5, 5, 5, 5, 5, 6, 5, 4, 6, 5, 5, 5, 5, 4, 6, 5, 4, 6, 6, 6, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 6, 7, 4, 7, 5, 5, 5, 6, 7, 7, 5, 5, 7, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 6, 5, 5, 6, 4, 6, 6, 5, 6, 5, 7, 6, 6, 5, 6, 6, 6, 6, 6, 6, 5, 6, 6, 7, 7, 6, 5, 5, 6, 6, 6, 6, 5, 5, 6, 5, 5, 5, 5, 7, 5, 4, 5, 5, 5, 7, 4, 8, 6, 6, 6, 6, 5, 5, 5, 6, 6, 6,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 7, 5, 6, 6, 6, 5, 7, 6, 6, 5, 6, 7, 6, 5, 6, 6, 4, 7, 6, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 5, 5, 6, 6, 6, 6, 5, 6, 6, 6, 6, 7, 5, 6, 6, 6, 6, 6, 7, 6, 5, 6, 6, 6, 7, 5, 4, 6, 6, 6, 5, 6, 5, 6, 7, 7, 5, 6, 6, 6, 5, 6, 5, 6, 7, 6], :type=>:histogram}], @layout={:width=>1000, :height=>500}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"#<CZTop::Socket::PUB:0x7f9423cb50f0 last_endpoint=\"tcp://127.0.0.1:54062\">"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plot(wine['quality'], type: :histogram, x: :quality).show"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 赤ワインと白ワインを分ける"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
" <tr>\n",
" <th colspan='14'>Daru::DataFrame(10x13)</th>\n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <th></th>\n",
" \n",
" <th>type</th>\n",
" \n",
" <th>fixed acidity</th>\n",
" \n",
" <th>volatile acidity</th>\n",
" \n",
" <th>citric acid</th>\n",
" \n",
" <th>residual sugar</th>\n",
" \n",
" <th>chlorides</th>\n",
" \n",
" <th>free sulfur dioxide</th>\n",
" \n",
" <th>total sulfur dioxide</th>\n",
" \n",
" <th>density</th>\n",
" \n",
" <th>pH</th>\n",
" \n",
" <th>sulphates</th>\n",
" \n",
" <th>alcohol</th>\n",
" \n",
" <th>quality</th>\n",
" \n",
" </tr>\n",
" \n",
"\n",
" \n",
" <tr>\n",
" <td>0</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.4</td>\n",
" \n",
" <td>0.7</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.9</td>\n",
" \n",
" <td>0.076</td>\n",
" \n",
" <td>11</td>\n",
" \n",
" <td>34</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.51</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.8</td>\n",
" \n",
" <td>0.88</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>2.6</td>\n",
" \n",
" <td>0.098</td>\n",
" \n",
" <td>25</td>\n",
" \n",
" <td>67</td>\n",
" \n",
" <td>0.9968</td>\n",
" \n",
" <td>3.2</td>\n",
" \n",
" <td>0.68</td>\n",
" \n",
" <td>9.8</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>2</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.8</td>\n",
" \n",
" <td>0.76</td>\n",
" \n",
" <td>0.04</td>\n",
" \n",
" <td>2.3</td>\n",
" \n",
" <td>0.092</td>\n",
" \n",
" <td>15</td>\n",
" \n",
" <td>54</td>\n",
" \n",
" <td>0.997</td>\n",
" \n",
" <td>3.26</td>\n",
" \n",
" <td>0.65</td>\n",
" \n",
" <td>9.8</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>3</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>11.2</td>\n",
" \n",
" <td>0.28</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>1.9</td>\n",
" \n",
" <td>0.075</td>\n",
" \n",
" <td>17</td>\n",
" \n",
" <td>60</td>\n",
" \n",
" <td>0.998</td>\n",
" \n",
" <td>3.16</td>\n",
" \n",
" <td>0.58</td>\n",
" \n",
" <td>9.8</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>4</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.4</td>\n",
" \n",
" <td>0.7</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.9</td>\n",
" \n",
" <td>0.076</td>\n",
" \n",
" <td>11</td>\n",
" \n",
" <td>34</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.51</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>5</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.4</td>\n",
" \n",
" <td>0.66</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.8</td>\n",
" \n",
" <td>0.075</td>\n",
" \n",
" <td>13</td>\n",
" \n",
" <td>40</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.51</td>\n",
" \n",
" <td>0.56</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>6</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.9</td>\n",
" \n",
" <td>0.6</td>\n",
" \n",
" <td>0.06</td>\n",
" \n",
" <td>1.6</td>\n",
" \n",
" <td>0.069</td>\n",
" \n",
" <td>15</td>\n",
" \n",
" <td>59</td>\n",
" \n",
" <td>0.9964</td>\n",
" \n",
" <td>3.3</td>\n",
" \n",
" <td>0.46</td>\n",
" \n",
" <td>9.4</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>7</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.3</td>\n",
" \n",
" <td>0.65</td>\n",
" \n",
" <td>0</td>\n",
" \n",
" <td>1.2</td>\n",
" \n",
" <td>0.065</td>\n",
" \n",
" <td>15</td>\n",
" \n",
" <td>21</td>\n",
" \n",
" <td>0.9946</td>\n",
" \n",
" <td>3.39</td>\n",
" \n",
" <td>0.47</td>\n",
" \n",
" <td>10</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>8</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.8</td>\n",
" \n",
" <td>0.58</td>\n",
" \n",
" <td>0.02</td>\n",
" \n",
" <td>2</td>\n",
" \n",
" <td>0.073</td>\n",
" \n",
" <td>9</td>\n",
" \n",
" <td>18</td>\n",
" \n",
" <td>0.9968</td>\n",
" \n",
" <td>3.36</td>\n",
" \n",
" <td>0.57</td>\n",
" \n",
" <td>9.5</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>9</td>\n",
" \n",
" <td>red</td>\n",
" \n",
" <td>7.5</td>\n",
" \n",
" <td>0.5</td>\n",
" \n",
" <td>0.36</td>\n",
" \n",
" <td>6.1</td>\n",
" \n",
" <td>0.071</td>\n",
" \n",
" <td>17</td>\n",
" \n",
" <td>102</td>\n",
" \n",
" <td>0.9978</td>\n",
" \n",
" <td>3.35</td>\n",
" \n",
" <td>0.8</td>\n",
" \n",
" <td>10.5</td>\n",
" \n",
" <td>5</td>\n",
" \n",
" </tr>\n",
" \n",
"\n",
" \n",
"</table>"
],
"text/plain": [
"#<Daru::DataFrame(10x13)>\n",
" type fixed acid volatile a citric aci residual s chlorides free sulfu total sulf density pH sulphates alcohol quality\n",
" 0 red 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5\n",
" 1 red 7.8 0.88 0 2.6 0.098 25 67 0.9968 3.2 0.68 9.8 5\n",
" 2 red 7.8 0.76 0.04 2.3 0.092 15 54 0.997 3.26 0.65 9.8 5\n",
" 3 red 11.2 0.28 0.56 1.9 0.075 17 60 0.998 3.16 0.58 9.8 6\n",
" 4 red 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5\n",
" 5 red 7.4 0.66 0 1.8 0.075 13 40 0.9978 3.51 0.56 9.4 5\n",
" 6 red 7.9 0.6 0.06 1.6 0.069 15 59 0.9964 3.3 0.46 9.4 5\n",
" 7 red 7.3 0.65 0 1.2 0.065 15 21 0.9946 3.39 0.47 10 7\n",
" 8 red 7.8 0.58 0.02 2 0.073 9 18 0.9968 3.36 0.57 9.5 7\n",
" 9 red 7.5 0.5 0.36 6.1 0.071 17 102 0.9978 3.35 0.8 10.5 5"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"reds = wine.where(wine['type'].eq('red'))\n",
"reds.head 10"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
" <tr>\n",
" <th colspan='14'>Daru::DataFrame(10x13)</th>\n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <th></th>\n",
" \n",
" <th>type</th>\n",
" \n",
" <th>fixed acidity</th>\n",
" \n",
" <th>volatile acidity</th>\n",
" \n",
" <th>citric acid</th>\n",
" \n",
" <th>residual sugar</th>\n",
" \n",
" <th>chlorides</th>\n",
" \n",
" <th>free sulfur dioxide</th>\n",
" \n",
" <th>total sulfur dioxide</th>\n",
" \n",
" <th>density</th>\n",
" \n",
" <th>pH</th>\n",
" \n",
" <th>sulphates</th>\n",
" \n",
" <th>alcohol</th>\n",
" \n",
" <th>quality</th>\n",
" \n",
" </tr>\n",
" \n",
"\n",
" \n",
" <tr>\n",
" <td>1599</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" <td>0.27</td>\n",
" \n",
" <td>0.36</td>\n",
" \n",
" <td>20.7</td>\n",
" \n",
" <td>0.045</td>\n",
" \n",
" <td>45</td>\n",
" \n",
" <td>170</td>\n",
" \n",
" <td>1.001</td>\n",
" \n",
" <td>3</td>\n",
" \n",
" <td>0.45</td>\n",
" \n",
" <td>8.8</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1600</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>6.3</td>\n",
" \n",
" <td>0.3</td>\n",
" \n",
" <td>0.34</td>\n",
" \n",
" <td>1.6</td>\n",
" \n",
" <td>0.049</td>\n",
" \n",
" <td>14</td>\n",
" \n",
" <td>132</td>\n",
" \n",
" <td>0.994</td>\n",
" \n",
" <td>3.3</td>\n",
" \n",
" <td>0.49</td>\n",
" \n",
" <td>9.5</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1601</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>8.1</td>\n",
" \n",
" <td>0.28</td>\n",
" \n",
" <td>0.4</td>\n",
" \n",
" <td>6.9</td>\n",
" \n",
" <td>0.05</td>\n",
" \n",
" <td>30</td>\n",
" \n",
" <td>97</td>\n",
" \n",
" <td>0.9951</td>\n",
" \n",
" <td>3.26</td>\n",
" \n",
" <td>0.44</td>\n",
" \n",
" <td>10.1</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1602</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>7.2</td>\n",
" \n",
" <td>0.23</td>\n",
" \n",
" <td>0.32</td>\n",
" \n",
" <td>8.5</td>\n",
" \n",
" <td>0.058</td>\n",
" \n",
" <td>47</td>\n",
" \n",
" <td>186</td>\n",
" \n",
" <td>0.9956</td>\n",
" \n",
" <td>3.19</td>\n",
" \n",
" <td>0.4</td>\n",
" \n",
" <td>9.9</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1603</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>7.2</td>\n",
" \n",
" <td>0.23</td>\n",
" \n",
" <td>0.32</td>\n",
" \n",
" <td>8.5</td>\n",
" \n",
" <td>0.058</td>\n",
" \n",
" <td>47</td>\n",
" \n",
" <td>186</td>\n",
" \n",
" <td>0.9956</td>\n",
" \n",
" <td>3.19</td>\n",
" \n",
" <td>0.4</td>\n",
" \n",
" <td>9.9</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1604</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>8.1</td>\n",
" \n",
" <td>0.28</td>\n",
" \n",
" <td>0.4</td>\n",
" \n",
" <td>6.9</td>\n",
" \n",
" <td>0.05</td>\n",
" \n",
" <td>30</td>\n",
" \n",
" <td>97</td>\n",
" \n",
" <td>0.9951</td>\n",
" \n",
" <td>3.26</td>\n",
" \n",
" <td>0.44</td>\n",
" \n",
" <td>10.1</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1605</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>6.2</td>\n",
" \n",
" <td>0.32</td>\n",
" \n",
" <td>0.16</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" <td>0.045</td>\n",
" \n",
" <td>30</td>\n",
" \n",
" <td>136</td>\n",
" \n",
" <td>0.9949</td>\n",
" \n",
" <td>3.18</td>\n",
" \n",
" <td>0.47</td>\n",
" \n",
" <td>9.6</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1606</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>7</td>\n",
" \n",
" <td>0.27</td>\n",
" \n",
" <td>0.36</td>\n",
" \n",
" <td>20.7</td>\n",
" \n",
" <td>0.045</td>\n",
" \n",
" <td>45</td>\n",
" \n",
" <td>170</td>\n",
" \n",
" <td>1.001</td>\n",
" \n",
" <td>3</td>\n",
" \n",
" <td>0.45</td>\n",
" \n",
" <td>8.8</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1607</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>6.3</td>\n",
" \n",
" <td>0.3</td>\n",
" \n",
" <td>0.34</td>\n",
" \n",
" <td>1.6</td>\n",
" \n",
" <td>0.049</td>\n",
" \n",
" <td>14</td>\n",
" \n",
" <td>132</td>\n",
" \n",
" <td>0.994</td>\n",
" \n",
" <td>3.3</td>\n",
" \n",
" <td>0.49</td>\n",
" \n",
" <td>9.5</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>1608</td>\n",
" \n",
" <td>white</td>\n",
" \n",
" <td>8.1</td>\n",
" \n",
" <td>0.22</td>\n",
" \n",
" <td>0.43</td>\n",
" \n",
" <td>1.5</td>\n",
" \n",
" <td>0.044</td>\n",
" \n",
" <td>28</td>\n",
" \n",
" <td>129</td>\n",
" \n",
" <td>0.9938</td>\n",
" \n",
" <td>3.22</td>\n",
" \n",
" <td>0.45</td>\n",
" \n",
" <td>11</td>\n",
" \n",
" <td>6</td>\n",
" \n",
" </tr>\n",
" \n",
"\n",
" \n",
"</table>"
],
"text/plain": [
"#<Daru::DataFrame(10x13)>\n",
" type fixed acid volatile a citric aci residual s chlorides free sulfu total sulf density pH sulphates alcohol quality\n",
" 1599 white 7 0.27 0.36 20.7 0.045 45 170 1.001 3 0.45 8.8 6\n",
" 1600 white 6.3 0.3 0.34 1.6 0.049 14 132 0.994 3.3 0.49 9.5 6\n",
" 1601 white 8.1 0.28 0.4 6.9 0.05 30 97 0.9951 3.26 0.44 10.1 6\n",
" 1602 white 7.2 0.23 0.32 8.5 0.058 47 186 0.9956 3.19 0.4 9.9 6\n",
" 1603 white 7.2 0.23 0.32 8.5 0.058 47 186 0.9956 3.19 0.4 9.9 6\n",
" 1604 white 8.1 0.28 0.4 6.9 0.05 30 97 0.9951 3.26 0.44 10.1 6\n",
" 1605 white 6.2 0.32 0.16 7 0.045 30 136 0.9949 3.18 0.47 9.6 6\n",
" 1606 white 7 0.27 0.36 20.7 0.045 45 170 1.001 3 0.45 8.8 6\n",
" 1607 white 6.3 0.3 0.34 1.6 0.049 14 132 0.994 3.3 0.49 9.5 6\n",
" 1608 white 8.1 0.22 0.43 1.5 0.044 28 129 0.9938 3.22 0.45 11 6"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"whites = wine.where(wine['type'].eq('white'))\n",
"whites.head 10"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## qualityのヒストグラムを書く"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script>\n",
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
" </script>\n",
"\n",
"\n",
"<div id=\"e45d27d2-2d87-4516-99fe-fd5d4080945d\" style=\"height: 100%; width: 100%;\"></div>\n",
"\n",
"<script>\n",
" require(['plotly'], function(Plotly) { \n",
"Plotly.newPlot(\n",
" 'e45d27d2-2d87-4516-99fe-fd5d4080945d',\n",
" [{\"x\":[5,5,5,6,5,5,5,7,7,5,5,5,5,5,5,5,7,5,4,6,6,5,5,5,6,5,5,5,5,6,5,6,5,6,5,6,6,7,4,5,5,4,6,5,5,4,5,5,5,5,5,6,6,5,6,5,5,5,5,6,5,5,7,5,5,5,5,5,5,6,6,5,5,4,5,5,5,6,5,4,5,5,5,5,6,5,6,5,5,5,5,6,5,5,4,6,5,5,5,6,6,6,6,5,5,5,5,5,6,5,5,5,5,6,5,6,6,6,6,6,5,6,5,5,5,5,5,5,7,5,5,5,5,6,6,5,5,5,5,5,5,5,6,5,6,5,5,5,6,6,6,4,5,5,5,5,5,5,5,6,5,4,6,5,5,5,5,4,6,5,4,6,6,6,5,5,5,6,5,5,5,5,5,5,6,5,5,5,5,5,5,6,5,5,5,5,5,6,7,4,7,5,5,5,6,7,7,5,5,7,6,6,6,5,6,5,5,5,5,5,6,5,5,6,4,6,6,5,6,5,7,6,6,5,6,6,6,6,6,6,5,6,6,7,7,6,5,5,6,6,6,6,5,5,6,5,5,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6,5,7,8,8,5,6,6,6,6,6,5,7,7,6,5,6,7,7,8,7,4,6,6,6,5,6,5,6,7,5,6,7,6,6,6,6,5,6,6,7,5,6,6,6,5,7,6,6,5,6,7,6,5,6,6,4,7,6,6,5,6,5,6,7,6,5,6,5,5,5,6,6,6,6,5,6,6,6,6,7,5,6,6,6,6,6,7,6,5,6,6,6,7,5,4,6,6,6,5,6,5,6,7,7,5,6,6,6,5,6,5,6,7,6],\"type\":\"histogram\",\"marker\":{\"color\":\"blue\"}}],\n",
" {},\n",
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
")\n",
"\n",
"window.addEventListener('resize', function() {\n",
" Plotly.Plots.resize(document.getElementById('e45d27d2-2d87-4516-99fe-fd5d4080945d'))\n",
"})\n",
" }) \n",
"</script>"
],
"text/plain": [
"#<Plotly::Offline::HTML:0x007f94280897d8 @id=\"e45d27d2-2d87-4516-99fe-fd5d4080945d\", @data=[{:x=>[5, 5, 5, 6, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 4, 6, 6, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 7, 4, 5, 5, 4, 6, 5, 5, 4, 5, 5, 5, 5, 5, 6, 6, 5, 6, 5, 5, 5, 5, 6, 5, 5, 7, 5, 5, 5, 5, 5, 5, 6, 6, 5, 5, 4, 5, 5, 5, 6, 5, 4, 5, 5, 5, 5, 6, 5, 6, 5, 5, 5, 5, 6, 5, 5, 4, 6, 5, 5, 5, 6, 6, 6, 6, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 6, 6, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5, 5, 6, 6, 6, 4, 5, 5, 5, 5, 5, 5, 5, 6, 5, 4, 6, 5, 5, 5, 5, 4, 6, 5, 4, 6, 6, 6, 5, 5, 5, 6, 5, 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, 7, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 6, 6, 6, 6, 6, 6, 7, 6, 6, 5, 6, 6, 5, 5, 3, 6, 6, 5, 6, 5, 6, 7, 6, 6, 6, 7, 7, 6, 6, 6, 6, 7, 7, 6, 8, 8, 7, 6, 6, 6, 6, 5, 7, 4, 6, 6, 6, 6, 4, 5, 5, 6, 6, 5, 7, 8, 8, 5, 6, 6, 6, 6, 6, 5, 7, 7, 6, 5, 6, 7, 7, 8, 7, 4, 6, 6, 6, 5, 6, 5, 6, 7, 5, 6, 7, 6, 6, 6, 6, 5, 6, 6, 7, 5, 6, 6, 6, 5, 7, 6, 6, 5, 6, 7, 6, 5, 6, 6, 4, 7, 6, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 5, 5, 6, 6, 6, 6, 5, 6, 6, 6, 6, 7, 5, 6, 6, 6, 6, 6, 7, 6, 5, 6, 6, 6, 7, 5, 4, 6, 6, 6, 5, 6, 5, 6, 7, 7, 5, 6, 6, 6, 5, 6, 5, 6, 7, 6], :type=>:histogram, :marker=>{:color=>\"blue\"}}], @layout={}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"#<CZTop::Socket::PUB:0x7f9423cb50f0 last_endpoint=\"tcp://127.0.0.1:54062\">"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"red_quality = {\n",
" x: reds['quality'].to_a,\n",
" type: :histogram,\n",
" marker: {\n",
" color: 'red'\n",
" }\n",
"}\n",
"white_quality = {\n",
" x: whites['quality'].to_a,\n",
" type: :histogram,\n",
" marker: {\n",
" color: 'blue'\n",
" }\n",
"}\n",
"\n",
"Plotly::Plot.new(data: [red_quality, white_quality]).show"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## t検定\n",
"\n",
"赤ワインと白ワインの `quality` の平均値に差があるのか仮説検定する。"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"5.6360225140712945"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"reds['quality'].mean"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5.87790935075541"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"whites['quality'].mean"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:291.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:292.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:281.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:282.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Analysis 2017-05-18 22:44:49 +0900\n",
"= Statsample::Test::T\n",
" == Two Sample T Test\n",
" Mean and standard deviation\n",
"+----------+--------+--------+------+\n",
"| Variable | mean | sd | n |\n",
"+----------+--------+--------+------+\n",
"| quality | 5.6360 | 0.8076 | 1599 |\n",
"| quality | 5.8779 | 0.8856 | 4898 |\n",
"+----------+--------+--------+------+\n",
"\n",
" Levene test for equality of variances : F(1, 6495) = 0.6213 , p = 0.4306\n",
" T statistics\n",
"+--------------------+----------+-----------+----------------+\n",
"| Type | t | df | p (both tails) |\n",
"+--------------------+----------+-----------+----------------+\n",
"| Equal variance | -9.6856 | 6495 | 0.0000 |\n",
"| Non equal variance | -10.1494 | 2950.7505 | 0.0000 |\n",
"+--------------------+----------+-----------+----------------+\n",
"\n",
" Effect size\n",
"+-------+---------+\n",
"| x1-x2 | -0.2419 |\n",
"| d | -0.2599 |\n",
"+-------+---------+\n",
"\n",
"\n"
]
}
],
"source": [
"Statsample::Analysis.store(Statsample::Test::T) do\n",
" t = Statsample::Test.t_two_samples_independent(reds['quality'], whites['quality'])\n",
" summary t\n",
"end\n",
"Statsample::Analysis.run_batch"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## アルコール度数に差はあるのか?"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"10.422983114446502"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"reds['alcohol'].mean"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"10.514267047770149"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"whites['alcohol'].mean"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:291.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:292.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:281.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:282.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Analysis 2017-05-18 22:44:49 +0900\n",
"= Statsample::Test::T\n",
" == Two Sample T Test\n",
" Mean and standard deviation\n",
"+----------+---------+--------+------+\n",
"| Variable | mean | sd | n |\n",
"+----------+---------+--------+------+\n",
"| alcohol | 10.4230 | 1.0657 | 1599 |\n",
"| alcohol | 10.5143 | 1.2306 | 4898 |\n",
"+----------+---------+--------+------+\n",
"\n",
" Levene test for equality of variances : F(1, 6495) = 69.2651 , p = 0.0000\n",
" T statistics\n",
"+--------------------+---------+-----------+----------------+\n",
"| Type | t | df | p (both tails) |\n",
"+--------------------+---------+-----------+----------------+\n",
"| Equal variance | -2.6585 | 6495 | 0.0079 |\n",
"| Non equal variance | -2.8590 | 3100.4746 | 0.0043 |\n",
"+--------------------+---------+-----------+----------------+\n",
"\n",
" Effect size\n",
"+-------+---------+\n",
"| x1-x2 | -0.0913 |\n",
"| d | -0.0837 |\n",
"+-------+---------+\n",
"\n",
"\n"
]
}
],
"source": [
"Statsample::Analysis.store(Statsample::Test::T) do\n",
" t = Statsample::Test.t_two_samples_independent(reds['alcohol'], whites['alcohol'])\n",
" summary t\n",
"end\n",
"Statsample::Analysis.run_batch"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"これも `p < 0.01`を下回ってるので差がある。"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.311113195747343"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"reds['pH'].mean"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.1882666394446693"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"whites['pH'].mean"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:291.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:292.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:51.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:60.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.\n",
"NOTE: Daru::Vector#only_valid is deprecated; use reject_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#only_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/levene.rb:71.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:267.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:269.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:271.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:272.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:281.\n",
"NOTE: Daru::Vector#n_valid is deprecated; use count_values instead. It will be removed on or after 2016-10-01.\n",
"Daru::Vector#n_valid called from /Users/sangenya/.rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/statsample-2.0.2/lib/statsample/test/t.rb:282.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Analysis 2017-05-18 22:44:49 +0900\n",
"= Statsample::Test::T\n",
" == Two Sample T Test\n",
" Mean and standard deviation\n",
"+----------+--------+--------+------+\n",
"| Variable | mean | sd | n |\n",
"+----------+--------+--------+------+\n",
"| pH | 3.3111 | 0.1544 | 1599 |\n",
"| pH | 3.1883 | 0.1510 | 4898 |\n",
"+----------+--------+--------+------+\n",
"\n",
" Levene test for equality of variances : F(1, 6495) = 0.3282 , p = 0.5667\n",
" T statistics\n",
"+--------------------+---------+-----------+----------------+\n",
"| Type | t | df | p (both tails) |\n",
"+--------------------+---------+-----------+----------------+\n",
"| Equal variance | 28.0900 | 6495 | 0.0000 |\n",
"| Non equal variance | 27.7755 | 2667.0729 | 0.0000 |\n",
"+--------------------+---------+-----------+----------------+\n",
"\n",
" Effect size\n",
"+-------+--------+\n",
"| x1-x2 | 0.1228 |\n",
"| d | 0.3153 |\n",
"+-------+--------+\n",
"\n",
"\n"
]
}
],
"source": [
"Statsample::Analysis.store(Statsample::Test::T) do\n",
" t = Statsample::Test.t_two_samples_independent(reds['pH'], whites['pH'])\n",
" summary t\n",
"end\n",
"Statsample::Analysis.run_batch"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script>\n",
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
" </script>\n",
"\n",
"\n",
"<div id=\"d9750d7c-f9ad-4ba4-abcc-26addb913d25\" style=\"height: 100%; width: 100%;\"></div>\n",
"\n",
"<script>\n",
" require(['plotly'], function(Plotly) { \n",
"Plotly.newPlot(\n",
" 'd9750d7c-f9ad-4ba4-abcc-26addb913d25',\n",
" [{\"x\":[\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\",\"quality\"],\"type\":\"heatmap\",\"z\":[[1.0,0.21900825635100266,0.32443572544730104,-0.11198128107823678,0.29819477170273795,-0.28273542836956794,-0.32905390129522527,0.45890998228044255,-0.2527004683162333,0.29956774438249995,-0.09545152256332995,-0.07674320790962286],[0.21900825635100266,1.0000000000000002,-0.37798131705526566,-0.19601117434765503,0.3771242764338664,-0.35255730641340716,-0.4144761946507196,0.2712956478511821,0.261454402742256,0.2259836797410744,-0.03764038583468137,-0.26569947761148033],[0.32443572544730104,-0.37798131705526566,1.0,0.14245122598675725,0.038998014089851825,0.13312580951823125,0.19524197598145304,0.09615392906417021,-0.32980819113172016,0.0561973001349725,-0.01049349217337923,0.08553171718367827],[-0.11198128107823678,-0.19601117434765503,0.14245122598675725,0.9999999999999999,-0.12894049990326722,0.4028706400566557,0.4954815870066449,0.552516950293483,-0.2673198368768104,-0.1859274052901841,-0.3594147708159969,-0.03698048458576987],[0.29819477170273795,0.3771242764338664,0.038998014089851825,-0.12894049990326722,1.0000000000000002,-0.1950447852077002,-0.27963044744333765,0.3626146565578091,0.04470797955050543,0.395593306547331,-0.2569155799729125,-0.20066550043510553],[-0.28273542836956794,-0.35255730641340716,0.13312580951823125,0.4028706400566557,-0.1950447852077002,1.0000000000000002,0.7209340813785245,0.025716842144663805,-0.14585389640016552,-0.18845724880121598,-0.1798384348893394,0.05546305861663346],[-0.32905390129522527,-0.4144761946507196,0.19524197598145304,0.4954815870066449,-0.27963044744333765,0.7209340813785245,1.0,0.03239451234680212,-0.23841310290340784,-0.27572681991620573,-0.26573963910715914,-0.04138545385560974],[0.45890998228044255,0.2712956478511821,0.09615392906417021,0.552516950293483,0.3626146565578091,0.025716842144663805,0.03239451234680212,1.0,0.011686080687174244,0.25947849534575335,-0.6867454216813362,-0.3058579060694189],[-0.2527004683162333,0.261454402742256,-0.32980819113172016,-0.2673198368768104,0.04470797955050543,-0.14585389640016552,-0.23841310290340784,0.011686080687174244,1.0000000000000002,0.19212340657115304,0.12124846709464465,0.019505703714435736],[0.29956774438249995,0.2259836797410744,0.0561973001349725,-0.1859274052901841,0.395593306547331,-0.18845724880121598,-0.27572681991620573,0.25947849534575335,0.19212340657115304,0.9999999999999999,-0.003029194944255261,0.038485445876515374],[-0.09545152256332995,-0.03764038583468137,-0.01049349217337923,-0.3594147708159969,-0.2569155799729125,-0.1798384348893394,-0.26573963910715914,-0.6867454216813362,0.12124846709464465,-0.003029194944255261,1.0,0.44431852000752226],[-0.07674320790962286,-0.26569947761148033,0.08553171718367827,-0.03698048458576987,-0.20066550043510553,0.05546305861663346,-0.04138545385560974,-0.3058579060694189,0.019505703714435736,0.038485445876515374,0.44431852000752226,1.0]],\"y\":[\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\",\"quality\"]}],\n",
" {\"width\":500,\"height\":500},\n",
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
")\n",
"\n",
"window.addEventListener('resize', function() {\n",
" Plotly.Plots.resize(document.getElementById('d9750d7c-f9ad-4ba4-abcc-26addb913d25'))\n",
"})\n",
" }) \n",
"</script>"
],
"text/plain": [
"#<Plotly::Offline::HTML:0x007f94252738f8 @id=\"d9750d7c-f9ad-4ba4-abcc-26addb913d25\", @data=[{:x=>[\"fixed acidity\", \"volatile acidity\", \"citric acid\", \"residual sugar\", \"chlorides\", \"free sulfur dioxide\", \"total sulfur dioxide\", \"density\", \"pH\", \"sulphates\", \"alcohol\", \"quality\"], :type=>:heatmap, :z=>[[1.0, 0.21900825635100266, 0.32443572544730104, -0.11198128107823678, 0.29819477170273795, -0.28273542836956794, -0.32905390129522527, 0.45890998228044255, -0.2527004683162333, 0.29956774438249995, -0.09545152256332995, -0.07674320790962286], [0.21900825635100266, 1.0000000000000002, -0.37798131705526566, -0.19601117434765503, 0.3771242764338664, -0.35255730641340716, -0.4144761946507196, 0.2712956478511821, 0.261454402742256, 0.2259836797410744, -0.03764038583468137, -0.26569947761148033], [0.32443572544730104, -0.37798131705526566, 1.0, 0.14245122598675725, 0.038998014089851825, 0.13312580951823125, 0.19524197598145304, 0.09615392906417021, -0.32980819113172016, 0.0561973001349725, -0.01049349217337923, 0.08553171718367827], [-0.11198128107823678, -0.19601117434765503, 0.14245122598675725, 0.9999999999999999, -0.12894049990326722, 0.4028706400566557, 0.4954815870066449, 0.552516950293483, -0.2673198368768104, -0.1859274052901841, -0.3594147708159969, -0.03698048458576987], [0.29819477170273795, 0.3771242764338664, 0.038998014089851825, -0.12894049990326722, 1.0000000000000002, -0.1950447852077002, -0.27963044744333765, 0.3626146565578091, 0.04470797955050543, 0.395593306547331, -0.2569155799729125, -0.20066550043510553], [-0.28273542836956794, -0.35255730641340716, 0.13312580951823125, 0.4028706400566557, -0.1950447852077002, 1.0000000000000002, 0.7209340813785245, 0.025716842144663805, -0.14585389640016552, -0.18845724880121598, -0.1798384348893394, 0.05546305861663346], [-0.32905390129522527, -0.4144761946507196, 0.19524197598145304, 0.4954815870066449, -0.27963044744333765, 0.7209340813785245, 1.0, 0.03239451234680212, -0.23841310290340784, -0.27572681991620573, -0.26573963910715914, -0.04138545385560974], [0.45890998228044255, 0.2712956478511821, 0.09615392906417021, 0.552516950293483, 0.3626146565578091, 0.025716842144663805, 0.03239451234680212, 1.0, 0.011686080687174244, 0.25947849534575335, -0.6867454216813362, -0.3058579060694189], [-0.2527004683162333, 0.261454402742256, -0.32980819113172016, -0.2673198368768104, 0.04470797955050543, -0.14585389640016552, -0.23841310290340784, 0.011686080687174244, 1.0000000000000002, 0.19212340657115304, 0.12124846709464465, 0.019505703714435736], [0.29956774438249995, 0.2259836797410744, 0.0561973001349725, -0.1859274052901841, 0.395593306547331, -0.18845724880121598, -0.27572681991620573, 0.25947849534575335, 0.19212340657115304, 0.9999999999999999, -0.003029194944255261, 0.038485445876515374], [-0.09545152256332995, -0.03764038583468137, -0.01049349217337923, -0.3594147708159969, -0.2569155799729125, -0.1798384348893394, -0.26573963910715914, -0.6867454216813362, 0.12124846709464465, -0.003029194944255261, 1.0, 0.44431852000752226], [-0.07674320790962286, -0.26569947761148033, 0.08553171718367827, -0.03698048458576987, -0.20066550043510553, 0.05546305861663346, -0.04138545385560974, -0.3058579060694189, 0.019505703714435736, 0.038485445876515374, 0.44431852000752226, 1.0]], :y=>[\"fixed acidity\", \"volatile acidity\", \"citric acid\", \"residual sugar\", \"chlorides\", \"free sulfur dioxide\", \"total sulfur dioxide\", \"density\", \"pH\", \"sulphates\", \"alcohol\", \"quality\"]}], @layout={:width=>500, :height=>500}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"#<CZTop::Socket::PUB:0x7f9423cb50f0 last_endpoint=\"tcp://127.0.0.1:54062\">"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plot(wine.corr, type: :heatmap, layout: { width: 500, height: 500 }).show"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script>\n",
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
" </script>\n",
"\n",
"\n",
"<div id=\"8e99ac87-403c-4cd9-a244-c5ee3639430d\" style=\"height: 100%; width: 100%;\"></div>\n",
"\n",
"<script>\n",
" require(['plotly'], function(Plotly) { \n",
"Plotly.newPlot(\n",
" '8e99ac87-403c-4cd9-a244-c5ee3639430d',\n",
" [{\"x\":[\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\",\"quality\"],\"type\":\"heatmap\",\"z\":[[0.9999999999999999,-0.25613089477038187,0.671703434764104,0.1147767244949209,0.09370518632130495,-0.15379419286482482,-0.11318144304548038,0.6680472921189711,-0.6829781945685298,0.18300566393215342,-0.061668270639490645,0.12405164911322467],[-0.25613089477038187,1.0,-0.5524956845595839,0.001917881962790698,0.06129777247646161,-0.010503827006591854,0.07647000482092836,0.02202623219521588,0.23493729440739433,-0.2609866852832905,-0.2022880271495309,-0.39055778026400934],[0.671703434764104,-0.5524956845595839,1.0,0.14357716157031483,0.2038229138290425,-0.06097812919230495,0.03553302393116166,0.3649471752112519,-0.5419041447395132,0.31277004385441737,0.10990324663388665,0.2263725143180432],[0.1147767244949209,0.001917881962790698,0.14357716157031483,1.0,0.05560953520353218,0.18704899510428666,0.2030278816971015,0.35528337098337653,-0.08565242221887161,0.005527121339138363,0.042075437211749625,0.013731637340066348],[0.09370518632130495,0.06129777247646161,0.2038229138290425,0.05560953520353218,1.0,0.005562147004781117,0.04740046825907533,0.20063232664151198,-0.2650261311732279,0.37126048128542694,-0.22114054478890993,-0.12890655993005312],[-0.15379419286482482,-0.010503827006591854,-0.06097812919230495,0.18704899510428666,0.005562147004781117,0.9999999999999999,0.6676664504810211,-0.02194583116348925,0.07037749850494215,0.05165757184282859,-0.06940835355780796,-0.05065605724427642],[-0.11318144304548038,0.07647000482092836,0.03553302393116166,0.2030278816971015,0.04740046825907533,0.6676664504810211,0.9999999999999998,0.07126947620310328,-0.06649455901285604,0.04294683623953844,-0.2056539437343,-0.18510028892653838],[0.6680472921189711,0.02202623219521588,0.3649471752112519,0.35528337098337653,0.20063232664151198,-0.02194583116348925,0.07126947620310328,1.0,-0.3416993347850301,0.14850641172078524,-0.4961797702444889,-0.1749192277833492],[-0.6829781945685298,0.23493729440739433,-0.5419041447395132,-0.08565242221887161,-0.2650261311732279,0.07037749850494215,-0.06649455901285604,-0.3416993347850301,0.9999999999999999,-0.1966476023043703,0.20563250851242088,-0.05773139120538229],[0.18300566393215342,-0.2609866852832905,0.31277004385441737,0.005527121339138363,0.37126048128542694,0.05165757184282859,0.04294683623953844,0.14850641172078524,-0.1966476023043703,0.9999999999999999,0.09359475041244825,0.25139707906926206],[-0.061668270639490645,-0.2022880271495309,0.10990324663388665,0.042075437211749625,-0.22114054478890993,-0.06940835355780796,-0.2056539437343,-0.4961797702444889,0.20563250851242088,0.09359475041244825,1.0,0.47616632399954223],[0.12405164911322467,-0.39055778026400934,0.2263725143180432,0.013731637340066348,-0.12890655993005312,-0.05065605724427642,-0.18510028892653838,-0.1749192277833492,-0.05773139120538229,0.25139707906926206,0.47616632399954223,0.9999999999999998]],\"y\":[\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\",\"quality\"]}],\n",
" {\"width\":500,\"height\":500},\n",
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
")\n",
"\n",
"window.addEventListener('resize', function() {\n",
" Plotly.Plots.resize(document.getElementById('8e99ac87-403c-4cd9-a244-c5ee3639430d'))\n",
"})\n",
" }) \n",
"</script>"
],
"text/plain": [
"#<Plotly::Offline::HTML:0x007f9424dcbf30 @id=\"8e99ac87-403c-4cd9-a244-c5ee3639430d\", @data=[{:x=>[\"fixed acidity\", \"volatile acidity\", \"citric acid\", \"residual sugar\", \"chlorides\", \"free sulfur dioxide\", \"total sulfur dioxide\", \"density\", \"pH\", \"sulphates\", \"alcohol\", \"quality\"], :type=>:heatmap, :z=>[[0.9999999999999999, -0.25613089477038187, 0.671703434764104, 0.1147767244949209, 0.09370518632130495, -0.15379419286482482, -0.11318144304548038, 0.6680472921189711, -0.6829781945685298, 0.18300566393215342, -0.061668270639490645, 0.12405164911322467], [-0.25613089477038187, 1.0, -0.5524956845595839, 0.001917881962790698, 0.06129777247646161, -0.010503827006591854, 0.07647000482092836, 0.02202623219521588, 0.23493729440739433, -0.2609866852832905, -0.2022880271495309, -0.39055778026400934], [0.671703434764104, -0.5524956845595839, 1.0, 0.14357716157031483, 0.2038229138290425, -0.06097812919230495, 0.03553302393116166, 0.3649471752112519, -0.5419041447395132, 0.31277004385441737, 0.10990324663388665, 0.2263725143180432], [0.1147767244949209, 0.001917881962790698, 0.14357716157031483, 1.0, 0.05560953520353218, 0.18704899510428666, 0.2030278816971015, 0.35528337098337653, -0.08565242221887161, 0.005527121339138363, 0.042075437211749625, 0.013731637340066348], [0.09370518632130495, 0.06129777247646161, 0.2038229138290425, 0.05560953520353218, 1.0, 0.005562147004781117, 0.04740046825907533, 0.20063232664151198, -0.2650261311732279, 0.37126048128542694, -0.22114054478890993, -0.12890655993005312], [-0.15379419286482482, -0.010503827006591854, -0.06097812919230495, 0.18704899510428666, 0.005562147004781117, 0.9999999999999999, 0.6676664504810211, -0.02194583116348925, 0.07037749850494215, 0.05165757184282859, -0.06940835355780796, -0.05065605724427642], [-0.11318144304548038, 0.07647000482092836, 0.03553302393116166, 0.2030278816971015, 0.04740046825907533, 0.6676664504810211, 0.9999999999999998, 0.07126947620310328, -0.06649455901285604, 0.04294683623953844, -0.2056539437343, -0.18510028892653838], [0.6680472921189711, 0.02202623219521588, 0.3649471752112519, 0.35528337098337653, 0.20063232664151198, -0.02194583116348925, 0.07126947620310328, 1.0, -0.3416993347850301, 0.14850641172078524, -0.4961797702444889, -0.1749192277833492], [-0.6829781945685298, 0.23493729440739433, -0.5419041447395132, -0.08565242221887161, -0.2650261311732279, 0.07037749850494215, -0.06649455901285604, -0.3416993347850301, 0.9999999999999999, -0.1966476023043703, 0.20563250851242088, -0.05773139120538229], [0.18300566393215342, -0.2609866852832905, 0.31277004385441737, 0.005527121339138363, 0.37126048128542694, 0.05165757184282859, 0.04294683623953844, 0.14850641172078524, -0.1966476023043703, 0.9999999999999999, 0.09359475041244825, 0.25139707906926206], [-0.061668270639490645, -0.2022880271495309, 0.10990324663388665, 0.042075437211749625, -0.22114054478890993, -0.06940835355780796, -0.2056539437343, -0.4961797702444889, 0.20563250851242088, 0.09359475041244825, 1.0, 0.47616632399954223], [0.12405164911322467, -0.39055778026400934, 0.2263725143180432, 0.013731637340066348, -0.12890655993005312, -0.05065605724427642, -0.18510028892653838, -0.1749192277833492, -0.05773139120538229, 0.25139707906926206, 0.47616632399954223, 0.9999999999999998]], :y=>[\"fixed acidity\", \"volatile acidity\", \"citric acid\", \"residual sugar\", \"chlorides\", \"free sulfur dioxide\", \"total sulfur dioxide\", \"density\", \"pH\", \"sulphates\", \"alcohol\", \"quality\"]}], @layout={:width=>500, :height=>500}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"#<CZTop::Socket::PUB:0x7f9423cb50f0 last_endpoint=\"tcp://127.0.0.1:54062\">"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plot(reds.corr, type: :heatmap, layout: { width: 500, height: 500 }).show"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <script>\n",
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
" </script>\n",
"\n",
"\n",
"<div id=\"71afe47a-7d6e-4e6e-aa29-f69eb2650865\" style=\"height: 100%; width: 100%;\"></div>\n",
"\n",
"<script>\n",
" require(['plotly'], function(Plotly) { \n",
"Plotly.newPlot(\n",
" '71afe47a-7d6e-4e6e-aa29-f69eb2650865',\n",
" [{\"x\":[\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\",\"quality\"],\"type\":\"heatmap\",\"z\":[[1.0,-0.02269729014664722,0.2891806976936709,0.08902070136217109,0.023085643656347545,-0.04939585908117296,0.09106975615864041,0.26533101383918456,-0.42585829099137773,-0.01714298502113731,-0.1208811231935984,-0.11366283071301508],[-0.02269729014664722,0.9999999999999998,-0.14947181064857626,0.06428606009099626,0.07051157147938542,-0.09701193927796148,0.08926050355177916,0.027113845462434536,-0.031915368273489106,-0.03572814690581543,0.06771794278071933,-0.19472296892113355],[0.2891806976936709,-0.14947181064857626,1.0,0.094211624290494,0.11436444838681771,0.09407722101469596,0.12113079766441767,0.14950257057002206,-0.1637482114006227,0.06233094028523323,-0.07572873005712576,-0.009209090883975294],[0.08902070136217109,0.06428606009099626,0.094211624290494,0.9999999999999999,0.08868453594122573,0.2990983536935209,0.40143931115992704,0.8389664549045885,-0.19413345399025708,-0.026664365853858625,-0.4506312220327175,-0.09757682889469203],[0.023085643656347545,0.07051157147938542,0.11436444838681771,0.08868453594122573,1.0,0.10139235214133026,0.19891029964505635,0.2572113204364352,-0.0904394559759821,0.016762883708175774,-0.36018871210787423,-0.20993441094675605],[-0.04939585908117296,-0.09701193927796148,0.09407722101469596,0.2990983536935209,0.10139235214133026,1.0,0.6155009650098349,0.2942104108843109,-0.0006177961403311847,0.0592172458252637,-0.25010394147928344,0.008158067123435949],[0.09106975615864041,0.08926050355177916,0.12113079766441767,0.40143931115992704,0.19891029964505635,0.6155009650098349,1.0000000000000002,0.5298813238786104,0.0023209717682778994,0.13456236692981022,-0.44889210205825786,-0.17473721759706046],[0.26533101383918456,0.027113845462434536,0.14950257057002206,0.8389664549045885,0.2572113204364352,0.2942104108843109,0.5298813238786104,0.9999999999999998,-0.09359149345524445,0.07449314851167685,-0.7801376214258134,-0.3071233127347261],[-0.42585829099137773,-0.031915368273489106,-0.1637482114006227,-0.19413345399025708,-0.0904394559759821,-0.0006177961403311847,0.0023209717682778994,-0.09359149345524445,0.9999999999999999,0.15595149727965207,0.12143209874946191,0.09942724573666258],[-0.01714298502113731,-0.03572814690581543,0.06233094028523323,-0.026664365853858625,0.016762883708175774,0.0592172458252637,0.13456236692981022,0.07449314851167685,0.15595149727965207,0.9999999999999999,-0.017432771861015616,0.05367787713279186],[-0.1208811231935984,0.06771794278071933,-0.07572873005712576,-0.4506312220327175,-0.36018871210787423,-0.25010394147928344,-0.44889210205825786,-0.7801376214258134,0.12143209874946191,-0.017432771861015616,0.9999999999999999,0.4355747154616511],[-0.11366283071301508,-0.19472296892113355,-0.009209090883975294,-0.09757682889469203,-0.20993441094675605,0.008158067123435949,-0.17473721759706046,-0.3071233127347261,0.09942724573666258,0.05367787713279186,0.4355747154616511,1.0000000000000002]],\"y\":[\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\",\"quality\"]}],\n",
" {\"width\":500,\"height\":500},\n",
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
")\n",
"\n",
"window.addEventListener('resize', function() {\n",
" Plotly.Plots.resize(document.getElementById('71afe47a-7d6e-4e6e-aa29-f69eb2650865'))\n",
"})\n",
" }) \n",
"</script>"
],
"text/plain": [
"#<Plotly::Offline::HTML:0x007f9424566980 @id=\"71afe47a-7d6e-4e6e-aa29-f69eb2650865\", @data=[{:x=>[\"fixed acidity\", \"volatile acidity\", \"citric acid\", \"residual sugar\", \"chlorides\", \"free sulfur dioxide\", \"total sulfur dioxide\", \"density\", \"pH\", \"sulphates\", \"alcohol\", \"quality\"], :type=>:heatmap, :z=>[[1.0, -0.02269729014664722, 0.2891806976936709, 0.08902070136217109, 0.023085643656347545, -0.04939585908117296, 0.09106975615864041, 0.26533101383918456, -0.42585829099137773, -0.01714298502113731, -0.1208811231935984, -0.11366283071301508], [-0.02269729014664722, 0.9999999999999998, -0.14947181064857626, 0.06428606009099626, 0.07051157147938542, -0.09701193927796148, 0.08926050355177916, 0.027113845462434536, -0.031915368273489106, -0.03572814690581543, 0.06771794278071933, -0.19472296892113355], [0.2891806976936709, -0.14947181064857626, 1.0, 0.094211624290494, 0.11436444838681771, 0.09407722101469596, 0.12113079766441767, 0.14950257057002206, -0.1637482114006227, 0.06233094028523323, -0.07572873005712576, -0.009209090883975294], [0.08902070136217109, 0.06428606009099626, 0.094211624290494, 0.9999999999999999, 0.08868453594122573, 0.2990983536935209, 0.40143931115992704, 0.8389664549045885, -0.19413345399025708, -0.026664365853858625, -0.4506312220327175, -0.09757682889469203], [0.023085643656347545, 0.07051157147938542, 0.11436444838681771, 0.08868453594122573, 1.0, 0.10139235214133026, 0.19891029964505635, 0.2572113204364352, -0.0904394559759821, 0.016762883708175774, -0.36018871210787423, -0.20993441094675605], [-0.04939585908117296, -0.09701193927796148, 0.09407722101469596, 0.2990983536935209, 0.10139235214133026, 1.0, 0.6155009650098349, 0.2942104108843109, -0.0006177961403311847, 0.0592172458252637, -0.25010394147928344, 0.008158067123435949], [0.09106975615864041, 0.08926050355177916, 0.12113079766441767, 0.40143931115992704, 0.19891029964505635, 0.6155009650098349, 1.0000000000000002, 0.5298813238786104, 0.0023209717682778994, 0.13456236692981022, -0.44889210205825786, -0.17473721759706046], [0.26533101383918456, 0.027113845462434536, 0.14950257057002206, 0.8389664549045885, 0.2572113204364352, 0.2942104108843109, 0.5298813238786104, 0.9999999999999998, -0.09359149345524445, 0.07449314851167685, -0.7801376214258134, -0.3071233127347261], [-0.42585829099137773, -0.031915368273489106, -0.1637482114006227, -0.19413345399025708, -0.0904394559759821, -0.0006177961403311847, 0.0023209717682778994, -0.09359149345524445, 0.9999999999999999, 0.15595149727965207, 0.12143209874946191, 0.09942724573666258], [-0.01714298502113731, -0.03572814690581543, 0.06233094028523323, -0.026664365853858625, 0.016762883708175774, 0.0592172458252637, 0.13456236692981022, 0.07449314851167685, 0.15595149727965207, 0.9999999999999999, -0.017432771861015616, 0.05367787713279186], [-0.1208811231935984, 0.06771794278071933, -0.07572873005712576, -0.4506312220327175, -0.36018871210787423, -0.25010394147928344, -0.44889210205825786, -0.7801376214258134, 0.12143209874946191, -0.017432771861015616, 0.9999999999999999, 0.4355747154616511], [-0.11366283071301508, -0.19472296892113355, -0.009209090883975294, -0.09757682889469203, -0.20993441094675605, 0.008158067123435949, -0.17473721759706046, -0.3071233127347261, 0.09942724573666258, 0.05367787713279186, 0.4355747154616511, 1.0000000000000002]], :y=>[\"fixed acidity\", \"volatile acidity\", \"citric acid\", \"residual sugar\", \"chlorides\", \"free sulfur dioxide\", \"total sulfur dioxide\", \"density\", \"pH\", \"sulphates\", \"alcohol\", \"quality\"]}], @layout={:width=>500, :height=>500}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"#<CZTop::Socket::PUB:0x7f9423cb50f0 last_endpoint=\"tcp://127.0.0.1:54062\">"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"plot(whites.corr, type: :heatmap, layout: { width: 500, height: 500 }).show"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Ruby 2.3.2",
"language": "ruby",
"name": "ruby"
},
"language_info": {
"file_extension": ".rb",
"mimetype": "application/x-ruby",
"name": "ruby",
"version": "2.3.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment