UniTO/anno2/YearI/SecondSem/BDM/progetto/source/ProgettoBDM.ipynb

1498 lines
59 KiB
Text
Raw Normal View History

2018-11-22 13:09:11 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"from scipy import stats\n",
"import numpy as np\n",
"\n",
"data='../3classdata/W/1.csv'\n",
"window=3\n",
"resolution=500\n",
"shift=3\n",
"\n",
"import glob\n",
"from functools import partial\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([-1. , -0.48715223, -0.40806948, -0.3564728 , -0.31673373,\n",
" -0.28370106, -0.25499594, -0.22931092, -0.20584419, -0.18406497,\n",
" -0.16360107, -0.14417942, -0.1255919 , -0.10767457, -0.09029443,\n",
" -0.07334053, -0.05671771, -0.04034218, -0.02413812, -0.00803494,\n",
" 0.00803494, 0.02413812, 0.04034218, 0.05671771, 0.07334053,\n",
" 0.09029443, 0.10767457, 0.1255919 , 0.14417942, 0.16360107,\n",
" 0.18406497, 0.20584419, 0.22931092, 0.25499594, 0.28370106,\n",
" 0.31673373, 0.3564728 , 0.40806948, 0.48715223, 1. ])"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def gaussian_interval(resolution):\n",
" # use a gaussian distribution, mean 0, std deviation 0.25\n",
" distribution = stats.norm(loc=0, scale=0.25)\n",
" # bounds of range for inverse comulative distribution function\n",
" bounds = distribution.cdf([-1, 1])\n",
" # generate linear space of 2*resolution points using bounds\n",
" linsp = np.linspace(*bounds, num=2*resolution)\n",
" # obtain the array of 2*resolution points\n",
" return distribution.ppf(linsp)\n",
"gaussian_interval(20)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv(data, dtype=float, header=None)\n",
"# rotate dataframe (each column is a temporal sequence)\n",
"df = df.T.reset_index().reindex(axis=1).drop(['index'], axis=1).infer_objects()\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>0</th>\n",
" <th>1</th>\n",
" <th>2</th>\n",
" <th>3</th>\n",
" <th>4</th>\n",
" <th>5</th>\n",
" <th>6</th>\n",
" <th>7</th>\n",
" <th>8</th>\n",
" <th>9</th>\n",
" <th>10</th>\n",
" <th>11</th>\n",
" <th>12</th>\n",
" <th>13</th>\n",
" <th>14</th>\n",
" <th>15</th>\n",
" <th>16</th>\n",
" <th>17</th>\n",
" <th>18</th>\n",
" <th>19</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-0.794245</td>\n",
" <td>-1.000000</td>\n",
" <td>0.828071</td>\n",
" <td>-0.994168</td>\n",
" <td>0.944798</td>\n",
" <td>0.668407</td>\n",
" <td>-0.373019</td>\n",
" <td>-0.150670</td>\n",
" <td>0.847187</td>\n",
" <td>0.993011</td>\n",
" <td>0.997649</td>\n",
" <td>0.424828</td>\n",
" <td>0.707602</td>\n",
" <td>-0.548011</td>\n",
" <td>-0.897720</td>\n",
" <td>-0.996191</td>\n",
" <td>0.733333</td>\n",
" <td>1.000000</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>-0.773646</td>\n",
" <td>-0.982051</td>\n",
" <td>0.838096</td>\n",
" <td>-1.000000</td>\n",
" <td>0.702760</td>\n",
" <td>0.490809</td>\n",
" <td>-0.536255</td>\n",
" <td>0.522335</td>\n",
" <td>0.949622</td>\n",
" <td>1.000000</td>\n",
" <td>1.000000</td>\n",
" <td>0.416761</td>\n",
" <td>0.719298</td>\n",
" <td>-0.696552</td>\n",
" <td>-0.840543</td>\n",
" <td>-1.000000</td>\n",
" <td>0.721212</td>\n",
" <td>0.707079</td>\n",
" <td>-0.989454</td>\n",
" <td>-0.998286</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>-0.704494</td>\n",
" <td>-0.941707</td>\n",
" <td>0.867532</td>\n",
" <td>-0.971583</td>\n",
" <td>0.515924</td>\n",
" <td>0.189991</td>\n",
" <td>-0.667524</td>\n",
" <td>0.557023</td>\n",
" <td>0.946264</td>\n",
" <td>0.940591</td>\n",
" <td>0.540661</td>\n",
" <td>-0.131239</td>\n",
" <td>0.754386</td>\n",
" <td>-0.875862</td>\n",
" <td>-0.722166</td>\n",
" <td>-0.990737</td>\n",
" <td>0.715152</td>\n",
" <td>0.664768</td>\n",
" <td>-0.700204</td>\n",
" <td>-0.977304</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>-0.702488</td>\n",
" <td>-0.727678</td>\n",
" <td>0.847612</td>\n",
" <td>-0.956749</td>\n",
" <td>0.222930</td>\n",
" <td>-0.078956</td>\n",
" <td>-0.759538</td>\n",
" <td>0.573242</td>\n",
" <td>0.914358</td>\n",
" <td>0.871396</td>\n",
" <td>-0.152875</td>\n",
" <td>-0.246231</td>\n",
" <td>0.766082</td>\n",
" <td>-0.839788</td>\n",
" <td>-0.739604</td>\n",
" <td>-0.937756</td>\n",
" <td>0.660606</td>\n",
" <td>0.243287</td>\n",
" <td>-0.358765</td>\n",
" <td>-0.947124</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>-0.653693</td>\n",
" <td>-0.474916</td>\n",
" <td>0.893637</td>\n",
" <td>-0.896301</td>\n",
" <td>-0.210191</td>\n",
" <td>-0.359162</td>\n",
" <td>-0.840516</td>\n",
" <td>-1.000000</td>\n",
" <td>0.993283</td>\n",
" <td>0.808842</td>\n",
" <td>-0.618419</td>\n",
" <td>-0.535811</td>\n",
" <td>0.812865</td>\n",
" <td>-0.818568</td>\n",
" <td>-0.519115</td>\n",
" <td>-0.823284</td>\n",
" <td>0.630303</td>\n",
" <td>0.222132</td>\n",
" <td>-0.169913</td>\n",
" <td>-0.810559</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0 1 2 3 4 5 6 \\\n",
"0 -0.794245 -1.000000 0.828071 -0.994168 0.944798 0.668407 -0.373019 \n",
"1 -0.773646 -0.982051 0.838096 -1.000000 0.702760 0.490809 -0.536255 \n",
"2 -0.704494 -0.941707 0.867532 -0.971583 0.515924 0.189991 -0.667524 \n",
"3 -0.702488 -0.727678 0.847612 -0.956749 0.222930 -0.078956 -0.759538 \n",
"4 -0.653693 -0.474916 0.893637 -0.896301 -0.210191 -0.359162 -0.840516 \n",
"\n",
" 7 8 9 10 11 12 13 \\\n",
"0 -0.150670 0.847187 0.993011 0.997649 0.424828 0.707602 -0.548011 \n",
"1 0.522335 0.949622 1.000000 1.000000 0.416761 0.719298 -0.696552 \n",
"2 0.557023 0.946264 0.940591 0.540661 -0.131239 0.754386 -0.875862 \n",
"3 0.573242 0.914358 0.871396 -0.152875 -0.246231 0.766082 -0.839788 \n",
"4 -1.000000 0.993283 0.808842 -0.618419 -0.535811 0.812865 -0.818568 \n",
"\n",
" 14 15 16 17 18 19 \n",
"0 -0.897720 -0.996191 0.733333 1.000000 -1.000000 -1.000000 \n",
"1 -0.840543 -1.000000 0.721212 0.707079 -0.989454 -0.998286 \n",
"2 -0.722166 -0.990737 0.715152 0.664768 -0.700204 -0.977304 \n",
"3 -0.739604 -0.937756 0.660606 0.243287 -0.358765 -0.947124 \n",
"4 -0.519115 -0.823284 0.630303 0.222132 -0.169913 -0.810559 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = ((df - df.min()) / (df.max() - df.min()))*2 - 1\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"#df = df.apply(partial(\n",
" # discretize_series, gaussianInterval=gaussian_interval(resolution)))\n",
"#df.head()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"l = df.apply(lambda x : pd.cut(x, gaussian_interval(resolution), right=True).apply(lambda l : l.left))\n",
"r = df.apply(lambda x : pd.cut(x, gaussian_interval(resolution), right=True).apply(lambda l : l.right))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"df = l"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>0</th>\n",
" <th>1</th>\n",
" <th>2</th>\n",
" <th>3</th>\n",
" <th>4</th>\n",
" <th>5</th>\n",
" <th>6</th>\n",
" <th>7</th>\n",
" <th>8</th>\n",
" <th>9</th>\n",
" <th>10</th>\n",
" <th>11</th>\n",
" <th>12</th>\n",
" <th>13</th>\n",
" <th>14</th>\n",
" <th>15</th>\n",
" <th>16</th>\n",
" <th>17</th>\n",
" <th>18</th>\n",
" <th>19</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-1.0000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>0.770200</td>\n",
" <td>0.66230</td>\n",
" <td>-0.37440</td>\n",
" <td>-0.15070</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.7702</td>\n",
" <td>0.423700</td>\n",
" <td>0.6860</td>\n",
" <td>-0.549000</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.718200</td>\n",
" <td>0.77020</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>-1.0000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>0.686000</td>\n",
" <td>0.48980</td>\n",
" <td>-0.54220</td>\n",
" <td>0.51840</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.7702</td>\n",
" <td>0.415900</td>\n",
" <td>0.7182</td>\n",
" <td>-0.718200</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.718200</td>\n",
" <td>0.68600</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>-0.7182</td>\n",
" <td>-1.00000</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>0.513200</td>\n",
" <td>0.18950</td>\n",
" <td>-0.68600</td>\n",
" <td>0.55620</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.5358</td>\n",
" <td>-0.131600</td>\n",
" <td>0.7182</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>-1.00000</td>\n",
" <td>0.686000</td>\n",
" <td>0.66230</td>\n",
" <td>-0.71820</td>\n",
" <td>-1.00000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>-0.7182</td>\n",
" <td>-0.77020</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>0.222100</td>\n",
" <td>-0.07941</td>\n",
" <td>-0.77020</td>\n",
" <td>0.57220</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>-0.1530</td>\n",
" <td>-0.246400</td>\n",
" <td>0.7182</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>-1.00000</td>\n",
" <td>0.643300</td>\n",
" <td>0.24230</td>\n",
" <td>-0.35970</td>\n",
" <td>-1.00000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>-0.6623</td>\n",
" <td>-0.47750</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.210200</td>\n",
" <td>-0.35970</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>-0.6275</td>\n",
" <td>-0.535800</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.52400</td>\n",
" <td>-1.00000</td>\n",
" <td>0.627500</td>\n",
" <td>0.22210</td>\n",
" <td>-0.17000</td>\n",
" <td>-1.00000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>-0.2886</td>\n",
" <td>-0.71820</td>\n",
" <td>0.770200</td>\n",
" <td>-0.77020</td>\n",
" <td>-0.010980</td>\n",
" <td>-0.44960</td>\n",
" <td>-1.00000</td>\n",
" <td>0.68600</td>\n",
" <td>0.77020</td>\n",
" <td>0.71820</td>\n",
" <td>-0.7182</td>\n",
" <td>-0.503300</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.27670</td>\n",
" <td>-0.71820</td>\n",
" <td>0.627500</td>\n",
" <td>0.28620</td>\n",
" <td>-0.05148</td>\n",
" <td>-0.48980</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>-0.1266</td>\n",
" <td>-0.37440</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>0.180400</td>\n",
" <td>-0.60180</td>\n",
" <td>-1.00000</td>\n",
" <td>0.03936</td>\n",
" <td>0.77020</td>\n",
" <td>0.60180</td>\n",
" <td>-1.0000</td>\n",
" <td>-1.000000</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>0.07677</td>\n",
" <td>-0.64330</td>\n",
" <td>0.041910</td>\n",
" <td>-0.19030</td>\n",
" <td>0.29480</td>\n",
" <td>-0.53580</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>0.1614</td>\n",
" <td>-0.04573</td>\n",
" <td>0.662300</td>\n",
" <td>-0.77020</td>\n",
" <td>0.302500</td>\n",
" <td>-0.71820</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.09406</td>\n",
" <td>0.77020</td>\n",
" <td>0.64330</td>\n",
" <td>-1.0000</td>\n",
" <td>-1.000000</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>0.48980</td>\n",
" <td>-0.51840</td>\n",
" <td>-0.303800</td>\n",
" <td>-0.57220</td>\n",
" <td>0.14400</td>\n",
" <td>-0.39490</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>0.4941</td>\n",
" <td>0.24950</td>\n",
" <td>0.386400</td>\n",
" <td>-0.62750</td>\n",
" <td>-0.036190</td>\n",
" <td>-0.77020</td>\n",
" <td>-1.00000</td>\n",
" <td>0.11460</td>\n",
" <td>0.77020</td>\n",
" <td>0.66230</td>\n",
" <td>-0.6275</td>\n",
" <td>-1.000000</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.41350</td>\n",
" <td>-0.643300</td>\n",
" <td>-0.71820</td>\n",
" <td>0.47750</td>\n",
" <td>-0.16840</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>0.5081</td>\n",
" <td>0.54220</td>\n",
" <td>0.179600</td>\n",
" <td>-0.27560</td>\n",
" <td>-0.513200</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.45600</td>\n",
" <td>0.77020</td>\n",
" <td>0.64330</td>\n",
" <td>-0.1008</td>\n",
" <td>-1.000000</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.35110</td>\n",
" <td>-0.770200</td>\n",
" <td>-0.77020</td>\n",
" <td>0.61380</td>\n",
" <td>-0.01601</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>0.6018</td>\n",
" <td>0.44340</td>\n",
" <td>0.001568</td>\n",
" <td>-0.27910</td>\n",
" <td>-0.494100</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.71820</td>\n",
" <td>0.71820</td>\n",
" <td>0.52400</td>\n",
" <td>0.1188</td>\n",
" <td>-1.000000</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.26110</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.66230</td>\n",
" <td>-0.05212</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>0.6623</td>\n",
" <td>0.37830</td>\n",
" <td>-0.198800</td>\n",
" <td>-0.02671</td>\n",
" <td>-0.518400</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>0.56390</td>\n",
" <td>0.32600</td>\n",
" <td>0.3949</td>\n",
" <td>-0.686000</td>\n",
" <td>0.7702</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.15070</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.71820</td>\n",
" <td>-0.07809</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>0.7702</td>\n",
" <td>0.66230</td>\n",
" <td>-0.408600</td>\n",
" <td>0.17800</td>\n",
" <td>-0.326000</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.64330</td>\n",
" <td>0.07415</td>\n",
" <td>-0.25260</td>\n",
" <td>0.2165</td>\n",
" <td>-1.000000</td>\n",
" <td>0.7702</td>\n",
" <td>-0.382300</td>\n",
" <td>0.77020</td>\n",
" <td>0.15530</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.71820</td>\n",
" <td>0.52400</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>0.7702</td>\n",
" <td>0.77020</td>\n",
" <td>-0.294800</td>\n",
" <td>0.52970</td>\n",
" <td>0.235400</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.39710</td>\n",
" <td>0.27220</td>\n",
" <td>-0.71820</td>\n",
" <td>0.0286</td>\n",
" <td>-0.662300</td>\n",
" <td>0.7182</td>\n",
" <td>-0.196200</td>\n",
" <td>0.77020</td>\n",
" <td>0.34130</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.71820</td>\n",
" <td>0.54900</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>0.7702</td>\n",
" <td>0.77020</td>\n",
" <td>-0.225800</td>\n",
" <td>0.77020</td>\n",
" <td>0.601800</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.30120</td>\n",
" <td>-0.20750</td>\n",
" <td>-1.00000</td>\n",
" <td>0.3844</td>\n",
" <td>-0.572200</td>\n",
" <td>0.5639</td>\n",
" <td>0.068270</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.71820</td>\n",
" <td>0.71820</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>0.7702</td>\n",
" <td>0.77020</td>\n",
" <td>-0.613800</td>\n",
" <td>0.77020</td>\n",
" <td>0.718200</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.27910</td>\n",
" <td>-0.51840</td>\n",
" <td>-1.00000</td>\n",
" <td>0.5639</td>\n",
" <td>-0.494100</td>\n",
" <td>0.2156</td>\n",
" <td>0.470000</td>\n",
" <td>0.77020</td>\n",
" <td>0.51840</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>0.7702</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.39060</td>\n",
" <td>-0.34130</td>\n",
" <td>-1.00000</td>\n",
" <td>0.6275</td>\n",
" <td>-0.399400</td>\n",
" <td>0.1576</td>\n",
" <td>0.770200</td>\n",
" <td>0.71820</td>\n",
" <td>0.71820</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>0.71820</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>0.7702</td>\n",
" <td>0.71820</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>0.770200</td>\n",
" <td>-1.00000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.61380</td>\n",
" <td>-0.57220</td>\n",
" <td>-0.71820</td>\n",
" <td>0.7182</td>\n",
" <td>-0.462800</td>\n",
" <td>0.1345</td>\n",
" <td>0.770200</td>\n",
" <td>0.68600</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>0.7702</td>\n",
" <td>0.62750</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>0.770200</td>\n",
" <td>-0.66230</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.71820</td>\n",
" <td>-0.36330</td>\n",
" <td>0.7702</td>\n",
" <td>-0.423700</td>\n",
" <td>-0.3335</td>\n",
" <td>0.770200</td>\n",
" <td>0.58120</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>0.7702</td>\n",
" <td>0.52400</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>0.354500</td>\n",
" <td>-0.47750</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.68600</td>\n",
" <td>-0.39710</td>\n",
" <td>0.7702</td>\n",
" <td>-0.310500</td>\n",
" <td>-0.6138</td>\n",
" <td>0.770200</td>\n",
" <td>0.57220</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>0.7702</td>\n",
" <td>0.44040</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>0.001568</td>\n",
" <td>-0.24130</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.66230</td>\n",
" <td>-0.32020</td>\n",
" <td>0.7702</td>\n",
" <td>-0.397100</td>\n",
" <td>-0.5562</td>\n",
" <td>0.770200</td>\n",
" <td>0.51840</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>0.7702</td>\n",
" <td>0.57220</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.202300</td>\n",
" <td>-0.08404</td>\n",
" <td>-1.00000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.71820</td>\n",
" <td>-0.27790</td>\n",
" <td>0.7702</td>\n",
" <td>-0.418500</td>\n",
" <td>-0.5562</td>\n",
" <td>0.770200</td>\n",
" <td>0.52400</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>0.7702</td>\n",
" <td>0.64330</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.240300</td>\n",
" <td>0.21290</td>\n",
" <td>-1.00000</td>\n",
" <td>0.71820</td>\n",
" <td>-0.77020</td>\n",
" <td>-0.27440</td>\n",
" <td>0.7702</td>\n",
" <td>-0.440400</td>\n",
" <td>-0.5358</td>\n",
" <td>0.513200</td>\n",
" <td>0.51840</td>\n",
" <td>0.77020</td>\n",
" <td>-0.770200</td>\n",
" <td>-0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>0.7702</td>\n",
" <td>0.71820</td>\n",
" <td>-1.000000</td>\n",
" <td>0.45940</td>\n",
" <td>-0.181200</td>\n",
" <td>0.31880</td>\n",
" <td>-1.00000</td>\n",
" <td>0.64330</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.25890</td>\n",
" <td>0.7702</td>\n",
" <td>-0.470000</td>\n",
" <td>-0.4628</td>\n",
" <td>0.215600</td>\n",
" <td>0.52970</td>\n",
" <td>0.77020</td>\n",
" <td>-0.627500</td>\n",
" <td>-0.62750</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>0.7702</td>\n",
" <td>0.71820</td>\n",
" <td>-1.000000</td>\n",
" <td>0.44640</td>\n",
" <td>0.001568</td>\n",
" <td>0.48560</td>\n",
" <td>-0.34290</td>\n",
" <td>0.50330</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.26540</td>\n",
" <td>0.7702</td>\n",
" <td>-0.408600</td>\n",
" <td>-0.4404</td>\n",
" <td>0.281400</td>\n",
" <td>0.52970</td>\n",
" <td>0.77020</td>\n",
" <td>-0.556200</td>\n",
" <td>-0.44960</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>0.6623</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>0.27790</td>\n",
" <td>0.247400</td>\n",
" <td>0.61380</td>\n",
" <td>0.19200</td>\n",
" <td>0.45280</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.27220</td>\n",
" <td>0.7702</td>\n",
" <td>0.095410</td>\n",
" <td>-0.4159</td>\n",
" <td>0.288600</td>\n",
" <td>0.54900</td>\n",
" <td>0.77020</td>\n",
" <td>-0.462800</td>\n",
" <td>0.12230</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>0.2622</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>0.12230</td>\n",
" <td>0.374400</td>\n",
" <td>0.71820</td>\n",
" <td>0.47000</td>\n",
" <td>0.43750</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.27910</td>\n",
" <td>0.7702</td>\n",
" <td>0.301200</td>\n",
" <td>-0.4290</td>\n",
" <td>0.271000</td>\n",
" <td>0.55620</td>\n",
" <td>0.77020</td>\n",
" <td>-0.388500</td>\n",
" <td>0.19120</td>\n",
" <td>0.71820</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>0.2464</td>\n",
" <td>0.77020</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.09138</td>\n",
" <td>0.485600</td>\n",
" <td>0.77020</td>\n",
" <td>0.71820</td>\n",
" <td>0.41590</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.27790</td>\n",
" <td>0.7702</td>\n",
" <td>0.770200</td>\n",
" <td>-0.3928</td>\n",
" <td>0.251500</td>\n",
" <td>0.57220</td>\n",
" <td>0.77020</td>\n",
" <td>-0.297300</td>\n",
" <td>0.08537</td>\n",
" <td>0.71820</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>-0.2239</td>\n",
" <td>0.66230</td>\n",
" <td>-1.000000</td>\n",
" <td>-0.14330</td>\n",
" <td>0.415900</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.37640</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.24950</td>\n",
" <td>0.7702</td>\n",
" <td>0.770200</td>\n",
" <td>-0.4404</td>\n",
" <td>0.216500</td>\n",
" <td>0.56390</td>\n",
" <td>0.77020</td>\n",
" <td>-0.072840</td>\n",
" <td>0.29360</td>\n",
" <td>0.57220</td>\n",
" <td>0.77020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>-0.3494</td>\n",
" <td>0.56390</td>\n",
" <td>-0.718200</td>\n",
" <td>-0.26110</td>\n",
" <td>0.277900</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.36880</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.27670</td>\n",
" <td>0.4496</td>\n",
" <td>0.770200</td>\n",
" <td>-0.5132</td>\n",
" <td>0.135900</td>\n",
" <td>0.55620</td>\n",
" <td>0.44040</td>\n",
" <td>-0.036830</td>\n",
" <td>0.40160</td>\n",
" <td>0.28860</td>\n",
" <td>0.68600</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>-0.7702</td>\n",
" <td>0.33660</td>\n",
" <td>-0.643300</td>\n",
" <td>-0.29480</td>\n",
" <td>-0.048920</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.33350</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.28140</td>\n",
" <td>-0.1522</td>\n",
" <td>0.770200</td>\n",
" <td>-0.5722</td>\n",
" <td>0.159100</td>\n",
" <td>0.51320</td>\n",
" <td>0.51840</td>\n",
" <td>-0.024820</td>\n",
" <td>0.38440</td>\n",
" <td>0.31320</td>\n",
" <td>0.50330</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31</th>\n",
" <td>-1.0000</td>\n",
" <td>0.36150</td>\n",
" <td>-0.459400</td>\n",
" <td>-0.31880</td>\n",
" <td>-0.202300</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.33500</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.25570</td>\n",
" <td>-0.4775</td>\n",
" <td>0.718200</td>\n",
" <td>-0.7182</td>\n",
" <td>-0.072840</td>\n",
" <td>0.43750</td>\n",
" <td>0.46640</td>\n",
" <td>0.005959</td>\n",
" <td>0.39280</td>\n",
" <td>-0.46280</td>\n",
" <td>0.52970</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>-1.0000</td>\n",
" <td>0.20750</td>\n",
" <td>-0.386400</td>\n",
" <td>-0.37060</td>\n",
" <td>-0.542200</td>\n",
" <td>0.77020</td>\n",
" <td>0.77020</td>\n",
" <td>0.33660</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.17480</td>\n",
" <td>-0.1553</td>\n",
" <td>0.426300</td>\n",
" <td>-1.0000</td>\n",
" <td>-0.021040</td>\n",
" <td>0.30250</td>\n",
" <td>0.39280</td>\n",
" <td>0.060490</td>\n",
" <td>0.44040</td>\n",
" <td>-0.77020</td>\n",
" <td>0.57220</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33</th>\n",
" <td>-1.0000</td>\n",
" <td>0.08073</td>\n",
" <td>-0.170800</td>\n",
" <td>-0.37640</td>\n",
" <td>-0.591000</td>\n",
" <td>0.77020</td>\n",
" <td>0.55620</td>\n",
" <td>0.30910</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.05662</td>\n",
" <td>0.1862</td>\n",
" <td>0.485600</td>\n",
" <td>-1.0000</td>\n",
" <td>0.005332</td>\n",
" <td>0.29230</td>\n",
" <td>0.30780</td>\n",
" <td>0.429000</td>\n",
" <td>0.46280</td>\n",
" <td>-0.42900</td>\n",
" <td>0.62750</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34</th>\n",
" <td>-1.0000</td>\n",
" <td>0.09947</td>\n",
" <td>-0.007214</td>\n",
" <td>-0.38030</td>\n",
" <td>-0.718200</td>\n",
" <td>0.77020</td>\n",
" <td>0.05598</td>\n",
" <td>0.27440</td>\n",
" <td>-1.00000</td>\n",
" <td>0.01915</td>\n",
" <td>0.3949</td>\n",
" <td>0.542200</td>\n",
" <td>-1.0000</td>\n",
" <td>0.040640</td>\n",
" <td>0.07349</td>\n",
" <td>0.25790</td>\n",
" <td>0.627500</td>\n",
" <td>0.64330</td>\n",
" <td>-0.71820</td>\n",
" <td>0.66230</td>\n",
" </tr>\n",
" <tr>\n",
" <th>35</th>\n",
" <td>-1.0000</td>\n",
" <td>-0.25360</td>\n",
" <td>0.120200</td>\n",
" <td>-0.38030</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.44340</td>\n",
" <td>0.27330</td>\n",
" <td>-0.77020</td>\n",
" <td>0.08404</td>\n",
" <td>0.4496</td>\n",
" <td>0.503300</td>\n",
" <td>-1.0000</td>\n",
" <td>0.065020</td>\n",
" <td>-0.21740</td>\n",
" <td>0.14180</td>\n",
" <td>0.770200</td>\n",
" <td>0.60180</td>\n",
" <td>-0.64330</td>\n",
" <td>0.53580</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36</th>\n",
" <td>-1.0000</td>\n",
" <td>-0.21200</td>\n",
" <td>0.293600</td>\n",
" <td>-0.38030</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.44960</td>\n",
" <td>0.26430</td>\n",
" <td>-0.77020</td>\n",
" <td>0.11600</td>\n",
" <td>0.4664</td>\n",
" <td>0.462800</td>\n",
" <td>-1.0000</td>\n",
" <td>0.127300</td>\n",
" <td>-0.50810</td>\n",
" <td>0.07809</td>\n",
" <td>0.770200</td>\n",
" <td>0.71820</td>\n",
" <td>-0.57220</td>\n",
" <td>0.45280</td>\n",
" </tr>\n",
" <tr>\n",
" <th>37</th>\n",
" <td>-1.0000</td>\n",
" <td>-0.29360</td>\n",
" <td>0.317400</td>\n",
" <td>-0.39060</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.64330</td>\n",
" <td>0.24740</td>\n",
" <td>-0.77020</td>\n",
" <td>0.14620</td>\n",
" <td>0.5184</td>\n",
" <td>0.459400</td>\n",
" <td>-1.0000</td>\n",
" <td>-0.032390</td>\n",
" <td>-1.00000</td>\n",
" <td>0.04701</td>\n",
" <td>0.770200</td>\n",
" <td>0.77020</td>\n",
" <td>-0.77020</td>\n",
" <td>0.29860</td>\n",
" </tr>\n",
" <tr>\n",
" <th>38</th>\n",
" <td>-1.0000</td>\n",
" <td>-0.36690</td>\n",
" <td>0.318800</td>\n",
" <td>-0.39280</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.62750</td>\n",
" <td>0.22300</td>\n",
" <td>-0.77020</td>\n",
" <td>0.08205</td>\n",
" <td>0.1029</td>\n",
" <td>-0.002195</td>\n",
" <td>-1.0000</td>\n",
" <td>-0.129400</td>\n",
" <td>-0.77020</td>\n",
" <td>-0.03239</td>\n",
" <td>0.770200</td>\n",
" <td>0.77020</td>\n",
" <td>-1.00000</td>\n",
" <td>0.15000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>39</th>\n",
" <td>-1.0000</td>\n",
" <td>-0.34940</td>\n",
" <td>0.380300</td>\n",
" <td>-0.40160</td>\n",
" <td>-1.000000</td>\n",
" <td>0.77020</td>\n",
" <td>-0.71820</td>\n",
" <td>0.20670</td>\n",
" <td>-0.77020</td>\n",
" <td>0.02419</td>\n",
" <td>-0.4775</td>\n",
" <td>-0.581200</td>\n",
" <td>-1.0000</td>\n",
" <td>-0.118800</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.01224</td>\n",
" <td>0.770200</td>\n",
" <td>0.77020</td>\n",
" <td>-1.00000</td>\n",
" <td>-0.05020</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0 1 2 3 4 5 6 7 \\\n",
"0 -1.0000 -1.00000 0.770200 -1.00000 0.770200 0.66230 -0.37440 -0.15070 \n",
"1 -1.0000 -1.00000 0.770200 -1.00000 0.686000 0.48980 -0.54220 0.51840 \n",
"2 -0.7182 -1.00000 0.770200 -1.00000 0.513200 0.18950 -0.68600 0.55620 \n",
"3 -0.7182 -0.77020 0.770200 -1.00000 0.222100 -0.07941 -0.77020 0.57220 \n",
"4 -0.6623 -0.47750 0.770200 -1.00000 -0.210200 -0.35970 -1.00000 -1.00000 \n",
"5 -0.2886 -0.71820 0.770200 -0.77020 -0.010980 -0.44960 -1.00000 0.68600 \n",
"6 -0.1266 -0.37440 0.770200 -1.00000 0.180400 -0.60180 -1.00000 0.03936 \n",
"7 0.1614 -0.04573 0.662300 -0.77020 0.302500 -0.71820 -1.00000 -0.09406 \n",
"8 0.4941 0.24950 0.386400 -0.62750 -0.036190 -0.77020 -1.00000 0.11460 \n",
"9 0.5081 0.54220 0.179600 -0.27560 -0.513200 -1.00000 -1.00000 0.45600 \n",
"10 0.6018 0.44340 0.001568 -0.27910 -0.494100 -1.00000 -1.00000 0.71820 \n",
"11 0.6623 0.37830 -0.198800 -0.02671 -0.518400 -1.00000 -1.00000 0.77020 \n",
"12 0.7702 0.66230 -0.408600 0.17800 -0.326000 -1.00000 -1.00000 0.64330 \n",
"13 0.7702 0.77020 -0.294800 0.52970 0.235400 -1.00000 -1.00000 0.39710 \n",
"14 0.7702 0.77020 -0.225800 0.77020 0.601800 -1.00000 -1.00000 0.30120 \n",
"15 0.7702 0.77020 -0.613800 0.77020 0.718200 -1.00000 -1.00000 0.27910 \n",
"16 0.7702 0.77020 -1.000000 0.77020 0.770200 -1.00000 -1.00000 0.39060 \n",
"17 0.7702 0.71820 -1.000000 0.77020 0.770200 -1.00000 -1.00000 0.61380 \n",
"18 0.7702 0.62750 -1.000000 0.77020 0.770200 -0.66230 -1.00000 0.77020 \n",
"19 0.7702 0.52400 -1.000000 0.77020 0.354500 -0.47750 -1.00000 0.77020 \n",
"20 0.7702 0.44040 -1.000000 0.77020 0.001568 -0.24130 -1.00000 0.77020 \n",
"21 0.7702 0.57220 -1.000000 0.77020 -0.202300 -0.08404 -1.00000 0.77020 \n",
"22 0.7702 0.64330 -1.000000 0.77020 -0.240300 0.21290 -1.00000 0.71820 \n",
"23 0.7702 0.71820 -1.000000 0.45940 -0.181200 0.31880 -1.00000 0.64330 \n",
"24 0.7702 0.71820 -1.000000 0.44640 0.001568 0.48560 -0.34290 0.50330 \n",
"25 0.6623 0.77020 -1.000000 0.27790 0.247400 0.61380 0.19200 0.45280 \n",
"26 0.2622 0.77020 -1.000000 0.12230 0.374400 0.71820 0.47000 0.43750 \n",
"27 0.2464 0.77020 -1.000000 -0.09138 0.485600 0.77020 0.71820 0.41590 \n",
"28 -0.2239 0.66230 -1.000000 -0.14330 0.415900 0.77020 0.77020 0.37640 \n",
"29 -0.3494 0.56390 -0.718200 -0.26110 0.277900 0.77020 0.77020 0.36880 \n",
"30 -0.7702 0.33660 -0.643300 -0.29480 -0.048920 0.77020 0.77020 0.33350 \n",
"31 -1.0000 0.36150 -0.459400 -0.31880 -0.202300 0.77020 0.77020 0.33500 \n",
"32 -1.0000 0.20750 -0.386400 -0.37060 -0.542200 0.77020 0.77020 0.33660 \n",
"33 -1.0000 0.08073 -0.170800 -0.37640 -0.591000 0.77020 0.55620 0.30910 \n",
"34 -1.0000 0.09947 -0.007214 -0.38030 -0.718200 0.77020 0.05598 0.27440 \n",
"35 -1.0000 -0.25360 0.120200 -0.38030 -1.000000 0.77020 -0.44340 0.27330 \n",
"36 -1.0000 -0.21200 0.293600 -0.38030 -1.000000 0.77020 -0.44960 0.26430 \n",
"37 -1.0000 -0.29360 0.317400 -0.39060 -1.000000 0.77020 -0.64330 0.24740 \n",
"38 -1.0000 -0.36690 0.318800 -0.39280 -1.000000 0.77020 -0.62750 0.22300 \n",
"39 -1.0000 -0.34940 0.380300 -0.40160 -1.000000 0.77020 -0.71820 0.20670 \n",
"\n",
" 8 9 10 11 12 13 14 15 \\\n",
"0 0.77020 0.77020 0.7702 0.423700 0.6860 -0.549000 -1.00000 -1.00000 \n",
"1 0.77020 0.77020 0.7702 0.415900 0.7182 -0.718200 -1.00000 -1.00000 \n",
"2 0.77020 0.77020 0.5358 -0.131600 0.7182 -1.000000 -0.77020 -1.00000 \n",
"3 0.77020 0.77020 -0.1530 -0.246400 0.7182 -1.000000 -0.77020 -1.00000 \n",
"4 0.77020 0.77020 -0.6275 -0.535800 0.7702 -1.000000 -0.52400 -1.00000 \n",
"5 0.77020 0.71820 -0.7182 -0.503300 0.7702 -1.000000 -0.27670 -0.71820 \n",
"6 0.77020 0.60180 -1.0000 -1.000000 0.7702 -1.000000 0.07677 -0.64330 \n",
"7 0.77020 0.64330 -1.0000 -1.000000 0.7702 -1.000000 0.48980 -0.51840 \n",
"8 0.77020 0.66230 -0.6275 -1.000000 0.7702 -1.000000 0.77020 -0.41350 \n",
"9 0.77020 0.64330 -0.1008 -1.000000 0.7702 -1.000000 0.77020 -0.35110 \n",
"10 0.71820 0.52400 0.1188 -1.000000 0.7702 -1.000000 0.77020 -0.26110 \n",
"11 0.56390 0.32600 0.3949 -0.686000 0.7702 -1.000000 0.77020 -0.15070 \n",
"12 0.07415 -0.25260 0.2165 -1.000000 0.7702 -0.382300 0.77020 0.15530 \n",
"13 0.27220 -0.71820 0.0286 -0.662300 0.7182 -0.196200 0.77020 0.34130 \n",
"14 -0.20750 -1.00000 0.3844 -0.572200 0.5639 0.068270 0.77020 0.77020 \n",
"15 -0.51840 -1.00000 0.5639 -0.494100 0.2156 0.470000 0.77020 0.51840 \n",
"16 -0.34130 -1.00000 0.6275 -0.399400 0.1576 0.770200 0.71820 0.71820 \n",
"17 -0.57220 -0.71820 0.7182 -0.462800 0.1345 0.770200 0.68600 0.77020 \n",
"18 -0.71820 -0.36330 0.7702 -0.423700 -0.3335 0.770200 0.58120 0.77020 \n",
"19 -0.68600 -0.39710 0.7702 -0.310500 -0.6138 0.770200 0.57220 0.77020 \n",
"20 -0.66230 -0.32020 0.7702 -0.397100 -0.5562 0.770200 0.51840 0.77020 \n",
"21 -0.71820 -0.27790 0.7702 -0.418500 -0.5562 0.770200 0.52400 0.77020 \n",
"22 -0.77020 -0.27440 0.7702 -0.440400 -0.5358 0.513200 0.51840 0.77020 \n",
"23 -1.00000 -0.25890 0.7702 -0.470000 -0.4628 0.215600 0.52970 0.77020 \n",
"24 -1.00000 -0.26540 0.7702 -0.408600 -0.4404 0.281400 0.52970 0.77020 \n",
"25 -1.00000 -0.27220 0.7702 0.095410 -0.4159 0.288600 0.54900 0.77020 \n",
"26 -1.00000 -0.27910 0.7702 0.301200 -0.4290 0.271000 0.55620 0.77020 \n",
"27 -1.00000 -0.27790 0.7702 0.770200 -0.3928 0.251500 0.57220 0.77020 \n",
"28 -1.00000 -0.24950 0.7702 0.770200 -0.4404 0.216500 0.56390 0.77020 \n",
"29 -1.00000 -0.27670 0.4496 0.770200 -0.5132 0.135900 0.55620 0.44040 \n",
"30 -1.00000 -0.28140 -0.1522 0.770200 -0.5722 0.159100 0.51320 0.51840 \n",
"31 -1.00000 -0.25570 -0.4775 0.718200 -0.7182 -0.072840 0.43750 0.46640 \n",
"32 -1.00000 -0.17480 -0.1553 0.426300 -1.0000 -0.021040 0.30250 0.39280 \n",
"33 -1.00000 -0.05662 0.1862 0.485600 -1.0000 0.005332 0.29230 0.30780 \n",
"34 -1.00000 0.01915 0.3949 0.542200 -1.0000 0.040640 0.07349 0.25790 \n",
"35 -0.77020 0.08404 0.4496 0.503300 -1.0000 0.065020 -0.21740 0.14180 \n",
"36 -0.77020 0.11600 0.4664 0.462800 -1.0000 0.127300 -0.50810 0.07809 \n",
"37 -0.77020 0.14620 0.5184 0.459400 -1.0000 -0.032390 -1.00000 0.04701 \n",
"38 -0.77020 0.08205 0.1029 -0.002195 -1.0000 -0.129400 -0.77020 -0.03239 \n",
"39 -0.77020 0.02419 -0.4775 -0.581200 -1.0000 -0.118800 -1.00000 -0.01224 \n",
"\n",
" 16 17 18 19 \n",
"0 0.718200 0.77020 -1.00000 -1.00000 \n",
"1 0.718200 0.68600 -1.00000 -1.00000 \n",
"2 0.686000 0.66230 -0.71820 -1.00000 \n",
"3 0.643300 0.24230 -0.35970 -1.00000 \n",
"4 0.627500 0.22210 -0.17000 -1.00000 \n",
"5 0.627500 0.28620 -0.05148 -0.48980 \n",
"6 0.041910 -0.19030 0.29480 -0.53580 \n",
"7 -0.303800 -0.57220 0.14400 -0.39490 \n",
"8 -0.643300 -0.71820 0.47750 -0.16840 \n",
"9 -0.770200 -0.77020 0.61380 -0.01601 \n",
"10 -1.000000 -1.00000 0.66230 -0.05212 \n",
"11 -1.000000 -1.00000 0.71820 -0.07809 \n",
"12 -1.000000 -1.00000 0.71820 0.52400 \n",
"13 -1.000000 -1.00000 0.71820 0.54900 \n",
"14 -1.000000 -1.00000 0.71820 0.71820 \n",
"15 -1.000000 -1.00000 0.77020 0.77020 \n",
"16 -1.000000 -0.77020 0.71820 0.77020 \n",
"17 -1.000000 -0.77020 0.77020 0.77020 \n",
"18 -1.000000 -0.77020 0.77020 0.77020 \n",
"19 -1.000000 -1.00000 0.77020 0.77020 \n",
"20 -1.000000 -0.77020 0.77020 0.77020 \n",
"21 -1.000000 -0.77020 0.77020 0.77020 \n",
"22 -0.770200 -0.77020 0.77020 0.77020 \n",
"23 -0.627500 -0.62750 0.77020 0.77020 \n",
"24 -0.556200 -0.44960 0.77020 0.77020 \n",
"25 -0.462800 0.12230 0.77020 0.77020 \n",
"26 -0.388500 0.19120 0.71820 0.77020 \n",
"27 -0.297300 0.08537 0.71820 0.77020 \n",
"28 -0.072840 0.29360 0.57220 0.77020 \n",
"29 -0.036830 0.40160 0.28860 0.68600 \n",
"30 -0.024820 0.38440 0.31320 0.50330 \n",
"31 0.005959 0.39280 -0.46280 0.52970 \n",
"32 0.060490 0.44040 -0.77020 0.57220 \n",
"33 0.429000 0.46280 -0.42900 0.62750 \n",
"34 0.627500 0.64330 -0.71820 0.66230 \n",
"35 0.770200 0.60180 -0.64330 0.53580 \n",
"36 0.770200 0.71820 -0.57220 0.45280 \n",
"37 0.770200 0.77020 -0.77020 0.29860 \n",
"38 0.770200 0.77020 -1.00000 0.15000 \n",
"39 0.770200 0.77020 -1.00000 -0.05020 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"def generate_words(col, w, s):\n",
" word = []\n",
" idx = 0\n",
" distance = abs(w-s)\n",
" while idx < len(col):\n",
" if len(word) == w:\n",
" yield word\n",
" word = []\n",
" if w < s and idx == w:\n",
" idx += distance\n",
" if w > s:\n",
" idx -= distance \n",
" else:\n",
" word.append(col[idx])\n",
" idx+=1"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[-1.0, -1.0, -0.7182], [-0.2886, -0.1266, 0.1614], [0.4941, 0.5081, 0.6018], [0.6623, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.6623], [0.2622, 0.2464, -0.2239], [-0.3494, -0.7702, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0]]\n",
"[[-1.0, -1.0, -1.0], [-0.7182, -0.3744, -0.04573], [0.2495, 0.5422, 0.4434], [0.3783, 0.6623, 0.7702], [0.7702, 0.7702, 0.7702], [0.7182, 0.6275, 0.524], [0.4404, 0.5722, 0.6433], [0.7182, 0.7182, 0.7702], [0.7702, 0.7702, 0.6623], [0.5639, 0.3366, 0.3615], [0.2075, 0.08073, 0.09947], [-0.2536, -0.212, -0.2936]]\n",
"[[0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.6623], [0.3864, 0.1796, 0.001568], [-0.1988, -0.4086, -0.2948], [-0.2258, -0.6138, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-0.7182, -0.6433, -0.4594], [-0.3864, -0.1708, -0.007214], [0.1202, 0.2936, 0.3174]]\n",
"[[-1.0, -1.0, -1.0], [-0.7702, -1.0, -0.7702], [-0.6275, -0.2756, -0.2791], [-0.02671, 0.178, 0.5297], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.4594, 0.4464, 0.2779], [0.1223, -0.09138, -0.1433], [-0.2611, -0.2948, -0.3188], [-0.3706, -0.3764, -0.3803], [-0.3803, -0.3803, -0.3906]]\n",
"[[0.7702, 0.686, 0.5132], [-0.01098, 0.1804, 0.3025], [-0.03619, -0.5132, -0.4941], [-0.5184, -0.326, 0.2354], [0.6018, 0.7182, 0.7702], [0.7702, 0.7702, 0.3545], [0.001568, -0.2023, -0.2403], [-0.1812, 0.001568, 0.2474], [0.3744, 0.4856, 0.4159], [0.2779, -0.04892, -0.2023], [-0.5422, -0.591, -0.7182], [-1.0, -1.0, -1.0]]\n",
"[[0.6623, 0.4898, 0.1895], [-0.4496, -0.6018, -0.7182], [-0.7702, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -0.6623, -0.4775], [-0.2413, -0.08404, 0.2129], [0.3188, 0.4856, 0.6138], [0.7182, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702]]\n",
"[[-0.3744, -0.5422, -0.686], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -0.3429, 0.192], [0.47, 0.7182, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.5562, 0.05598], [-0.4434, -0.4496, -0.6433]]\n",
"[[-0.1507, 0.5184, 0.5562], [0.686, 0.03936, -0.09406], [0.1146, 0.456, 0.7182], [0.7702, 0.6433, 0.3971], [0.3012, 0.2791, 0.3906], [0.6138, 0.7702, 0.7702], [0.7702, 0.7702, 0.7182], [0.6433, 0.5033, 0.4528], [0.4375, 0.4159, 0.3764], [0.3688, 0.3335, 0.335], [0.3366, 0.3091, 0.2744], [0.2733, 0.2643, 0.2474]]\n",
"[[0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7182], [0.5639, 0.07415, 0.2722], [-0.2075, -0.5184, -0.3413], [-0.5722, -0.7182, -0.686], [-0.6623, -0.7182, -0.7702], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-0.7702, -0.7702, -0.7702]]\n",
"[[0.7702, 0.7702, 0.7702], [0.7182, 0.6018, 0.6433], [0.6623, 0.6433, 0.524], [0.326, -0.2526, -0.7182], [-1.0, -1.0, -1.0], [-0.7182, -0.3633, -0.3971], [-0.3202, -0.2779, -0.2744], [-0.2589, -0.2654, -0.2722], [-0.2791, -0.2779, -0.2495], [-0.2767, -0.2814, -0.2557], [-0.1748, -0.05662, 0.01915], [0.08404, 0.116, 0.1462]]\n",
"[[0.7702, 0.7702, 0.5358], [-0.7182, -1.0, -1.0], [-0.6275, -0.1008, 0.1188], [0.3949, 0.2165, 0.0286], [0.3844, 0.5639, 0.6275], [0.7182, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.4496, -0.1522, -0.4775], [-0.1553, 0.1862, 0.3949], [0.4496, 0.4664, 0.5184]]\n",
"[[0.4237, 0.4159, -0.1316], [-0.5033, -1.0, -1.0], [-1.0, -1.0, -1.0], [-0.686, -1.0, -0.6623], [-0.5722, -0.4941, -0.3994], [-0.4628, -0.4237, -0.3105], [-0.3971, -0.4185, -0.4404], [-0.47, -0.4086, 0.09541], [0.3012, 0.7702, 0.7702], [0.7702, 0.7702, 0.7182], [0.4263, 0.4856, 0.5422], [0.5033, 0.4628, 0.4594]]\n",
"[[0.686, 0.7182, 0.7182], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7182], [0.5639, 0.2156, 0.1576], [0.1345, -0.3335, -0.6138], [-0.5562, -0.5562, -0.5358], [-0.4628, -0.4404, -0.4159], [-0.429, -0.3928, -0.4404], [-0.5132, -0.5722, -0.7182], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0]]\n",
"[[-0.549, -0.7182, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -0.3823, -0.1962], [0.06827, 0.47, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.5132], [0.2156, 0.2814, 0.2886], [0.271, 0.2515, 0.2165], [0.1359, 0.1591, -0.07284], [-0.02104, 0.005332, 0.04064], [0.06502, 0.1273, -0.03239]]\n",
"[[-1.0, -1.0, -0.7702], [-0.2767, 0.07677, 0.4898], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7182], [0.686, 0.5812, 0.5722], [0.5184, 0.524, 0.5184], [0.5297, 0.5297, 0.549], [0.5562, 0.5722, 0.5639], [0.5562, 0.5132, 0.4375], [0.3025, 0.2923, 0.07349], [-0.2174, -0.5081, -1.0]]\n",
"[[-1.0, -1.0, -1.0], [-0.7182, -0.6433, -0.5184], [-0.4135, -0.3511, -0.2611], [-0.1507, 0.1553, 0.3413], [0.7702, 0.5184, 0.7182], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.4404, 0.5184, 0.4664], [0.3928, 0.3078, 0.2579], [0.1418, 0.07809, 0.04701]]\n",
"[[0.7182, 0.7182, 0.686], [0.6275, 0.04191, -0.3038], [-0.6433, -0.7702, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -0.7702], [-0.6275, -0.5562, -0.4628], [-0.3885, -0.2973, -0.07284], [-0.03683, -0.02482, 0.005959], [0.06049, 0.429, 0.6275], [0.7702, 0.7702, 0.7702]]\n",
"[[0.7702, 0.686, 0.6623], [0.2862, -0.1903, -0.5722], [-0.7182, -0.7702, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, -0.7702], [-0.7702, -0.7702, -1.0], [-0.7702, -0.7702, -0.7702], [-0.6275, -0.4496, 0.1223], [0.1912, 0.08537, 0.2936], [0.4016, 0.3844, 0.3928], [0.4404, 0.4628, 0.6433], [0.6018, 0.7182, 0.7702]]\n",
"[[-1.0, -1.0, -0.7182], [-0.05148, 0.2948, 0.144], [0.4775, 0.6138, 0.6623], [0.7182, 0.7182, 0.7182], [0.7182, 0.7702, 0.7182], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7182, 0.7182, 0.5722], [0.2886, 0.3132, -0.4628], [-0.7702, -0.429, -0.7182], [-0.6433, -0.5722, -0.7702]]\n",
"[[-1.0, -1.0, -1.0], [-0.4898, -0.5358, -0.3949], [-0.1684, -0.01601, -0.05212], [-0.07809, 0.524, 0.549], [0.7182, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.7702, 0.7702, 0.7702], [0.686, 0.5033, 0.5297], [0.5722, 0.6275, 0.6623], [0.5358, 0.4528, 0.2986]]\n"
]
}
],
"source": [
"for _,col in df.iteritems():\n",
" print(list(generate_words(col, 3, 5)))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}