{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "LSTM_Attention.ipynb", "provenance": [], "collapsed_sections": [] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" }, "accelerator": "GPU" }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "oQvr9zfcPRi-" }, "source": [ "Contributors: Rohit Singh Rathaur, Girish L.\n", "\n", "Copyright 2021 [Rohit Singh Rathaur, BIT Mesra and Girish L., CIT GUBBI, Karnataka]\n", "\n", "Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n", "\n", "http://www.apache.org/licenses/LICENSE-2.0\n", "Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "YQ6lT1e2hrx4", "outputId": "cb071d50-8fcb-426d-8fa9-6f7033f783d1" }, "source": [ "from google.colab import drive\n", "drive.mount('/content/drive')" ], "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Mounted at /content/drive\n" ] } ] }, { "cell_type": "code", "metadata": { "id": "tLhroy5BnMnC" }, "source": [ "# Importing libraries\n", "import tensorflow as tf\n", "import matplotlib.pyplot as plt\n", "import matplotlib as mpl\n", "import pandas as pd\n", "import numpy as np\n", "import os" ], "execution_count": null, "outputs": [] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 521 }, "id": "2-UpMVsSnfCI", "outputId": "120b11e9-5c7d-4332-d133-9636a8d002aa" }, "source": [ "df_Ellis = pd.read_csv(\"/content/drive/MyDrive/LFN Anuket/Analysis/data/Final/Ellis_FinalTwoConditionwithOR.csv\")\n", "df_Ellis" ], "execution_count": null, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "
\n", " | Timestamp | \n", "ellis-cpu.system_perc | \n", "ellis-cpu.wait_perc | \n", "ellis-load.avg_1_min | \n", "ellis-mem.free_mb | \n", "ellis-net.in_bytes_sec | \n", "ellis-net.out_packets_sec | \n", "Label | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "14-09-2016 0:00 | \n", "0.5 | \n", "12.9 | \n", "1.730 | \n", "3949 | \n", "5413.200 | \n", "62.067 | \n", "1 | \n", "
1 | \n", "14-09-2016 0:00 | \n", "0.4 | \n", "10.3 | \n", "1.790 | \n", "3950 | \n", "5201.667 | \n", "59.567 | \n", "1 | \n", "
2 | \n", "14-09-2016 0:01 | \n", "0.4 | \n", "11.8 | \n", "1.520 | \n", "3950 | \n", "5370.733 | \n", "61.200 | \n", "1 | \n", "
3 | \n", "14-09-2016 0:01 | \n", "0.4 | \n", "12.9 | \n", "1.430 | \n", "3949 | \n", "5292.467 | \n", "60.400 | \n", "1 | \n", "
4 | \n", "14-09-2016 0:02 | \n", "0.5 | \n", "12.1 | \n", "1.440 | \n", "3950 | \n", "5318.167 | \n", "61.700 | \n", "1 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
176995 | \n", "13-12-2016 21:20 | \n", "0.4 | \n", "0.3 | \n", "0.030 | \n", "3484 | \n", "230.967 | \n", "2.167 | \n", "0 | \n", "
176996 | \n", "13-12-2016 21:20 | \n", "0.2 | \n", "0.3 | \n", "0.018 | \n", "3484 | \n", "218.433 | \n", "0.767 | \n", "0 | \n", "
176997 | \n", "13-12-2016 21:21 | \n", "0.6 | \n", "0.3 | \n", "0.010 | \n", "3483 | \n", "160.967 | \n", "1.867 | \n", "0 | \n", "
176998 | \n", "13-12-2016 21:21 | \n", "0.6 | \n", "0.3 | \n", "0.007 | \n", "3484 | \n", "188.367 | \n", "2.100 | \n", "0 | \n", "
176999 | \n", "13-12-2016 21:22 | \n", "0.4 | \n", "0.1 | \n", "0.040 | \n", "3484 | \n", "229.833 | \n", "2.400 | \n", "0 | \n", "
177000 rows × 8 columns
\n", "\n", " | ellis-cpu.wait_perc | \n", "ellis-load.avg_1_min | \n", "ellis-net.in_bytes_sec | \n", "Label | \n", "
---|---|---|---|---|
Timestamp | \n", "\n", " | \n", " | \n", " | \n", " |
14-09-2016 0:00 | \n", "12.9 | \n", "1.73 | \n", "5413.200 | \n", "1 | \n", "
14-09-2016 0:00 | \n", "10.3 | \n", "1.79 | \n", "5201.667 | \n", "1 | \n", "
14-09-2016 0:01 | \n", "11.8 | \n", "1.52 | \n", "5370.733 | \n", "1 | \n", "
14-09-2016 0:01 | \n", "12.9 | \n", "1.43 | \n", "5292.467 | \n", "1 | \n", "
14-09-2016 0:02 | \n", "12.1 | \n", "1.44 | \n", "5318.167 | \n", "1 | \n", "