Created
September 3, 2020 22:02
-
-
Save rakshitraj/97832c36d6cce910d26f1d69b69f47b5 to your computer and use it in GitHub Desktop.
reuters2.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "reuters2.ipynb", | |
"provenance": [], | |
"authorship_tag": "ABX9TyPcxV0fs8TKQSsuitagqt9t", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/rakshitraj/97832c36d6cce910d26f1d69b69f47b5/reuters2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "_1E9Xikx-TXW", | |
"colab_type": "code", | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 36 | |
}, | |
"outputId": "3c240cdb-ec89-4bd7-a670-5d3bc7e49b0d" | |
}, | |
"source": [ | |
"# Number of training Samples\n", | |
"len(train_data)" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"8982" | |
] | |
}, | |
"metadata": { | |
"tags": [] | |
}, | |
"execution_count": 2 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "HoKfxO-0-TXa", | |
"colab_type": "code", | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 36 | |
}, | |
"outputId": "51e6ae1e-50e4-4457-ff50-05f2c61e8d87" | |
}, | |
"source": [ | |
"# Number of testing samples\n", | |
"len(test_data)" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"2246" | |
] | |
}, | |
"metadata": { | |
"tags": [] | |
}, | |
"execution_count": 3 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "XEfBnb9P-TXe", | |
"colab_type": "code", | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 1000 | |
}, | |
"outputId": "55a1c0b7-11c2-4f0e-f89d-55a36d96c178" | |
}, | |
"source": [ | |
"# Check out the first sample\n", | |
"train_data[0]" | |
], | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
"[1,\n", | |
" 2,\n", | |
" 2,\n", | |
" 8,\n", | |
" 43,\n", | |
" 10,\n", | |
" 447,\n", | |
" 5,\n", | |
" 25,\n", | |
" 207,\n", | |
" 270,\n", | |
" 5,\n", | |
" 3095,\n", | |
" 111,\n", | |
" 16,\n", | |
" 369,\n", | |
" 186,\n", | |
" 90,\n", | |
" 67,\n", | |
" 7,\n", | |
" 89,\n", | |
" 5,\n", | |
" 19,\n", | |
" 102,\n", | |
" 6,\n", | |
" 19,\n", | |
" 124,\n", | |
" 15,\n", | |
" 90,\n", | |
" 67,\n", | |
" 84,\n", | |
" 22,\n", | |
" 482,\n", | |
" 26,\n", | |
" 7,\n", | |
" 48,\n", | |
" 4,\n", | |
" 49,\n", | |
" 8,\n", | |
" 864,\n", | |
" 39,\n", | |
" 209,\n", | |
" 154,\n", | |
" 6,\n", | |
" 151,\n", | |
" 6,\n", | |
" 83,\n", | |
" 11,\n", | |
" 15,\n", | |
" 22,\n", | |
" 155,\n", | |
" 11,\n", | |
" 15,\n", | |
" 7,\n", | |
" 48,\n", | |
" 9,\n", | |
" 4579,\n", | |
" 1005,\n", | |
" 504,\n", | |
" 6,\n", | |
" 258,\n", | |
" 6,\n", | |
" 272,\n", | |
" 11,\n", | |
" 15,\n", | |
" 22,\n", | |
" 134,\n", | |
" 44,\n", | |
" 11,\n", | |
" 15,\n", | |
" 16,\n", | |
" 8,\n", | |
" 197,\n", | |
" 1245,\n", | |
" 90,\n", | |
" 67,\n", | |
" 52,\n", | |
" 29,\n", | |
" 209,\n", | |
" 30,\n", | |
" 32,\n", | |
" 132,\n", | |
" 6,\n", | |
" 109,\n", | |
" 15,\n", | |
" 17,\n", | |
" 12]" | |
] | |
}, | |
"metadata": { | |
"tags": [] | |
}, | |
"execution_count": 4 | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment