{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "3aed8aec", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2021-09-27 15:31:30.518074: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1\n" ] } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "import datetime\n", "import time,pdb\n", "import json\n", "import random\n", "import statistics\n", "import matplotlib.pyplot as plt\n", "\n", "import tensorflow as tf\n", "from tensorflow import keras\n", "from sklearn import svm\n", "from sklearn.model_selection import GridSearchCV \n", "from sklearn.ensemble import RandomForestClassifier\n", "from sklearn.metrics import accuracy_score\n", "from tensorflow.keras.layers import *\n", "from sklearn.model_selection import train_test_split\n", "from tensorflow.keras.models import Sequential\n", "from tensorflow.keras.optimizers import *\n", "from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, Callback\n", "from tensorflow.keras.preprocessing.sequence import pad_sequences\n", "from sklearn.neighbors import KNeighborsClassifier\n", "from sklearn.metrics import mean_squared_error\n", "from sklearn.metrics import accuracy_score\n", "import tqdm\n", "from multiprocessing import Pool\n", "import os\n", "from tensorflow.compat.v1.keras.layers import Bidirectional, CuDNNLSTM" ] }, { "cell_type": "code", "execution_count": 18, "id": "817f7108", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "available PIDs [ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.]\n", "available TaskIDs [0. 1. 2. 3. 4. 5. 6.]\n" ] }, { "data": { "text/html": [ "
\n", " | Timestamp | \n", "Event | \n", "TaskID | \n", "Part | \n", "PID | \n", "TextRule | \n", "Rule | \n", "Type | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "1.575388e+12 | \n", "4 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "{'Title': ['1', 'Indent', 'and', 'Italic'], 'S... | \n", "3.0 | \n", "Cmd | \n", "
1 | \n", "1.575388e+12 | \n", "1 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "{'Title': ['1', 'Indent', 'and', 'Italic'], 'S... | \n", "3.0 | \n", "Toolbar | \n", "
2 | \n", "1.575388e+12 | \n", "1 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "{'Title': ['1', 'Indent', 'and', 'Italic'], 'S... | \n", "3.0 | \n", "Cmd | \n", "
3 | \n", "1.575388e+12 | \n", "4 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "{'Title': ['1', 'Indent', 'and', 'Italic'], 'S... | \n", "3.0 | \n", "Cmd | \n", "
4 | \n", "1.575388e+12 | \n", "4 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "{'Title': ['1', 'Indent', 'and', 'Italic'], 'S... | \n", "3.0 | \n", "Cmd | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
8376 | \n", "1.603898e+12 | \n", "7 | \n", "6.0 | \n", "5.0 | \n", "16.0 | \n", "{'Title': ['Size', 'Big'], 'Subtitle': ['Bold'... | \n", "5.0 | \n", "Toolbar | \n", "
8377 | \n", "1.603898e+12 | \n", "2 | \n", "6.0 | \n", "5.0 | \n", "16.0 | \n", "{'Title': ['Size', 'Big'], 'Subtitle': ['Bold'... | \n", "5.0 | \n", "Cmd | \n", "
8378 | \n", "1.603898e+12 | \n", "2 | \n", "6.0 | \n", "5.0 | \n", "16.0 | \n", "{'Title': ['Size', 'Big'], 'Subtitle': ['Bold'... | \n", "5.0 | \n", "Cmd | \n", "
8379 | \n", "1.603898e+12 | \n", "6 | \n", "6.0 | \n", "5.0 | \n", "16.0 | \n", "{'Title': ['Size', 'Big'], 'Subtitle': ['Bold'... | \n", "5.0 | \n", "Toolbar | \n", "
8380 | \n", "1.603898e+12 | \n", "6 | \n", "6.0 | \n", "5.0 | \n", "16.0 | \n", "{'Title': ['Size', 'Big'], 'Subtitle': ['Bold'... | \n", "5.0 | \n", "Toolbar | \n", "
8381 rows × 8 columns
\n", "