{ "cells": [ { "cell_type": "markdown", "id": "8b6e1cdd-b14e-4368-bdbb-9bf7ab821791", "metadata": {}, "source": [ "# Scikit-learn Logistic Regression Model" ] }, { "cell_type": "code", "execution_count": 1, "id": "c2a72242-6197-4bef-aa05-696a152350d5", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "100% | 80.23 MB | 4.37 MB/s | 18.38 sec elapsed" ] } ], "source": [ "!python download-prepare-dataset.py" ] }, { "cell_type": "code", "execution_count": 14, "id": "69f32433-e19c-4066-b806-8f30b408107f", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "\n", "train_df = pd.read_csv(\"train.csv\")\n", "val_df = pd.read_csv(\"validation.csv\")\n", "test_df = pd.read_csv(\"test.csv\")" ] }, { "cell_type": "code", "execution_count": 16, "id": "0808b212-fe91-48d9-80b8-55519f8835d5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | text | \n", "label | \n", "
---|---|---|
0 | \n", "The only reason I saw \"Shakedown\" was that it ... | \n", "0 | \n", "
1 | \n", "This is absolute drivel, designed to shock and... | \n", "0 | \n", "
2 | \n", "Lots of scenes and dialogue are flat-out goofy... | \n", "1 | \n", "
3 | \n", "** and 1/2 stars out of **** Lifeforce is one ... | \n", "1 | \n", "
4 | \n", "I learned a thing: you have to take this film ... | \n", "1 | \n", "