{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [], "gpuType": "T4" }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" }, "accelerator": "GPU", "gpuClass": "standard" }, "cells": [ { "cell_type": "markdown", "source": [ "#**Install Dependencies and Bring in Data**\n", "\n", "---" ], "metadata": { "id": "gqv0BvJ2kCWE" } }, { "cell_type": "code", "execution_count": 1, "metadata": { "id": "WOYQ9b6teSZ9" }, "outputs": [], "source": [ "import os\n", "import pandas as pd\n", "import tensorflow as tf\n", "import numpy as np" ] }, { "cell_type": "code", "source": [ "df = pd.read_csv('/content/drive/MyDrive/Machine Learning /train.csv/train.csv')" ], "metadata": { "id": "JKNNXSjHe-3g" }, "execution_count": 2, "outputs": [] }, { "cell_type": "code", "source": [ "df.head()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 206 }, "id": "2e5_OlW3j290", "outputId": "631fad8d-6890-457c-98f5-482594b4f04d" }, "execution_count": 3, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " id comment_text toxic \\\n", "0 0000997932d777bf Explanation\\nWhy the edits made under my usern... 0 \n", "1 000103f0d9cfb60f D'aww! He matches this background colour I'm s... 0 \n", "2 000113f07ec002fd Hey man, I'm really not trying to edit war. It... 0 \n", "3 0001b41b1c6bb37e \"\\nMore\\nI can't make any real suggestions on ... 0 \n", "4 0001d958c54c6e35 You, sir, are my hero. Any chance you remember... 0 \n", "\n", " severe_toxic obscene threat insult identity_hate \n", "0 0 0 0 0 0 \n", "1 0 0 0 0 0 \n", "2 0 0 0 0 0 \n", "3 0 0 0 0 0 \n", "4 0 0 0 0 0 " ], "text/html": [ "\n", "
\n", " | id | \n", "comment_text | \n", "toxic | \n", "severe_toxic | \n", "obscene | \n", "threat | \n", "insult | \n", "identity_hate | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "0000997932d777bf | \n", "Explanation\\nWhy the edits made under my usern... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
1 | \n", "000103f0d9cfb60f | \n", "D'aww! He matches this background colour I'm s... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
2 | \n", "000113f07ec002fd | \n", "Hey man, I'm really not trying to edit war. It... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
3 | \n", "0001b41b1c6bb37e | \n", "\"\\nMore\\nI can't make any real suggestions on ... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
4 | \n", "0001d958c54c6e35 | \n", "You, sir, are my hero. Any chance you remember... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "