This file contains hidden or 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
| import os | |
| import sys | |
| from sklearn.linear_model import LogisticRegression | |
| from sklearn.feature_extraction.text import CountVectorizer | |
| from sklearn.model_selection import train_test_split | |
| from imblearn.over_sampling import RandomOverSampler | |
| import sklearn.metrics as metrics | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import json |
This file contains hidden or 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
| {"cells":[{"metadata":{},"cell_type":"markdown","source":"# Imports for Python libraries"},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":true},"cell_type":"code","source":"%matplotlib inline\n%config InlineBackend.figure_format = 'retina'\n\nimport numpy as np\nimport torch\nimport torchvision\nimport matplotlib.pyplot as plt\nfrom time import time\nfrom torchvision import datasets, transforms\nfrom torch import nn\nfrom torch import optim","execution_count":1,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Set up the mini-batch size"},{"metadata":{"trusted":true},"cell_type":"code","source":"print(\"Edit code here to change the batch size.\")\nmini_batch_size = 64","execution_count":2,"outputs":[{"output_type":"stream","text":"Edit code here to change the batch size.\n","name":"stdout"}]},{"metadata":{},"cell_type":"markdown","source":"# Download the dataset, pre-process, and divide into mini-batches"},{"metadata" |