diff --git a/lstm_word2vec_archive.ipynb b/lstm_word2vec_archive.ipynb new file mode 100644 index 0000000..5b7ad05 --- /dev/null +++ b/lstm_word2vec_archive.ipynb @@ -0,0 +1,771 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "The code in this notebook is based on the [Keras documentation](https://keras.io/) and [blog](https://blog.keras.io/using-pre-trained-word-embeddings-in-a-keras-model.html) as well as this [word2vec tutorial](http://adventuresinmachinelearning.com/gensim-word2vec-tutorial/). " + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Using CNTK backend\n" + ] + } + ], + "source": [ + "import numpy as np\n", + "import os\n", + "import pandas as pd\n", + "import pickle\n", + "import time\n", + "\n", + "os.environ['KERAS_BACKEND']='cntk'\n", + "from keras.preprocessing import sequence\n", + "from keras.preprocessing.text import Tokenizer, text_to_word_sequence\n", + "from keras.models import Sequential\n", + "from keras import regularizers\n", + "from keras.optimizers import SGD\n", + "from keras.layers import Dense, Dropout, Embedding, LSTM, Bidirectional\n", + "from keras.callbacks import History, CSVLogger\n", + "from keras.utils import to_categorical" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "Download the Amazon reviews data for food from the Internet archive \n", + "[J. McAuley and J. Leskovec. Hidden factors and hidden topics: understanding rating dimensions with review text. RecSys, 2013]" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "--2017-09-21 15:00:07-- https://archive.org/download/amazon-reviews-1995-2013/Gourmet_Foods.txt.gz\n", + "Resolving archive.org (archive.org)... 207.241.224.2\n", + "Connecting to archive.org (archive.org)|207.241.224.2|:443... connected.\n", + "HTTP request sent, awaiting response... 302 Moved Temporarily\n", + "Location: https://ia801306.us.archive.org/24/items/amazon-reviews-1995-2013/Gourmet_Foods.txt.gz [following]\n", + "--2017-09-21 15:00:07-- https://ia801306.us.archive.org/24/items/amazon-reviews-1995-2013/Gourmet_Foods.txt.gz\n", + "Resolving ia801306.us.archive.org (ia801306.us.archive.org)... 207.241.228.136\n", + "Connecting to ia801306.us.archive.org (ia801306.us.archive.org)|207.241.228.136|:443... connected.\n", + "HTTP request sent, awaiting response... 200 OK\n", + "Length: 31388180 (30M) [application/octet-stream]\n", + "Saving to: ‘Gourmet_Foods.txt.gz’\n", + "\n", + "Gourmet_Foods.txt.g 100%[===================>] 29.93M 186KB/s in 77s \n", + "\n", + "2017-09-21 15:01:25 (397 KB/s) - ‘Gourmet_Foods.txt.gz’ saved [31388180/31388180]\n", + "\n" + ] + } + ], + "source": [ + "!wget \"https://archive.org/download/amazon-reviews-1995-2013/Gourmet_Foods.txt.gz\"" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "!gunzip -f Gourmet_Foods.txt.gz" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "with open(\"Gourmet_Foods.txt\", \"r\") as fp:\n", + " lst = fp.readlines()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Extract scores and review texts from file " + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "text_lst = lst[9:len(lst):11]\n", + "score_lst = lst[6:len(lst):11]\n", + "score_lst2 = [sc[14:17] for sc in score_lst]\n", + "text_lst2 = [txt[13:] for txt in text_lst]" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "all_data = pd.DataFrame(data={'text': text_lst2, 'rating': score_lst2})\n", + "all_data.loc[:, 'rating'] = all_data['rating'].astype(float)\n", + "all_data.loc[:, 'rating'] = all_data['rating'].astype(int)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Remove medium rating and convert to binary classification (high vs. low rating). " + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "all_data = all_data[all_data['rating'] != 3]" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "new_data = all_data.replace({'rating': {1: '0', 2: '0', 4: '1', 5: '1'}})\n", + "new_data.loc[:, 'rating'] = new_data['rating'].astype(int)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Extract a balanced subsample and split into training and test sets." + ] + }, + { + "cell_type": "code", + "execution_count": 116, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "sample_data = pd.concat([new_data[new_data.rating == 0].sample(10000), new_data[new_data.rating == 1].sample(10000)])\n", + "shuffled = sample_data.iloc[np.random.permutation(20000), :]\n", + "train_data = shuffled.iloc[:10000, :]\n", + "test_data = shuffled.iloc[10000:, :]" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1 5005\n", + "0 4995\n", + "Name: rating, dtype: int64" + ] + }, + "execution_count": 124, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "train_data.rating.value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "0 5005\n", + "1 4995\n", + "Name: rating, dtype: int64" + ] + }, + "execution_count": 118, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "test_data.rating.value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "Set the dimensions of the input and the embedding. \n", + "\n", + "MAX_DOC_LENGTH : the size of the input i.e. the number of words in the document. Longer documents will be truncated, shorter ones will be padded with zeros.\n", + "\n", + "VOCAB_SIZE : the size of the word encoding (number of most frequent words to keep in the vocabulary)\n", + "\n", + "EMBEDDING_DIM : the dimensionality of the word embedding" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": { + "collapsed": true, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "MAX_DOC_LEN = 300\n", + "VOCAB_SIZE = 6000\n", + "EMBEDDING_DIM = 100" + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "metadata": { + "collapsed": true, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "TEXT_COL = 'text'\n", + "LABEL_COL = 'rating'" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "Fit a Keras tokenizer to the most frequent words using the entire training data set as the corpus." + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "# tokenize, create seqs, pad\n", + "tok = Tokenizer(num_words=VOCAB_SIZE, lower=True, split=\" \")\n", + "tok.fit_on_texts(train_data[TEXT_COL])\n", + "train_seq = tok.texts_to_sequences(train_data[TEXT_COL])\n", + "train_seq = sequence.pad_sequences(train_seq, maxlen=MAX_DOC_LEN)\n", + "test_seq = tok.texts_to_sequences(test_data[TEXT_COL])\n", + "test_seq = sequence.pad_sequences(test_seq, maxlen=MAX_DOC_LEN)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "Convert the ratings to one-hot categorical labels." + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "metadata": { + "collapsed": true, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "labels = to_categorical(np.asarray(train_data[LABEL_COL]))\n", + "labels = labels.astype('float32')" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of reviews by class in training set\n", + "[ 4995. 5005.]\n" + ] + } + ], + "source": [ + "print('Number of reviews by class in training set')\n", + "print(labels.sum(axis=0))\n", + "n_classes = labels.shape[1]" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "Train word2vec on all the documents in order to initialize the word embedding. Ignore rare words (min_count=6). Use skip-gram as the training algorithm (sg=1)." + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package punkt to /home/anargyri/nltk_data...\n", + "[nltk_data] Package punkt is already up-to-date!\n" + ] + } + ], + "source": [ + "import nltk \n", + "\n", + "nltk.download('punkt')\n", + "\n", + "sent_lst = []\n", + "\n", + "for doc in train_data[TEXT_COL]:\n", + " sentences = nltk.tokenize.sent_tokenize(doc)\n", + " for sent in sentences:\n", + " word_lst = [w for w in nltk.tokenize.word_tokenize(sent) if w.isalnum()]\n", + " sent_lst.append(word_lst)" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true, + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2017-09-21 16:29:01,720 : INFO : collecting all words and their counts\n", + "2017-09-21 16:29:01,721 : INFO : PROGRESS: at sentence #0, processed 0 words, keeping 0 word types\n", + "2017-09-21 16:29:01,761 : INFO : PROGRESS: at sentence #10000, processed 151224 words, keeping 11866 word types\n", + "2017-09-21 16:29:01,800 : INFO : PROGRESS: at sentence #20000, processed 300037 words, keeping 17003 word types\n", + "2017-09-21 16:29:01,843 : INFO : PROGRESS: at sentence #30000, processed 453236 words, keeping 21102 word types\n", + "2017-09-21 16:29:01,890 : INFO : PROGRESS: at sentence #40000, processed 606597 words, keeping 24141 word types\n", + "2017-09-21 16:29:01,919 : INFO : collected 26181 word types from a corpus of 712241 raw words and 47144 sentences\n", + "2017-09-21 16:29:01,921 : INFO : Loading a fresh vocabulary\n", + "2017-09-21 16:29:01,952 : INFO : min_count=6 retains 6289 unique words (24% of original 26181, drops 19892)\n", + "2017-09-21 16:29:01,953 : INFO : min_count=6 leaves 678196 word corpus (95% of original 712241, drops 34045)\n", + "2017-09-21 16:29:01,975 : INFO : deleting the raw counts dictionary of 26181 items\n", + "2017-09-21 16:29:01,977 : INFO : sample=0.001 downsamples 54 most-common words\n", + "2017-09-21 16:29:01,977 : INFO : downsampling leaves estimated 500290 word corpus (73.8% of prior 678196)\n", + "2017-09-21 16:29:01,978 : INFO : estimated required memory for 6289 words and 100 dimensions: 8175700 bytes\n", + "2017-09-21 16:29:01,993 : INFO : resetting layer weights\n", + "2017-09-21 16:29:02,117 : INFO : training model with 24 workers on 6289 vocabulary and 100 features, using sg=1 hs=0 sample=0.001 negative=5 window=5\n", + "2017-09-21 16:29:03,133 : INFO : PROGRESS: at 48.01% examples, 1196686 words/s, in_qsize 46, out_qsize 1\n", + "2017-09-21 16:29:03,918 : INFO : worker thread finished; awaiting finish of 23 more threads\n", + "2017-09-21 16:29:03,923 : INFO : worker thread finished; awaiting finish of 22 more threads\n", + "2017-09-21 16:29:03,928 : INFO : worker thread finished; awaiting finish of 21 more threads\n", + "2017-09-21 16:29:03,932 : INFO : worker thread finished; awaiting finish of 20 more threads\n", + "2017-09-21 16:29:03,946 : INFO : worker thread finished; awaiting finish of 19 more threads\n", + "2017-09-21 16:29:03,949 : INFO : worker thread finished; awaiting finish of 18 more threads\n", + "2017-09-21 16:29:03,960 : INFO : worker thread finished; awaiting finish of 17 more threads\n", + "2017-09-21 16:29:03,961 : INFO : worker thread finished; awaiting finish of 16 more threads\n", + "2017-09-21 16:29:03,964 : INFO : worker thread finished; awaiting finish of 15 more threads\n", + "2017-09-21 16:29:03,971 : INFO : worker thread finished; awaiting finish of 14 more threads\n", + "2017-09-21 16:29:03,972 : INFO : worker thread finished; awaiting finish of 13 more threads\n", + "2017-09-21 16:29:03,973 : INFO : worker thread finished; awaiting finish of 12 more threads\n", + "2017-09-21 16:29:03,975 : INFO : worker thread finished; awaiting finish of 11 more threads\n", + "2017-09-21 16:29:03,976 : INFO : worker thread finished; awaiting finish of 10 more threads\n", + "2017-09-21 16:29:03,979 : INFO : worker thread finished; awaiting finish of 9 more threads\n", + "2017-09-21 16:29:03,981 : INFO : worker thread finished; awaiting finish of 8 more threads\n", + "2017-09-21 16:29:03,982 : INFO : worker thread finished; awaiting finish of 7 more threads\n", + "2017-09-21 16:29:03,983 : INFO : worker thread finished; awaiting finish of 6 more threads\n", + "2017-09-21 16:29:03,985 : INFO : worker thread finished; awaiting finish of 5 more threads\n", + "2017-09-21 16:29:03,990 : INFO : worker thread finished; awaiting finish of 4 more threads\n", + "2017-09-21 16:29:03,990 : INFO : worker thread finished; awaiting finish of 3 more threads\n", + "2017-09-21 16:29:03,992 : INFO : worker thread finished; awaiting finish of 2 more threads\n", + "2017-09-21 16:29:04,003 : INFO : worker thread finished; awaiting finish of 1 more threads\n", + "2017-09-21 16:29:04,011 : INFO : worker thread finished; awaiting finish of 0 more threads\n", + "2017-09-21 16:29:04,012 : INFO : training on 3561205 raw words (2500170 effective words) took 1.9s, 1328895 effective words/s\n" + ] + } + ], + "source": [ + "import gensim, logging\n", + "\n", + "logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)\n", + "# use skip-gram\n", + "word2vec_model = gensim.models.Word2Vec(sentences=sent_lst, min_count=6, size=EMBEDDING_DIM, sg=1, workers=os.cpu_count())" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "Create the initial embedding matrix from the output of word2vec." + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total 6289 word vectors.\n" + ] + } + ], + "source": [ + "embeddings_index = {}\n", + "\n", + "for word in word2vec_model.wv.vocab:\n", + " coefs = np.asarray(word2vec_model.wv[word], dtype='float32')\n", + " embeddings_index[word] = coefs\n", + "\n", + "print('Total %s word vectors.' % len(embeddings_index))\n", + "\n", + "# Initial embedding\n", + "embedding_matrix = np.zeros((VOCAB_SIZE, EMBEDDING_DIM))\n", + "\n", + "for word, i in tok.word_index.items():\n", + " embedding_vector = embeddings_index.get(word)\n", + " if embedding_vector is not None and i < VOCAB_SIZE:\n", + " embedding_matrix[i] = embedding_vector" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, + "source": [ + "LSTM_DIM is the dimensionality of each LSTM output (the number of LSTM units).\n", + "The mask_zero option determines whether masking is performed, i.e. whether the layers ignore the padded zeros in shorter documents. CNTK / Keras does not support masking yet." + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "metadata": { + "collapsed": true, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "BATCH_SIZE = 50\n", + "NUM_EPOCHS = 30\n", + "LSTM_DIM = 100\n", + "OPTIMIZER = SGD(lr=0.01, nesterov=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 142, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "def lstm_create_train(reg_param):\n", + " l2_reg = regularizers.l2(reg_param)\n", + "\n", + " # model init\n", + " embedding_layer = Embedding(VOCAB_SIZE,\n", + " EMBEDDING_DIM,\n", + " input_length=MAX_DOC_LEN,\n", + " trainable=True,\n", + " mask_zero=False,\n", + " embeddings_regularizer=l2_reg,\n", + " weights=[embedding_matrix])\n", + "\n", + " lstm_layer = LSTM(units=LSTM_DIM, kernel_regularizer=l2_reg)\n", + " dense_layer = Dense(n_classes, activation='softmax', kernel_regularizer=l2_reg)\n", + "\n", + " model = Sequential()\n", + " model.add(embedding_layer)\n", + " model.add(Bidirectional(lstm_layer))\n", + " model.add(dense_layer)\n", + "\n", + " model.compile(loss='categorical_crossentropy',\n", + " optimizer=OPTIMIZER,\n", + " metrics=['acc'])\n", + "\n", + " fname = \"lstm_food\"\n", + " history = History()\n", + " csv_logger = CSVLogger('./{0}_{1}.log'.format(fname, reg_param),\n", + " separator=',',\n", + " append=True)\n", + "\n", + " t1 = time.time()\n", + " # model fit\n", + " model.fit(train_seq,\n", + " labels.astype('float32'),\n", + " batch_size=BATCH_SIZE,\n", + " epochs=NUM_EPOCHS,\n", + " callbacks=[history, csv_logger],\n", + " verbose=2)\n", + " t2 = time.time()\n", + "\n", + " # save model\n", + " model.save('./{0}_{1}_model.h5'.format(fname, reg_param))\n", + " np.savetxt('./{0}_{1}_time.txt'.format(fname, reg_param), \n", + " [reg_param, (t2-t1) / 3600])\n", + " with open('./{0}_{1}_history.txt'.format(fname, reg_param), \"w\") as res_file:\n", + " res_file.write(str(history.history))" + ] + }, + { + "cell_type": "code", + "execution_count": 151, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Epoch 1/15\n", + "76s - loss: 0.6882 - acc: 0.5696\n", + "Epoch 2/15\n", + "75s - loss: 0.6825 - acc: 0.6040\n", + "Epoch 3/15\n", + "75s - loss: 0.6768 - acc: 0.6188\n", + "Epoch 4/15\n", + "75s - loss: 0.6705 - acc: 0.6373\n", + "Epoch 5/15\n", + "74s - loss: 0.6633 - acc: 0.6426\n", + "Epoch 6/15\n", + "75s - loss: 0.6543 - acc: 0.6563\n", + "Epoch 7/15\n", + "74s - loss: 0.6412 - acc: 0.6653\n", + "Epoch 8/15\n", + "74s - loss: 0.6125 - acc: 0.6884\n", + "Epoch 9/15\n", + "74s - loss: 0.5350 - acc: 0.7356\n", + "Epoch 10/15\n", + "75s - loss: 0.5045 - acc: 0.7573\n", + "Epoch 11/15\n", + "75s - loss: 0.4971 - acc: 0.7684\n", + "Epoch 12/15\n", + "75s - loss: 0.4850 - acc: 0.7749\n", + "Epoch 13/15\n", + "75s - loss: 0.4825 - acc: 0.7734\n", + "Epoch 14/15\n", + "74s - loss: 0.4708 - acc: 0.7800\n", + "Epoch 15/15\n", + "74s - loss: 0.4700 - acc: 0.7798\n" + ] + } + ], + "source": [ + "lstm_create_train(1e-7)" + ] + }, + { + "cell_type": "code", + "execution_count": 152, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Accuracy = 0.8023 \t AUC = 0.8845375045375046\n" + ] + } + ], + "source": [ + "from sklearn.metrics import accuracy_score, roc_auc_score, roc_curve\n", + "\n", + "model = load_model('./lstm_food_{0}_model.h5'.format(1e-7))\n", + "preds = model.predict(test_seq, verbose=0)\n", + "print((\"Accuracy = {0} \\t AUC = {1}\".format(accuracy_score(test_data[LABEL_COL], preds.argmax(axis=1)), \n", + " roc_auc_score(test_data[LABEL_COL], preds[:, 1]))))" + ] + }, + { + "cell_type": "code", + "execution_count": 153, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + } + ], + "source": [ + "%pylab inline" + ] + }, + { + "cell_type": "code", + "execution_count": 155, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true, + "scrolled": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 155, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAF5CAYAAACm4JG+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmcXFWd9/HPLysESCAkJgSjbBJA1jQgi4g8QCIygLIM\nBlAEB4dtBgPuyws35FEUxCE8IA7bKDGozwgIEiSgiBiWjoEgiyxhkyFsplmykj7PH6f76aZJk3Sn\nqm5V3c/79arXqbp17+1fXZqub84999xIKSFJklRLA4ouQJIklY8BRJIk1ZwBRJIk1ZwBRJIk1ZwB\nRJIk1ZwBRJIk1ZwBRJIk1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8sIi7v9nppRDwSEV+LiAEd2+7dY9vnI+L6iNi26M8lac0ZQCRV22+Bsd0eG5Hv85G6vbcFcA75\nfjWf7bZtIt9bZSz5bptDgd9ExKAa1S6pSgwgkqptaUrphZTS890e7T3eezql9GPgZuCQHtt3bjsX\nOA8YT75LqqQGZgCRVE+WAEN6LAuAiBgBHN2xbFkti5JUeXZjSqq2gyLi1W6vb0gpHdlzpYjYD5gM\nnN99MfB0RASwTseyX6eU/la1aiXVhAFEUrXdApxIR08G8Hq39zrDyeCO938GfKPb+wl4P7AY2A34\nMnBStQuWVH0GEEnV9npKaX4v73WGk+XAs93GhnT3RErpFeCRiBgDXA3sXZ1SJdWKY0AkFen1lNL8\nlNIzvYSPnqYB20ZEz4GqkhqMAURSPYvuL1JKi4FLgG8WU46kSjGASKpnaSXLLgC2iojDa12MpMqJ\nlFb2/7ckSVL12AMiSZJqzgAiSZJqzgAiSZJqzgAiSZJqzgAiSZJqzgAiSZJqzgAiSZJqzgAiSZJq\nzgAiSZJqzgAiSZJqzgAiSZJqzgAiSZJq7v8BAPF+7u+d/1EAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fpr, tpr, _ = roc_curve(test_data[LABEL_COL], preds[:, 1])\n", + "plot(fpr, tpr)\n", + "xlabel('FPR')\n", + "ylabel('TPR')" + ] + } + ], + "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.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/lstm_word2vec_small.ipynb b/lstm_word2vec_small.ipynb index bdbec87..b070565 100644 --- a/lstm_word2vec_small.ipynb +++ b/lstm_word2vec_small.ipynb @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": { "collapsed": false, "deletable": true, @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 2, "metadata": { "collapsed": false, "deletable": true, @@ -65,7 +65,6 @@ }, "outputs": [], "source": [ - "\"\"\"\n", "from azureml import Workspace\n", "ws = Workspace(\n", " workspace_id='817780d9ee0d4a878e25f8c9deb3b866',\n", @@ -75,13 +74,12 @@ "ds = ws.datasets['Book Reviews from Amazon']\n", "all_data = ds.to_dataframe()\n", "all_data.rename(columns={0: 'rating', 1: 'text'}, inplace=True)\n", - "all_data.loc[:, 'rating'] = all_data['rating'] - 1 # reindex ratings to start from 0\n", - "\"\"\"" + "all_data.loc[:, 'rating'] = all_data['rating'] - 1 # reindex ratings to start from 0" ] }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 2, "metadata": { "collapsed": true, "deletable": true, @@ -89,6 +87,7 @@ }, "outputs": [], "source": [ + "\"\"\"\n", "from azureml import Workspace\n", "ws = Workspace(\n", " workspace_id='817780d9ee0d4a878e25f8c9deb3b866',\n", @@ -98,7 +97,8 @@ "ds = ws.datasets['dfe_happysad_utf.csv']\n", "all_data = ds.to_dataframe()\n", "all_data.rename(columns={'features': 'text', 'label': 'rating'}, inplace=True)\n", - "all_data.replace({'rating': {'sadness': 0, 'happiness': 1}}, inplace=True)" + "all_data.replace({'rating': {'sadness': 0, 'happiness': 1}}, inplace=True)\n", + "\"\"\"" ] }, { @@ -113,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 3, "metadata": { "collapsed": false, "deletable": true, @@ -148,7 +148,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 4, "metadata": { "collapsed": true, "deletable": true, @@ -163,7 +163,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 5, "metadata": { "collapsed": true, "deletable": true, @@ -187,7 +187,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 6, "metadata": { "collapsed": false, "deletable": true, @@ -216,7 +216,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 7, "metadata": { "collapsed": false, "deletable": true, @@ -230,7 +230,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 8, "metadata": { "collapsed": false, "deletable": true, @@ -478,110 +478,6 @@ " res_file.write(str(history.history))" ] }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": { - "collapsed": false, - "deletable": true, - "editable": true, - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Training model with regularization parameter = 0.0001\n", - "Epoch 1/10\n", - "33s - loss: 3.5155 - acc: 0.5719\n", - "Epoch 2/10\n", - "32s - loss: 3.3546 - acc: 0.5819\n", - "Epoch 3/10\n", - "32s - loss: 3.3257 - acc: 0.5819\n", - "Epoch 4/10\n", - "32s - loss: 3.3131 - acc: 0.5819\n", - "Epoch 5/10\n", - "32s - loss: 3.3049 - acc: 0.5819\n", - "Epoch 6/10\n", - "32s - loss: 3.2991 - acc: 0.5819\n", - "Epoch 7/10\n", - "32s - loss: 3.2944 - acc: 0.5819\n", - "Epoch 8/10\n", - "32s - loss: 3.2905 - acc: 0.5819\n", - "Epoch 9/10\n", - "32s - loss: 3.2875 - acc: 0.5819\n", - "Epoch 10/10\n", - "32s - loss: 3.2847 - acc: 0.5819\n", - "\n", - "\n" - ] - } - ], - "source": [ - "lstm_create_train(1e-4)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": { - "collapsed": false, - "deletable": true, - "editable": true - }, - "outputs": [], - "source": [ - "model = load_model('./lstm_wvec_{}_model.h5'.format(1e-4))" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": { - "collapsed": false, - "deletable": true, - "editable": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2500/2500 [==============================] - 12s \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b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\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\n" - ] - } - ], - "source": [ - "preds = model.predict_classes(test_seq) " - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": { - "collapsed": false, - "deletable": true, - "editable": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "0.58640000000000003" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from sklearn.metrics import accuracy_score\n", - "\n", - "accuracy_score(test_data[LABEL_COL], preds)" - ] - }, { "cell_type": "code", "execution_count": 58, @@ -752,7 +648,9 @@ "cell_type": "code", "execution_count": null, "metadata": { - "collapsed": false + "collapsed": true, + "deletable": true, + "editable": true }, "outputs": [], "source": []