Graph_And_analysis.ipynb 1.66 MB
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"import pandas\n",
"import shelve\n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import itertools\n",
"import glob\n",
"from sklearn.metrics import precision_recall_fscore_support\n",
"import utils\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 5,
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"def show_network_TRANS(scores,zero=10,unite=120,tailleu=100,title=\"Transform NEwtork\"):\n",
"    plt.figure(figsize=(20,10))\n",
"    plt.axes()\n",
"    plt.title(title)\n",
"    #zero=10\n",
"    #unite=200\n",
"    #tailleu=100\n",
"    inside=0\n",
"    rectangle = plt.Rectangle((zero, zero), tailleu, tailleu, fc='b')\n",
"    if \"ASR_SPARSE\" in scores:\n",
"        plt.text(zero+inside,zero+inside,scores[\"ASR_SPARSE\"],color=\"white\")\n",
"        #plt.text(zero+inside+60,zero+inside,\"0.58\",color=\"red\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H1\" in scores:\n",
"        plt.text(zero+inside,zero+1*unite+inside,scores[\"ASR_AE_H1\"],color=\"white\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+2*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H2\" in scores:\n",
"        plt.text(zero+inside,zero+2*unite+inside,scores[\"ASR_AE_H2\"],color=\"white\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+3*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_OUT\" in scores:\n",
"        plt.text(zero+inside,zero+3*unite+inside,scores[\"ASR_AE_OUT\"],color=\"white\")\n",
" \n",
"    \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero), tailleu, tailleu, fc='y')\n",
"    if \"TRS_SPARSE\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+inside,scores[\"TRS_SPARSE\"],color=\"black\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero+1*unite), tailleu, tailleu, fc='y')\n",
"    if \"TRS_AE_H1\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+1*unite+inside,scores[\"TRS_AE_H1\"],color=\"black\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero+2*unite), tailleu, tailleu, fc='y')\n",
"    if \"TRS_AE_H2\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+2*unite+inside,scores[\"TRS_AE_H2\"],color=\"black\")\n",
"    if \"ASR_H1_TRANFORMED_TRSH2\" in scores:\n",
"        plt.text(zero+3*unite+tailleu/2,zero+2*unite+inside,scores[\"ASR_H1_TRANFORMED_TRSH2\"],color=\"red\")   \n",
"    if \"ASR_H2_TRANFORMED_TRSH2\" in scores:\n",
"        plt.text(zero+3*unite-tailleu/2,zero+2*unite+inside,scores[\"ASR_H2_TRANFORMED_TRSH2\"],color=\"green\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero+3*unite), tailleu, tailleu, fc='y')\n",
"    if \"TRS_AE_OUT\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+3*unite+inside,scores[\"TRS_AE_OUT\"],color=\"black\")\n",
"    if \"ASR_H1_TRANFORMED_OUT\" in scores:\n",
"        plt.text(zero+3*unite+tailleu/2,zero+3*unite+inside,scores[\"ASR_H1_TRANFORMED_OUT\"],color=\"red\")\n",
"    if \"ASR_H2_TRANFORMED_OUT\" in scores:\n",
"        plt.text(zero+3*unite-tailleu/2,zero+3*unite+inside,scores[\"ASR_H2_TRANFORMED_OUT\"],color=\"green\")\n",
"\n",
"    rectangle = plt.Rectangle((zero+1*unite, zero+1*unite), tailleu, tailleu, fc='r')\n",
"    if \"ASR_H1_TRANSFORMED_W1\" in scores:\n",
"        plt.text(zero+1*unite+inside,zero+1*unite+inside,scores[\"ASR_H1_TRANSFORMED_W1\"],color=\"black\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+1*unite, zero+2*unite), tailleu, tailleu, fc='green')\n",
"    if \"ASR_H2_TRANSFORMED_W1\" in scores:\n",
"        plt.text(zero+1*unite+inside,zero+2*unite+inside,scores[\"ASR_H2_TRANSFORMED_W1\"],color=\"white\")\n",
" \n",
"\n",
"    rectangle = plt.Rectangle((zero+2*unite, zero+1*unite), tailleu, tailleu, fc='r')\n",
"    if \"ASR_H1_TRANSFORMED_W2\" in scores:\n",
"        plt.text(zero+2*unite+inside,zero+1*unite+inside,scores[\"ASR_H1_TRANSFORMED_W2\"],color=\"black\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+2*unite, zero+2*unite), tailleu, tailleu, fc='green')\n",
"    if \"ASR_H2_TRANSFORMED_W2\" in scores:\n",
"        plt.text(zero+2*unite+inside,zero+2*unite+inside,scores[\"ASR_H2_TRANSFORMED_W2\"],color=\"white\")\n",
"\n",
"    plt.axis('scaled')\n",
"    plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"\n",
"def show_network_RSPE(scores,zero=10,unite=120,tailleu=100,title=\"REAL SPE NEwtork\"):\n",
"    plt.figure(figsize=(20,10))\n",
"    plt.axes()\n",
"    plt.title(title)\n",
"    #zero=10\n",
"    #unite=200\n",
"    #tailleu=100\n",
"    inside=0\n",
"    rectangle = plt.Rectangle((zero, zero), tailleu, tailleu, fc='b')\n",
"    if \"ASR\" in scores:\n",
"        plt.text(zero+inside,zero+inside,scores[\"ASR\"],color=\"white\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H1\" in scores:\n",
"        plt.text(zero+inside,zero+1*unite+inside,scores[\"ASR_AE_H1\"],color=\"white\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+2*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H2\" in scores:\n",
"        plt.text(zero+inside,zero+2*unite+inside,scores[\"ASR_AE_H2\"],color=\"white\")\n",
"    if \"ASR_AEH2_SPARSE\" in scores :\n",
"         plt.text(zero+inside,zero+2*unite+inside,scores[\"ASR_AEH2_SPARSE\"],color=\"white\")\n",
"    rectangle = plt.Rectangle((zero, zero+3*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_OUT\" in scores:\n",
"        plt.text(zero+inside,zero+3*unite+inside,scores[\"ASR_AE_OUT\"],color=\"white\")\n",
"    if \"ASR_AEOUT_SPARSE\" in scores :\n",
"         plt.text(zero+inside,zero+3*unite+inside,scores[\"ASR_AEOUT_SPARSE\"],color=\"white\")\n",
"    \n",
"   \n",
"    plt.axis('scaled')\n",
"    plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"collapsed": true
},
"outputs": [],
"source": [
"#'', '', '', '', '', '', '', '', 'ASR_W1_TRANSFORMED', 'ASR_AE_H1']\n",
"\n",
"def show_network_UNFIXED(scores,zero=10,unite=120,tailleu=100,title=\"Transform NEwtork\"):\n",
"    plt.figure(figsize=(20,10))\n",
"    plt.axes()\n",
"    plt.title(title)\n",
"    #zero=10\n",
"    #unite=200\n",
"    #tailleu=100\n",
"    inside=0\n",
"    rectangle = plt.Rectangle((zero, zero), tailleu, tailleu, fc='b')\n",
"    if \"ASR_SPARSE\" in scores:\n",
"        plt.text(zero+inside,zero+inside,scores[\"ASR_SPARSE\"],color=\"white\")\n",
"        #plt.text(zero+inside+60,zero+inside,\"0.58\",color=\"red\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H1\" in scores:\n",
"        plt.text(zero+inside,zero+1*unite+inside,scores[\"ASR_AE_H1\"],color=\"white\")\n",
"    if \"ASR_H1_TRANSFORMED\" in scores:\n",
"        plt.text(zero+inside+tailleu,zero+1*unite+inside,scores[\"ASR_H1_TRANSFORMED\"],color=\"green\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+2*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_OUT\" in scores:\n",
"        plt.text(zero+inside,zero+2*unite+inside,scores[\"ASR_AE_OUT\"],color=\"white\")\n",
"\n",
"    \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero), tailleu, tailleu, fc='y')\n",
"    if \"TRS_SPARSE\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+inside,scores[\"TRS_SPARSE\"],color=\"black\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero+1*unite), tailleu, tailleu, fc='y')\n",
"    if \"TRS_AE_H1\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+1*unite+inside,scores[\"TRS_AE_H1\"],color=\"black\")\n",
"    if \"ASR_H2_TRANSFORMED\" in scores:\n",
"        plt.text(zero+3*unite+inside-tailleu,zero+1*unite+inside,scores[\"ASR_H2_TRANSFORMED\"],color=\"green\")\n",
" \n",
"    rectangle = plt.Rectangle((zero+3*unite, zero+2*unite), tailleu, tailleu, fc='y')\n",
"    if \"TRS_AE_OUT\" in scores:\n",
"        plt.text(zero+3*unite+inside,zero+2*unite+inside,scores[\"TRS_AE_OUT\"],color=\"black\")\n",
"    if \"ASR_TRANFORMED_OUT\" in scores:\n",
"        plt.text(zero+3*unite+inside-tailleu,zero+2*unite+inside,scores[\"ASR_TRANFORMED_OUT\"],color=\"green\")\n",
" \n",
"\n",
" \n",
"    rectangle = plt.Rectangle((zero+1*unite, zero+1*unite), tailleu, tailleu, fc='green')\n",
"    if \"ASR_W1_TRANSFORMED\" in scores:\n",
"        plt.text(zero+1*unite+inside,zero+1*unite+inside,scores[\"ASR_W1_TRANSFORMED\"],color=\"white\")\n",
"\n",
"\n",
"    plt.axis('scaled')\n",
"    plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"collapsed": true,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [],
"source": [
"#['ASR_H1_TRANFORMED_OUT', 'ASR_H2_TRANFORMED_OUT', 'TRS_AE_OUT', 'TRS_SPARSE', 'ASR_SPARSE']\n",
"def show_network_RAW(scores,zero=10,unite=120,tailleu=100,title=\"RAW NEwtork\"):\n",
"    plt.figure(figsize=(20,10))\n",
"    plt.axes()\n",
"    plt.title(title)\n",
"    #zero=10\n",
"    #unite=200\n",
"    #tailleu=100\n",
"    inside=0\n",
"    rectangle = plt.Rectangle((zero, zero), tailleu, tailleu, fc='b')\n",
"    if \"SPARSE\" in scores:\n",
"        plt.text(zero+inside,zero+inside,scores[\"ASR\"],color=\"white\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H1\" in scores:\n",
"        plt.text(zero+inside,zero+1*unite+inside,scores[\"ASR_AE_H1\"],color=\"white\")\n",
" \n",
"    rectangle = plt.Rectangle((zero, zero+2*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_H2\" in scores:\n",
"        plt.text(zero+inside,zero+2*unite+inside,scores[\"ASR_AE_H2\"],color=\"white\")\n",
"    if \"ASR_AEH2_SPARSE\" in scores :\n",
"         plt.text(zero+inside,zero+2*unite+inside,scores[\"ASR_AEH2_SPARSE\"],color=\"white\")\n",
"    rectangle = plt.Rectangle((zero, zero+3*unite), tailleu, tailleu, fc='b')\n",
"    if \"ASR_AE_OUT\" in scores:\n",
"        plt.text(zero+inside,zero+3*unite+inside,scores[\"ASR_AE_OUT\"],color=\"white\")\n",
"    if \"ASR_AEOUT_SPARSE\" in scores :\n",
"         plt.text(zero+inside,zero+3*unite+inside,scores[\"ASR_AEOUT_SPARSE\"],color=\"white\")\n",
"    \n",
"   \n",
"    plt.axis('scaled')\n",
"    plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 152,
"collapsed": false,
"slideshow": {
"slide_type": "slide"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/DECODA_MINIAE_TANH_H50_DO.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79574b4650>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79605d8dd0>"
]
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/MINIAE_TANH_H100_DO50.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795e212890>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
]
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/MINIAE_TANH_H100_DOmlp.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795c2c7cd0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795eee7510>"
]
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/DECODA_MINIAE_TANH_TFIDF_H30_DO.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f798a54de10>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79601db210>"
]
},
"output_type": "display_data"
}
],
"source": [
"scores_ordoned={}\n",
"for i in glob.glob(\"scores/*DO*.bak\"):\n",
"    #if \"MINIAE\" not in i :\n",
"     #   continue\n",
"    scores={}\n",
"    print i[:-4]\n",
"    data=shelve.open(i[:-4])\n",
"    for key,table in data.iteritems():\n",
"        scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"        if key not in scores_ordoned:\n",
"            scores_ordoned[key]=[scores[key]]\n",
"        else :\n",
"            scores_ordoned[key].append(scores[key])\n",
"            \n",
"    pandas.DataFrame(zip([x[0] for x in data[\"ASR_H1_TRANSFORMED_W1\"][0] ],[x[0] for x in data[\"ASR_H1_TRANSFORMED_W1\"][1] ])).plot()\n",
"    data.close()\n",
"    show_network_TRANS(scores,title=i,unite=200)\n",
"    #except:\n",
"    #    print \"C4EST LA MERDE\",i"
]
},
{
"cell_type": "code",
"execution_count": 153,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7962573290>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795f579890>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795f5793d0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f796883cc50>"
]
},
"output_type": "display_data"
}
],
"source": [
"\n",
"for i in glob.glob(\"real_spe_scores/*DO*.bak\"):\n",
"    scores={}\n",
"    data=shelve.open(i[:-4])\n",
"    for key,table in data.iteritems():\n",
"        scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"    show_network_RSPE(scores,title=i)\n",
"    pandas.DataFrame(zip([x[0] for x in data[\"ASR_AE_H1\"][0] ],[x[0] for x in data[\"ASR_AE_H1\"][1] ])).plot()\n",
"    data.close()"
]
},
{
"cell_type": "code",
"execution_count": 139,
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DECODA_AEUNFIXED_TANH_TFIDF_DO.shelve.bak\r\n",
"DECODA_AEUNFIXED_TANH_TFIDF_DO.shelve.dat\r\n",
"DECODA_AEUNFIXED_TANH_TFIDF_DO.shelve.dir\r\n",
"DECODA_AEUNFIXED_TANH_TFIDF_MODELS.shelve.bak\r\n",
"DECODA_AEUNFIXED_TANH_TFIDF_MODELS.shelve.dat\r\n",
"DECODA_AEUNFIXED_TANH_TFIDF_MODELS.shelve.dir\r\n"
]
}
],
"source": [
"ls UNFIXED_TRANS_scores"
]
},
{
"cell_type": "code",
"execution_count": 154,
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"UNFIXED_TRANS_scores/DECODA_AEUNFIXED_TANH_TFIDF_DO.shelve\n",
"['TRS_AE_H1', 'TRS_AE_OUT', 'TRS_SPARSE', 'ASR_AE_OUT', 'ASR_H2_TRANSFORMED', 'ASR_SPARSE', 'ASR_TRANFORMED_OUT', 'ASR_H1_TRANSFORMED', 'ASR_W1_TRANSFORMED', 'ASR_AE_H1']\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79518de350>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79650b2d50>"
]
},
"output_type": "display_data"
}
],
"source": [
"scores_ordoned={}\n",
"for i in glob.glob(\"UNFIXED_TRANS_scores/*DO*.bak\"):\n",
"    scores={}\n",
"    print i[:-4]\n",
"    data=shelve.open(i[:-4])\n",
"    print data.keys()\n",
"    for key,table in data.iteritems():\n",
"        scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"        if key not in scores_ordoned:\n",
"            scores_ordoned[key]=[scores[key]]\n",
"        else :\n",
"            scores_ordoned[key].append(scores[key])\n",
"            \n",
"    pandas.DataFrame(zip([x[0] for x in data[\"ASR_W1_TRANSFORMED\"][0] ],[x[0] for x in data[\"ASR_W1_TRANSFORMED\"][1] ])).plot()\n",
"    data.close()\n",
"    show_network_UNFIXED(scores,title=i,unite=200)\n",
"    #except:\n",
"    #    print \"C4EST LA MERDE\",i"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"collapsed": false
},
"source": [
"# Ci dessous  Mes tests rien de super interessant"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"pred_train=data[\"TRS_AE_H2\"][2].pred_train\n",
"y_pred_train=np.argmax(pred_train,axis=1)\n",
"\n",
"pred_dev=data[\"TRS_AE_H2\"][2].pred_dev\n",
"y_pred_dev=np.argmax(pred_dev,axis=1)\n",
"\n",
"pred_test=data[\"TRS_AE_H2\"][2].pred_test\n",
"y_pred_test=np.argmax(pred_test,axis=1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"[0,1,2]*3"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": true
},
"outputs": [],
"source": [
"corps=shelve.open(\"models/DECODA_AE_TANH_MINIBIN.shelve\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"y_train=corps[\"LABEL\"][\"TRAIN\"].apply(utils.select).values\n",
"y_dev=corps[\"LABEL\"][\"DEV\"].apply(utils.select).values\n",
"y_test=corps[\"LABEL\"][\"TEST\"].apply(utils.select).values"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"y_pred_train+1"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"y_train"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"precision_recall_fscore_support(y_train,y_pred_train+1,average=\"micro\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"precision_recall_fscore_support(y_dev,y_pred_dev+1,average=\"micro\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"precision_recall_fscore_support(y_test,y_pred_test+1,average=\"micro\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": false
},
"outputs": [],
"source": [
"data=shelve.open(\"scores/DECODA_AE_TANH_MINIBIN.shelve\")\n",
"#data.close()\n",
"data"
]
},
{
"cell_type": "code",
"execution_count": 71,
"collapsed": true
},
"outputs": [],
"source": [
"data=shelve.open(\"./scores/DECODA_MINIAE_TANH.shelve\")"
]
},
{
"cell_type": "code",
"execution_count": 72,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7966f3cb90>"
]
},
"output_type": "display_data"
}
],
"source": [
"scores={}\n",
"#del scores_ordoned\n",
"for key,table in data.iteritems():\n",
"    scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"   # if key not in scores_ordoned:\n",
"   #     scores_ordoned[key]=[scores[key]]\n",
"   # else :\n",
"   #     scores_ordoned[key].append(scores[key])\n",
"#data.close()\n",
"show_network_TRANS(scores,title=i)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"collapsed": false
},
"outputs": [],
"source": [
"data.keys()"
]
},
{
"cell_type": "code",
"execution_count": 73,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f7968041f10>"
]
},
"execution_count": 73,
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7965dfab10>"
]
},
"output_type": "display_data"
}
],
"source": [
"pandas.DataFrame(zip([x[0] for x in data[\"ASR_AE_H1\"][0] ],[x[0] for x in data[\"ASR_AE_H1\"][1] ])).plot()"
]
},
{
"cell_type": "code",
"execution_count": 53,
"collapsed": false
},
"outputs": [],
"source": [
"histo=data[\"ASR_AE_H1\"][3]"
]
},
{
"cell_type": "code",
"execution_count": 69,
"collapsed": false
},
"outputs": [],
"source": [
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 61,
"collapsed": true
},
"outputs": [],
"source": [
"corps=data=shelve.open(\"./models/DECODA_MINIAE_TANH.shelve\")"
]
},
{
"cell_type": "code",
"execution_count": 66,
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\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>...</th>\n",
"      <th>40</th>\n",
"      <th>41</th>\n",
"      <th>42</th>\n",
"      <th>43</th>\n",
"      <th>44</th>\n",
"      <th>45</th>\n",
"      <th>46</th>\n",
"      <th>47</th>\n",
"      <th>48</th>\n",
"      <th>49</th>\n",
"    </tr>\n",
"  <tbody>\n",
"    <tr>\n",
"      <th>count</th>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>...</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"      <td>740.000000</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>mean</th>\n",
"      <td>0.000490</td>\n",
"      <td>0.003229</td>\n",
"      <td>0.000185</td>\n",
"      <td>-0.003558</td>\n",
"      <td>-0.000550</td>\n",
"      <td>0.004855</td>\n",
"      <td>-0.000353</td>\n",
"      <td>-0.004828</td>\n",
"      <td>0.000823</td>\n",
"      <td>-0.004653</td>\n",
"      <td>...</td>\n",
"      <td>-0.002893</td>\n",
"      <td>0.001393</td>\n",
"      <td>0.000034</td>\n",
"      <td>-0.000325</td>\n",
"      <td>-0.000867</td>\n",
"      <td>-0.001082</td>\n",
"      <td>-0.004496</td>\n",
"      <td>-0.005450</td>\n",
"      <td>0.006736</td>\n",
"      <td>0.001526</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>std</th>\n",
"      <td>0.078052</td>\n",
"      <td>0.076671</td>\n",
"      <td>0.080473</td>\n",
"      <td>0.080584</td>\n",
"      <td>0.080445</td>\n",
"      <td>0.083181</td>\n",
"      <td>0.080656</td>\n",
"      <td>0.080346</td>\n",
"      <td>0.078400</td>\n",
"      <td>0.084584</td>\n",
"      <td>...</td>\n",
"      <td>0.075171</td>\n",
"      <td>0.082434</td>\n",
"      <td>0.076875</td>\n",
"      <td>0.078159</td>\n",
"      <td>0.081996</td>\n",
"      <td>0.080196</td>\n",
"      <td>0.084964</td>\n",
"      <td>0.083766</td>\n",
"      <td>0.081879</td>\n",
"      <td>0.081213</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>min</th>\n",
"      <td>-0.222832</td>\n",
"      <td>-0.210684</td>\n",
"      <td>-0.203158</td>\n",
"      <td>-0.220618</td>\n",
"      <td>-0.251787</td>\n",
"      <td>-0.245800</td>\n",
"      <td>-0.319214</td>\n",
"      <td>-0.257791</td>\n",
"      <td>-0.256614</td>\n",
"      <td>-0.269018</td>\n",
"      <td>...</td>\n",
"      <td>-0.205919</td>\n",
"      <td>-0.272927</td>\n",
"      <td>-0.216589</td>\n",
"      <td>-0.232542</td>\n",
"      <td>-0.239660</td>\n",
"      <td>-0.215522</td>\n",
"      <td>-0.237121</td>\n",
"      <td>-0.217695</td>\n",
"      <td>-0.253268</td>\n",
"      <td>-0.216798</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>25%</th>\n",
"      <td>-0.049280</td>\n",
"      <td>-0.051630</td>\n",
"      <td>-0.055798</td>\n",
"      <td>-0.060583</td>\n",
"      <td>-0.053978</td>\n",
"      <td>-0.050834</td>\n",
"      <td>-0.055398</td>\n",
"      <td>-0.058382</td>\n",
"      <td>-0.045658</td>\n",
"      <td>-0.061431</td>\n",
"      <td>...</td>\n",
"      <td>-0.052172</td>\n",
"      <td>-0.051161</td>\n",
"      <td>-0.054269</td>\n",
"      <td>-0.053610</td>\n",
"      <td>-0.054938</td>\n",
"      <td>-0.056238</td>\n",
"      <td>-0.066248</td>\n",
"      <td>-0.068832</td>\n",
"      <td>-0.048655</td>\n",
"      <td>-0.054703</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>50%</th>\n",
"      <td>-0.003148</td>\n",
"      <td>-0.002347</td>\n",
"      <td>0.003714</td>\n",
"      <td>-0.000112</td>\n",
"      <td>-0.003216</td>\n",
"      <td>0.007316</td>\n",
"      <td>-0.000941</td>\n",
"      <td>-0.004883</td>\n",
"      <td>0.007292</td>\n",
"      <td>-0.004308</td>\n",
"      <td>...</td>\n",
"      <td>-0.004255</td>\n",
"      <td>0.000609</td>\n",
"      <td>-0.001102</td>\n",
"      <td>-0.001316</td>\n",
"      <td>-0.002811</td>\n",
"      <td>0.000356</td>\n",
"      <td>-0.000773</td>\n",
"      <td>-0.008352</td>\n",
"      <td>0.006316</td>\n",
"      <td>-0.005236</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>75%</th>\n",
"      <td>0.053316</td>\n",
"      <td>0.051167</td>\n",
"      <td>0.051243</td>\n",
"      <td>0.054151</td>\n",
"      <td>0.044473</td>\n",
"      <td>0.058679</td>\n",
"      <td>0.054497</td>\n",
"      <td>0.044757</td>\n",
"      <td>0.052775</td>\n",
"      <td>0.050786</td>\n",
"      <td>...</td>\n",
"      <td>0.044183</td>\n",
"      <td>0.056505</td>\n",
"      <td>0.054361</td>\n",
"      <td>0.052624</td>\n",
"      <td>0.049942</td>\n",
"      <td>0.053420</td>\n",
"      <td>0.056256</td>\n",
"      <td>0.049547</td>\n",
"      <td>0.060626</td>\n",
"      <td>0.050734</td>\n",
"    </tr>\n",
"    <tr>\n",
"      <th>max</th>\n",
"      <td>0.202271</td>\n",
"      <td>0.241509</td>\n",
"      <td>0.310983</td>\n",
"      <td>0.215986</td>\n",
"      <td>0.279413</td>\n",
"      <td>0.259838</td>\n",
"      <td>0.224492</td>\n",
"      <td>0.234719</td>\n",
"      <td>0.283880</td>\n",
"      <td>0.251888</td>\n",
"      <td>...</td>\n",
"      <td>0.229372</td>\n",
"      <td>0.252486</td>\n",
"      <td>0.237473</td>\n",
"      <td>0.236919</td>\n",
"      <td>0.300617</td>\n",
"      <td>0.227033</td>\n",
"      <td>0.250967</td>\n",
"      <td>0.276590</td>\n",
"      <td>0.261683</td>\n",
"      <td>0.316733</td>\n",
"    </tr>\n",
"  </tbody>\n",
"</table>\n",
"<p>8 rows × 50 columns</p>\n",
"</div>"
],
"text/plain": [
"               0           1           2           3           4           5   \\\n",
"count  740.000000  740.000000  740.000000  740.000000  740.000000  740.000000   \n",
"mean     0.000490    0.003229    0.000185   -0.003558   -0.000550    0.004855   \n",
"std      0.078052    0.076671    0.080473    0.080584    0.080445    0.083181   \n",
"min     -0.222832   -0.210684   -0.203158   -0.220618   -0.251787   -0.245800   \n",
"25%     -0.049280   -0.051630   -0.055798   -0.060583   -0.053978   -0.050834   \n",
"50%     -0.003148   -0.002347    0.003714   -0.000112   -0.003216    0.007316   \n",
"75%      0.053316    0.051167    0.051243    0.054151    0.044473    0.058679   \n",
"max      0.202271    0.241509    0.310983    0.215986    0.279413    0.259838   \n",
"\n",
"               6           7           8           9      ...              40  \\\n",
"count  740.000000  740.000000  740.000000  740.000000     ...      740.000000   \n",
"mean    -0.000353   -0.004828    0.000823   -0.004653     ...       -0.002893   \n",
"std      0.080656    0.080346    0.078400    0.084584     ...        0.075171   \n",
"min     -0.319214   -0.257791   -0.256614   -0.269018     ...       -0.205919   \n",
"25%     -0.055398   -0.058382   -0.045658   -0.061431     ...       -0.052172   \n",
"50%     -0.000941   -0.004883    0.007292   -0.004308     ...       -0.004255   \n",
"75%      0.054497    0.044757    0.052775    0.050786     ...        0.044183   \n",
"max      0.224492    0.234719    0.283880    0.251888     ...        0.229372   \n",
"\n",
"               41          42          43          44          45          46  \\\n",
"count  740.000000  740.000000  740.000000  740.000000  740.000000  740.000000   \n",
"mean     0.001393    0.000034   -0.000325   -0.000867   -0.001082   -0.004496   \n",
"std      0.082434    0.076875    0.078159    0.081996    0.080196    0.084964   \n",
"min     -0.272927   -0.216589   -0.232542   -0.239660   -0.215522   -0.237121   \n",
"25%     -0.051161   -0.054269   -0.053610   -0.054938   -0.056238   -0.066248   \n",
"50%      0.000609   -0.001102   -0.001316   -0.002811    0.000356   -0.000773   \n",
"75%      0.056505    0.054361    0.052624    0.049942    0.053420    0.056256   \n",
"max      0.252486    0.237473    0.236919    0.300617    0.227033    0.250967   \n",
"\n",
"               47          48          49  \n",
"count  740.000000  740.000000  740.000000  \n",
"mean    -0.005450    0.006736    0.001526  \n",
"std      0.083766    0.081879    0.081213  \n",
"min     -0.217695   -0.253268   -0.216798  \n",
"25%     -0.068832   -0.048655   -0.054703  \n",
"50%     -0.008352    0.006316   -0.005236  \n",
"75%      0.049547    0.060626    0.050734  \n",
"max      0.276590    0.261683    0.316733  \n",
"\n",
"[8 rows x 50 columns]"
]
},
"execution_count": 66,
"output_type": "execute_result"
}
],
"source": [
"pandas.DataFrame(corps[\"ASR_AE_H1\"][\"TRAIN\"]).describe()"
]
},
{
"cell_type": "code",
"execution_count": 83,
"collapsed": true
},
"outputs": [],
"source": [
"corps.close()"
]
},
{
"cell_type": "code",
"execution_count": 84,
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7968a860d0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7964811fd0>"
]
},
"output_type": "display_data"
}
],
"source": [
"data=shelve.open(\"./scores/DECODA_MINIAE_TANH_TFIDF_H30.shelve\")\n",
"scores={}\n",
"#del scores_ordoned\n",
"for key,table in data.iteritems():\n",
"    scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"   # if key not in scores_ordoned:\n",
"   #     scores_ordoned[key]=[scores[key]]\n",
"   # else :\n",
"   #     scores_ordoned[key].append(scores[key])\n",
"#data.close()\n",
"show_network_TRANS(scores)\n",
"pandas.DataFrame(zip([x[0] for x in data[\"ASR_AE_H1\"][0] ],[x[0] for x in data[\"ASR_AE_H1\"][1] ])).plot()\n",
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 103,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7959a247d0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795cb007d0>"
]
},
"output_type": "display_data"
}
],
"source": [
"data=shelve.open(\"./scores/DECODA_MINIAE_TANH_TFIDF_H30_DO.shelve\")\n",
"scores={}\n",
"#del scores_ordoned\n",
"for key,table in data.iteritems():\n",
"    scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"   # if key not in scores_ordoned:\n",
"   #     scores_ordoned[key]=[scores[key]]\n",
"   # else :\n",
"   #     scores_ordoned[key].append(scores[key])\n",
"#data.close()\n",
"show_network_TRANS(scores)\n",
"pandas.DataFrame(zip([x[0] for x in data[\"ASR_AE_H1\"][0] ],[x[0] for x in data[\"ASR_AE_H1\"][1] ])).plot()\n",
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 79,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([ 0.1998101 ,  0.12073141,  0.10901488, ...,  0.25165449,\n",
"        0.07732746,  0.08457387])"
]
},
"execution_count": 79,
"output_type": "execute_result"
}
],
"source": [
"shelve.open(\"./Sparse_mat_tfidf.shelve\")[\"ASR\"][\"TRAIN\"].data"
]
},
{
"cell_type": "code",
"execution_count": 101,
"collapsed": false
},
"outputs": [],
"source": [
"data=shelve.open(\"./real_spe_scores/REAL_SPE_1060_TFIDF.shelve\")"
]
},
{
"cell_type": "code",
"execution_count": 102,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7957629e10>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795be7b150>"
]
},
"output_type": "display_data"
}
],
"source": [
"scores={}\n",
"#del scores_ordoned\n",
"for key,table in data.iteritems():\n",
"    scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"   # if key not in scores_ordoned:\n",
"   #     scores_ordoned[key]=[scores[key]]\n",
"   # else :\n",
"   #     scores_ordoned[key].append(scores[key])\n",
"#data.close()\n",
"show_network_RSPE(scores)pandas.DataFrame(zip([x[0] for x in data[\"ASR_AE_H1\"][0] ],[x[0] for x in data[\"ASR_AE_H1\"][1] ])).plot()\n",
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 96,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"['ASR', 'TRS_AE_OUT', 'ASR_AE_OUT', 'TRS', 'ASR_AE_H2', 'ASR_AE_H1']"
]
},
"execution_count": 96,
"output_type": "execute_result"
}
],
"source": [
"data.keys()"
]
},
{
"cell_type": "code",
"execution_count": 104,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7989b39d10>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79595c9410>"
]
},
"output_type": "display_data"
}
],
"source": [
"data=shelve.open(\"./real_spe_scores/DECODA_MINIAE_REAL_SPE_H50.shelve\")\n",
"scores={}\n",
"#del scores_ordoned\n",
"for key,table in data.iteritems():\n",
"    scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"   # if key not in scores_ordoned:\n",
"   #     scores_ordoned[key]=[scores[key]]\n",
"   # else :\n",
"   #     scores_ordoned[key].append(scores[key])\n",
"#data.close()\n",
"show_network_RSPE(scores,title=\"DECODA_MINIAE_REAL_SPE_H50\")\n",
"pandas.DataFrame(zip([x[0] for x in data[\"ASR_AE_H1\"][0] ],[x[0] for x in data[\"ASR_AE_H1\"][1] ])).plot()\n",
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 108,
"collapsed": true
},
"outputs": [],
"source": [
"data=shelve.open(\"./scores/DECODA_MINIAE_TANH_TFIDF_H30_DO.shelve\")"
]
},
{
"cell_type": "code",
"execution_count": 109,
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"['TRS_AE_H1',\n",
" 'TRS_AE_OUT',\n",
" 'TRS_SPARSE',\n",
" 'ASR_H1_TRANFORMED_TRSH1',\n",
" 'ASR_AE_OUT',\n",
" 'ASR_H2_TRANFORMED_OUT',\n",
" 'ASR_SPARSE',\n",
" 'ASR_H1_TRANSFORMED_W1',\n",
" 'ASR_AE_H1']"
]
},
"execution_count": 109,
"output_type": "execute_result"
}
],
"source": [
"data.keys()"
]
},
{
"cell_type": "code",
"execution_count": 111,
"collapsed": false
},
"outputs": [],
"source": [
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 141,
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/DECODA_MINIAE_TANH_H50_DO.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795883e850>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795883e9d0>"
]
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/MINIAE_TANH_H100_DO50.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795a61c7d0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f797db69710>"
]
},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/DECODA_MINIAE_TANH_TFIDF_H30_DO.shelve\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79601f2210>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79605a94d0>"
]
},
"output_type": "display_data"
}
],
"source": [
"scores_ordoned={}\n",
"for i in glob.glob(\"scores/*DO*.bak\"):\n",
"    if \"MINIAE\" not in i :\n",
"        continue\n",
"    scores={}\n",
"    print i[:-4]\n",
"    data=shelve.open(i[:-4])\n",
"    for key,table in data.iteritems():\n",
"        scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"        if key not in scores_ordoned:\n",
"            scores_ordoned[key]=[scores[key]]\n",
"        else :\n",
"            scores_ordoned[key].append(scores[key])\n",
"            \n",
"    pandas.DataFrame(zip([x[0] for x in data[\"ASR_H1_TRANSFORMED_W1\"][0] ],[x[0] for x in data[\"ASR_H1_TRANSFORMED_W1\"][1] ])).plot()\n",
"    data.close()\n",
"    show_network_TRANS(scores,title=i,unite=200)\n",
"    #except:\n",
"    #    print \"C4EST LA MERDE\",i"
]
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"collapsed": true
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 149,
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ASR_H1_TRANFORMED_OUT 0.697\n",
"ASR_H2_TRANFORMED_OUT 0.682\n",
"TRS_AE_OUT 0.838\n",
"TRS_SPARSE 0.841\n",
"ASR_SPARSE 0.78\n"
]
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f795924e810>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f797d2cd6d0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f79855e59d0>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f7964ac8590>"
]
},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.figure.Figure at 0x7f797c06cd90>"
]
},
"output_type": "display_data"
}
],
"source": [
"data=shelve.open(\"./scores/RAW_ASR_TRAIN.shelve\")\n",
"scores={}\n",
"#del scores_ordoned\n",
"for key,table in data.iteritems():\n",
"    scores[key]=round(table[1][np.argmax([x[0] for x in table[0]])][0],3)\n",
"    print key,scores[key]\n",
"   # if key not in scores_ordoned:\n",
"   #     scores_ordoned[key]=[scores[key]]\n",
"   # else :\n",
"   #     scores_ordoned[key].append(scores[key])\n",
"#data.close()\n",
"#show_network_TRANS(scores)\n",
"    pandas.DataFrame(zip([x[0] for x in data[key][0] ],[x[0] for x in data[key][1] ])).plot()\n",
"data.close()"
]
},
{
"cell_type": "code",
"execution_count": 155,
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"scores/MINIAE_BIGBIN_TANH.shelve\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAl0AAAJZCAYAAACTE4A9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XucXVV9///XJwTkIoEoMiO5ITeFX6lQKljBMoiCgFyq\nfDHA1yAoeK3A1yrg12ps6yVaq9RroaipBSJ4A/0qN2FosQoIKAoBIpoLgQz3KIISyOf3x9pDzkzO\nkEkyWTPJeT155DH7rLP3Puus2cN5z1prr4nMRJIkSevWuNGugCRJUicwdEmSJFVg6JIkSarA0CVJ\nklSBoUuSJKkCQ5ckSVIFhi5JkqQKDF2StIGIiN9GxKtqH/ss59w/Ihat4bHTImJ5RPg5pQ2GF7M0\nBkXEyyPiumZ7eUQsaf3wiYjxEXF/RDzdUnZNRJzUbO/fHPf5Qef974iY0WyfEBH/3ea1eyPi4YjY\neFD5VyPiTxHxu+bf7yPillW8j/4Pzv5j7ouIL0TERi37DPiwj4juiDgnIhY3x/w6Ir4SEbusyTmb\n97k8Iv5uUN0WRcRfP0vdv9S8x9817/vJltf8fy37bRERj7WWtTw3PyL6ImKzlrK3RMQ1LY+XR8QO\ng477cER8/dnadj2yNitwu3q3NiiGLmkdiIhYy1McBvyg5fEjwCEtjw8BHl7FOf4AvCkipj7LPgM+\n1CJiGrA3cD9wRJv9Z2XmhObflpm55yrq0P8aW2XmBGB34K+Ad7XbMSKeB/wPsBmwb3PMXwDXAq9Z\nk3M2HgbeHxFbDKO+5QUy39G8xwnAx4A5Le/9sJZd3wAsBA6IiG0Hn4by/9nT2pS32x5qH0kbAEOX\nOlZEnBER9zQ9F3Mj4oCIGBcRH2h6V5ZGxI0RManZ/xURcUNEPBIR10fEX7Wc65qI+KeIuC4i/gC8\nKCImRMR5EXFv06vyj/1hLCJ2bHqUHm16rC4cVL1Dgdaek68DJ7Q8ngHMXsVbfBT4GjBzNZplBnAl\n8B/Am1fjuFUJgMx8sDn/bkPs93+ApZn5psyc3xzzu8ycnZlfWMNzAswFfgK8d43fwdBOAM4FrgP+\nd5vnPwW8NyImDHH8agX0iHh+RHyvuQ4fiohrB+2yZ0T8onn+wojYpOXY10XELc1z10XE7m3O/8KI\neDwitm4p2zMiHujvTYyIkyLi9ub1f7iKYB8RcVZz/G8i4riWJw6NiJubn7UFEfHhZznJG5rjn+37\nLI1phi51pGao6l3AXk1PxsHAfMqH8huB12bmVsBJwOMRMRH4PvBZ4PnAZ4D/15T3+9/AW4EtKT0f\ns4E/ATsAe1J6at7a7PuPwOWZuTUwGfhcS926gW0z8xdNUQLfBf66CXJbA/sBl6zibSbwUeANEbHz\nMJtmBvAN4GLg4Ih4wTCPW5X+sLkdpa1/MsR+BwLfGeFzQmmLvwdOaw0Ta6vpGfxrSntdzMBg3O9n\nQC/wvhF62fcCiyjX4bbABwY9/7+Ag4AXAS+lCc8RsSdwHnAy8Dzg34BLY9AwcmbeR+ltfENL8bHA\nxZn5dEQcCZwJHAW8APhvYPAvDa26m9fbrqnLOS3X42PAm5qftcOAt0fESj2sEXEi8HHgwMy8/Vle\nSxrTDF3qVE8DmwB/FhHjM3NhZv4WeAvwfzPz1wCZ+cvMfITygXBXZl6Qmcszcw5wB3B4yzm/lpl3\nZOZyyofMIcDpmfnHpjfms8D0Zt9lwLSImJSZT2bm/7Sc51DgskH1/SNwaXP8G5vtP63qTWbm/cCX\ngX9Y1b4RsR8wCbg0M+cBtwHHDdrtfVHmez3SfP3qqs5LCUcPRMQjlLDwGPCtIfb