nlp-lab/Jonas_Solutions/Exercise01.ipynb
2018-05-07 18:22:52 +02:00

713 lines
46 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# NLP-LAB Exercise 01 by jonas weinz\n",
"----"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline \n",
"#inline for publishing on github. For jupyter lab set ipympl here\n",
"\n",
"import nltk\n",
"import pprint\n",
"#from sklearn.tree import DecisionTreeClassifier\n",
"from sklearn.neural_network import MLPClassifier\n",
"from sklearn.feature_extraction import DictVectorizer\n",
"from sklearn.pipeline import Pipeline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* download data"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[nltk_data] Downloading package treebank to /home/jonas/nltk_data...\n",
"[nltk_data] Package treebank is already up-to-date!\n",
"[nltk_data] Downloading package brown to /home/jonas/nltk_data...\n",
"[nltk_data] Package brown is already up-to-date!\n",
"[nltk_data] Downloading package punkt to /home/jonas/nltk_data...\n",
"[nltk_data] Package punkt is already up-to-date!\n",
"[nltk_data] Downloading package averaged_perceptron_tagger to\n",
"[nltk_data] /home/jonas/nltk_data...\n",
"[nltk_data] Package averaged_perceptron_tagger is already up-to-\n",
"[nltk_data] date!\n",
"[nltk_data] Downloading package tagsets to /home/jonas/nltk_data...\n",
"[nltk_data] Package tagsets is already up-to-date!\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nltk.download('treebank')\n",
"nltk.download('brown')\n",
"nltk.download('punkt')\n",
"nltk.download('averaged_perceptron_tagger')\n",
"nltk.download('tagsets')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## implementing own classifiers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* writing an own feature funtion"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"def features(sentence, index):\n",
" word = sentence[index]\n",
" is_punctuation_mark = word == \"!\" or word == \".\" or word == \",\" or word == \"?\"\n",
" sentence_length = len(sentence)\n",
" relative_third = (index * 3) // sentence_length \n",
" vowels = word.count('a') + word.count('e') + word.count('i') + word.count('o') + word.count('u')\n",
" return {\n",
" 'word': word,\n",
" 'is_capitalized': sentence[index][0].upper() == sentence[index][0],\n",
" 'prefix-1': sentence[index][0],\n",
" 'suffix-1': sentence[index][-1],\n",
" 'prefix-2': sentence[index][1] if len(word) > 1 else '',\n",
" 'suffix-2': sentence[index][-2] if len(word) > 1 else '',\n",
" 'prev_word': '' if index == 0 else sentence[index - 1],\n",
" 'next_word': '' if index == len(sentence) - 1 else sentence[index + 1],\n",
" 'length': len(word),\n",
" 'index' : index,\n",
" 'rev_index': len(sentence) - index,\n",
" 'sentence_length_': len(sentence),\n",
" 'relative_third': relative_third,\n",
" 'numerical': word.isnumeric(),\n",
" 'is_punctuation_mark': is_punctuation_mark,\n",
" ',': word == \",\",\n",
" '.': word == \".\",\n",
" '!': word == \"!\",\n",
" '?': word == \"?\",\n",
" 'vowels' : vowels\n",
" }"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"#test_sentence = ['The','cake','is','a','lie','!']\n",
"#for i in range(len(test_sentence)):\n",
"# pprint.pprint(features(test_sentence, i))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* function for creating training sets"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"def untag(tagged_sentence):\n",
" return [w for w,t in tagged_sentence]\n",
"\n",
"def transform_to_dataset(tagged_sentences):\n",
" X,y = [], []\n",
" \n",
" for s in tagged_sentences:\n",
" for i in range(len(s)):\n",
" X.append(features(untag(s),i))\n",
" y.append(s[i][1])\n",
" return X,y\n",
"\n",
"def create_training_and_test_set(annotated_sentences, relative_cutoff):\n",
" cutoff = int(relative_cutoff * len(annotated_sentences))\n",
" training_sentences = annotated_sentences[:cutoff]\n",
" test_sentences = annotated_sentences[cutoff:]\n",
" \n",
" X,y = transform_to_dataset(training_sentences)\n",
" tX, ty = transform_to_dataset(test_sentences)\n",
" \n",
" return X,y,tX,ty"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* Train classifier"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"def train_classifier(X,y,classifier,max_size=10000):\n",
" clf = Pipeline([\n",
" ('vectorizer', DictVectorizer(sparse=False)),\n",
" ('classifier', classifier)\n",
" ])\n",
" \n",
" print(\"start training…\")\n",
" \n",
" clf.fit(\n",
" X if len(X) < max_size else X[:max_size],\n",
" y if len(y) < max_size else y[:max_size]\n",
" )\n",
" \n",
" print(\"training done\")\n",
" \n",
" return clf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* classifier evaluater"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"def test_classifier(clf, tX, ty):\n",
" accuracy = clf.score(tX, ty)\n",
" print(\"Accuracy: \", accuracy)\n",
" # TODO: more analytics\n",
" return accuracy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Task 01:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Performance 1\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Model 01\n",
"* train and testing english custom POS tagger model:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"def model_01(X,y,tX,ty, max_size=10000):\n",
" #classifier = DecisionTreeClassifier(criterion='entropy')\n",
" model01_clf = train_classifier(X,y,MLPClassifier(hidden_layer_sizes=(100,), learning_rate='adaptive'),max_size=max_size)\n",
" return test_classifier(clf=model01_clf, tX=tX, ty=ty)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Model 02"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"def model_02(tX,ty):\n",
" m2_y = nltk.pos_tag([w['word'] for w in tX])\n",
" # compare results\n",
" n_correct = sum((1 if m2_y[i][1] == ty[i] else 0) for i in range(len(ty)))\n",
" return n_correct / len(ty)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Model 03"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"def model_03(corpus_tagged, corpus_sents, cut=0.8):\n",
" \n",
" patterns = [(r'.*ing$', 'VBG'), (r'.*ed$', 'VBD'), (r'.*es$', 'VBZ'), (r'.*ould$', 'MD'), (r'.*\\'s$', 'NN$'), \n",
" (r'.*s$', 'NNS'), (r'^-?[0-9]+(.[0-9]+)?$', 'CD'), (r'.*', 'NN')]\n",
" \n",
" s = int(len(corpus_tagged) * cut)\n",
" train_sents = corpus_tagged[:s]\n",
" test_sents = corpus_tagged[s:]\n",
" \n",
" models = {\n",
" 'def_model': nltk.DefaultTagger('NN'),\n",
" 'regexp_model': nltk.RegexpTagger(patterns),\n",
" 'uni_model': nltk.UnigramTagger(train_sents),\n",
" 'bi_model': nltk.BigramTagger(train_sents),\n",
" 'tri_model': nltk.TrigramTagger(train_sents)\n",
" }\n",
" \n",
" performance = {}\n",
" for name,model in models.items():\n",
" performance[name] = model.evaluate(test_sents)\n",
" \n",
" return performance\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Applying models on Datasets"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"P1.1\n",
"start training…\n",
"training done\n",
"Accuracy: 0.9156644543140875\n",
"P1.2\n",
"P1.3\n",
"P1.4\n",
"start training…\n",
"training done\n",
"Accuracy: 0.8418517269617997\n",
"P1.5\n",
"P1.6\n",
"\n",
"All Performances:\n",
"{'P1.1': 0.9156644543140875,\n",
" 'P1.2': 0.8936074654423873,\n",
" 'P1.3 -- bi_model': 0.1132791057437996,\n",
" 'P1.3 -- def_model': 0.1447677029791906,\n",
" 'P1.3 -- regexp_model': 0.24232746145017217,\n",
" 'P1.3 -- tri_model': 0.06736863116922003,\n",
" 'P1.3 -- uni_model': 0.8608213982733669,\n",
" 'P1.4': 0.8418517269617997,\n",
" 'P1.5': 0.615540247603449,\n",
" 'P1.6 -- bi_model': 0.09186376993111421,\n",
" 'P1.6 -- def_model': 0.1209595837949805,\n",
" 'P1.6 -- regexp_model': 0.19683029047641987,\n",
" 'P1.6 -- tri_model': 0.05867334650031312,\n",
" 'P1.6 -- uni_model': 0.8026879907509996}\n"
]
}
],
"source": [
"# dictionary containing all performances\n",
"performances = {}\n",
"\n",
"treebank_tagged = nltk.corpus.treebank.tagged_sents()\n",
"treebank_sents = nltk.corpus.treebank.sents()\n",
"\n",
"brown_tagged = nltk.corpus.brown.tagged_sents(categories='news')\n",
"brown_sents = nltk.corpus.brown.sents(categories='news')\n",
"\n",
"#display(treebank_tagged[0])\n",
"\n",
"X1,y1,tX1,ty1 = create_training_and_test_set(annotated_sentences=treebank_tagged, \n",
" relative_cutoff=0.8)\n",
"\n",
"X2,y2,tX2,ty2 = create_training_and_test_set(annotated_sentences=brown_tagged, \n",
" relative_cutoff=0.8)\n",
"\n",
"\n",
"# running performances 1.1 - 1.6\n",
"\n",
"print(\"P1.1\")\n",
"performances['P1.1'] = model_01(X1,y1,tX1,ty1)\n",
"\n",
"print(\"P1.2\")\n",
"performances['P1.2'] = model_02(tX1,ty1)\n",
"\n",
"print(\"P1.3\")\n",
"p3 = model_03(treebank_tagged, treebank_sents)\n",
"for k,v in p3.items():\n",
" performances[\"P1.3 -- \" + k] = v\n",
"\n",
"print(\"P1.4\")\n",
"performances['P1.4'] = model_01(X2,y2,tX2,ty2)\n",
"\n",
"print(\"P1.5\")\n",
"performances['P1.5'] = model_02(tX2,ty2)\n",
"\n",
"print(\"P1.6\")\n",
"p6 = model_03(brown_tagged, brown_sents)\n",
"for k,v in p6.items():\n",
" performances[\"P1.6 -- \" + k] = v\n",
"\n",
" \n",
"print(\"\\nAll Performances:\")\n",
"pprint.pprint(performances)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Plotting Data"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJztnXecHWX1/98nHZJACAQiCSEBqdIJvStIFZQmTQSRJk0pEqQY2pcqCAgKNqQXKYbeQUGp0lGUKqD+BAsiKC3n98d5Jjt7c3fv7O6dvbO7n/frNa97596Zp8ycmfM85znPeczdEUIIIarGoFYXQAghhKiHFJQQQohKIgUlhBCikkhBCSGEqCRSUEIIISqJFJQQQohKIgUlhBCikkhBCSGEqCRSUEIIISrJkFYXoKvMN998Pnny5FYXQwghRDd57LHH3nL3cY2O63MKavLkyTz66KOtLoYQQohuYmavFjlOJj4hhBCVRApKCCFEJZGCEkIIUUmkoIQQQlQSKSghhBCVRApKCCFEJZGCEkIIUUn63DyoZjB52k1NS+uVkzdvWlpCCCHaUA9KCCFEJZGCEkIIUUmkoIQQQlQSKSghhBCVZEA6SZRNM50wQI4YQoiBiXpQQgghKokUlBBCiEoiBSWEEKKSSEEJIYSoJFJQQgghKom8+ERLkKejEKIR6kEJIYSoJFJQQgghKokUlBBCiEqiMSghKoyWhhEDGfWghBBCVBIpKCGEEJVECkoIIUQlkYISQghRSUpVUGa2iZk9b2YvmNm0Ov9PMrN7zOxxM3vKzDYrszxCCCH6DqUpKDMbDJwLbAosDexoZkvXHHYUcJW7rwjsAJxXVnmEEEL0LcrsQa0KvODuL7n7B8AVwFY1xzgwV/o+N/DnEssjhBCiD1HmPKg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MbAIROXwkYQaZBDzt7sen/4cRExzvd/fTcufNTawgOoNwLZ0Vc45o4PbdiyIqRw/ldHPgbs/FnMvF2uvS0htC9DX6lImvDqUFRBWiiZQWEFWI/kyfVlDufiXwWzM7NP30MjEp743cMfcBd5jZU2Z2P7GC6PPufntNWnrgRSn0UE47XNhSiP7OkFYXoAnsD9xoZllIoj8C2TIDM81sBSLC8tvA4e7+mxaWVQxcJKdCdJE+PQaVYWYXEuaRTWpbnGa2F/Ceu1+S9psy8VaIriI5FaJr9BcF1W9nv4v+g+RUiK7Rp8egMqow+12IRkhOhega/UJBQetnvwtRBMmpEMXpFyY+IYQQ/Y9+04PKUKwt0ReQnArRGPWghBBCVJJ+14MSQgjRP5CCEkIIUUmkoIQQQlQSKSghhBCVRApKCCFEJfn/rQSorCA3sXgAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f9611a7b588>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"#weights = clf.named_steps['classifier'].feature_importances_\n",
"#labels = clf.named_steps['vectorizer'].get_feature_names()\n",
"\n",
"#sort\n",
"#weights, labels = (list(t) for t in zip(*sorted(zip(weights, labels))))\n",
"\n",
"fig_1, ax_1 = plt.subplots()\n",
"plt.bar(np.arange(len(performances)), performances.values())\n",
"plt.xticks(np.arange(len(performances)), performances.keys(), rotation=30, ha='right')\n",
"plt.ylabel(\"performance\")\n",
"plt.tight_layout()\n",
"plt.show()\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----\n",
"## Task 2\n",
"\n",
"* the file `ru_syntagrus-ud-train-uncommented.conllu` is generated from the file `ru_syntagrus-ud-train.conllu` located here: https://github.com/UniversalDependencies/UD_Russian-SynTagRus. Changes to the original file:\n",
" * removed commentaries (lines with leading `#`)\n",
" * removed spaces in in long numbers (eg: `100 000` → `100000`)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"WORDS = 'words' #: column type for words\n",
"POS = 'pos' #: column type for part-of-speech tags\n",
"TREE = 'tree' #: column type for parse trees\n",
"CHUNK = 'chunk' #: column type for chunk structures\n",
"NE = 'ne' #: column type for named entities\n",
"SRL = 'srl' #: column type for semantic role labels\n",
"IGNORE = 'ignore' #: column type for column that should be ignored\n",
"ru_corp = nltk.corpus.ConllCorpusReader(root=\"./\", \n",
" fileids=[\"ru_syntagrus-ud-train-uncommented.conllu\"],\n",
" columntypes=[IGNORE, WORDS, IGNORE, POS],\n",
" encoding='utf-8')\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"ru_tagged = ru_corp.tagged_sents()\n",
"\n",
"\n",
"\n",
"X3,y3,tX3,ty3 = create_training_and_test_set(annotated_sentences=ru_tagged, \n",
" relative_cutoff=0.8)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Model 04, Performance 2.1"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"P2.1\n",
"start training…\n",
"training done\n",
"Accuracy: 0.7951261788284127\n",
"0.7951261788284127\n"
]
}
],
"source": [
"print(\"P2.1\")\n",
"performances2 = {}\n",
"performances2['P2.1'] = model_01(X3,y3,tX3,ty3, max_size=5000) # 10000 here consumes too much memory on my laptop\n",
"print(performances2['P2.1'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Model 05, Performance 2.2"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"# write russian text out to file:\n",
"f = open(\"ru_text.txt\", 'w')\n",
"for word_features in tX3:\n",
" f.write(word_features['word'] + \" \")\n",
" if word_features['word'] == '.': \n",
" f.write(\"\\n\") #new sentence → new line\n",
"f.close()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* download the python 3 fork of the rdrpos-tagger: https://github.com/jacopofar/RDRPOSTagger-python-3\n",
" ```\n",
" mkdir -p ~/src\n",
" cd ~/src\n",
" git clone https://github.com/jacopofar/RDRPOSTagger-python-3.git\n",
" ```\n",
"* adjust `RDRPOS_TAGGER_PATH` to match with the download location"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"import sys, os\n",
"\n",
"# remember current working directory\n",
"cwd = os.getcwd()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['Node', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'tabStr']\n",
"('\\nOutput file:', 'ru_text.txt.TAGGED')\n"
]
}
],
"source": [
"RDRPOS_TAGGER_PATH = os.environ['HOME'] + \"/src/RDRPOSTagger-python-3/pSCRDRtagger/\"\n",
"\n",
"sys.path.insert(0, RDRPOS_TAGGER_PATH)\n",
"\n",
"# change current working directory to RDRPOSTagger repo\n",
"os.chdir(RDRPOS_TAGGER_PATH)\n",
"\n",
"import RDRPOSTagger as model05_tagger \n",
"\n",
"# train tagger (copied from RDRPOSTagger.py):\n",
"r = model05_tagger.RDRPOSTagger()\n",
"r.constructSCRDRtreeFromRDRfile(\"../Models/UniPOS/UD_Russian-SynTagRus/train.UniPOS.RDR\")\n",
"DICT = model05_tagger.readDictionary(\"../Models/UniPOS/UD_Russian-SynTagRus/train.UniPOS.DICT\")\n",
"\n",
"# change back to our cwd\n",
"os.chdir(cwd)\n",
"\n",
"# run trained tagger\n",
"r.tagRawCorpus(DICT, \"ru_text.txt\")"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"tagged_words = []\n",
"f = open(\"ru_text.txt.TAGGED\", 'r')\n",
"for line in f:\n",
" for splits in line.split():\n",
" w,t = splits.rsplit('/',1) # use last occurence of '/' to split.\n",
" tagged_words.append((w,t))\n"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"score_2_2 = sum((1 if tagged_words[i][1] == ty3[i] else 0)for i in range(len(tagged_words))) / len(tagged_words)\n",
"performances2['P2.2'] = score_2_2\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Results of performance 2"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'P2.1': 0.7951261788284127, 'P2.2': 0.8884973715119793}\n"
]
}
],
"source": [
"pprint.pprint(performances2)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAEYCAYAAAAJeGK1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAENVJREFUeJzt3X+w5XVdx/Hni12REsLJXSpZdHFc0B1DxRviYIYhM4vmbqU1YE46EehMlEo6rf0gXaf8OTqjUrmOplmGYGVrLlLpUoZIexHTWEOXH8qixkIKCsrPd3+cL87xust+98f33s+55/mYuXPP93s+99zXzH7vvPbzPZ/z/aaqkCSpNQctdABJknbFgpIkNcmCkiQ1yYKSJDXJgpIkNcmCkiQ1yYKSJDXJgpIkNcmCkiQ1aelCB9hby5Ytq5UrVy50DEnSPrryyitvqarlexo3cQW1cuVKZmdnFzqGJGkfJflKn3Ge4pMkNcmCkiQ1yYKSJDXJgpIkNcmCkiQ1yYKSJDXJgpIkNcmCkiQ1yYKSJDVp4q4kIam/les/ttARtMjc8IbnzNvvcgYlSWqSBSVJapIFJUlqkgUlSWqSBSVJapIFJUlqkgUlSWqSBSVJapIFJUlqkgUlSWqSBSVJapIFJUlqkgUlSWqSBSVJapIFJUlqkgUlSWqSBSVJapIFJUlq0qAFlWRNkmuSbE+yfhfPPyrJliRXJfl8kmcPmUeSNDkGK6gkS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0RfZzRH+5m4FjgaQsaSjrwvgd8EnheVf1PVX2O0UWpn7iwsdSXBTW9vl5VtzD6A74DeHqSw8FTfVocqupeYEtV3Q+Q5CHAk4EvL2gw9WZBLXJJjk9yxNz93R8vXUldxujK8id3+zzVp4nyIMf5Hd3zYXTlnG8D185zPO0jC2qRSnJKkiuAPwE+kmTmQWZGlwLbgWOTvDTJb8xXTml/9D3Ou/90Hdk9vj3JaUl+eZ7jai9ZUItQkscBfwS8papOA7YAv1ZVleSgOWNTVXcC3wBeAawHbp/vzNLe2pvjvPNMYGmSPwc2AHfNX1rtC6/Ft0gkWQK8gNHpum8Bh1fV9d1zRwL/ATyxqn6ofJIs737ug1X1mnkLLe2l/TzONzC68ekbq+pt85da+8oPaS4CSc4EfhP4DvCLwBVV9abuuSWMTm1cCdzZzZiqe+4pwNeq6utJntTNpKQm7cdx/jPAfwMfBd5aVd9aiPzae57im3DdG8PvBl5UVacCFwCrkxwHUFX3MfrDvbWq7h37o30scCJwTzfOclKzDsBx/qNVtdVymiwW1ISrqpsZ3Vfr1G7XLPCTjE5/POBngU8kOSTJW5KcUFXbq+r8bhWf1LT9PM7fUVXeqXsCWVCLw8uB1yY5BHguo1nRnd0VIw4CHs3o1MingLur6j8XLqq0zzzOp4wFtQh0n/VYz+gDt8cAv1VVt9TI/cBjgNuAtVX1+wsYVdpnHufTx1V8i0T32Y8dwPFV9b9JHlpVd3X/szyiqr6xwBGl/eZxPl2cQS0S3ZvCzwc2ddt3dd/v949Wi4XH+XSxoBaRqrocuO+BlU3SYuRxPj08xbfIdLfNuG+hc0hD8jifDhaUJKlJnuKTJDXJgpIkNcmCkiQ1yYKSJDXJgpIkNcmCkiQ16f8BbcWS5a9DbRgAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f9611a0ed68>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig_2, ax_2 = plt.subplots()\n",
"plt.bar(np.arange(len(performances2)), performances2.values())\n",
"plt.xticks(np.arange(len(performances2)), performances2.keys(), rotation=30, ha='right')\n",
"plt.ylabel(\"performance\")\n",
"plt.tight_layout()\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}