{ "cells": [ { "cell_type": "code", "execution_count": 78, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 96, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"./bbc_data.csv\")\n" ] }, { "cell_type": "code", "execution_count": 97, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | data | \n", "labels | \n", "
|---|---|---|
| 0 | \n", "Musicians to tackle US red tape Musicians gro... | \n", "entertainment | \n", "
| 1 | \n", "U2s desire to be number one U2, who have won ... | \n", "entertainment | \n", "
| 2 | \n", "Rocker Doherty in on-stage fight Rock singer ... | \n", "entertainment | \n", "
| 3 | \n", "Snicket tops US box office chart The film ada... | \n", "entertainment | \n", "
| 4 | \n", "Oceans Twelve raids box office Oceans Twelve,... | \n", "entertainment | \n", "
| ... | \n", "... | \n", "... | \n", "
| 2220 | \n", "Warning over Windows Word files Writing a Mic... | \n", "tech | \n", "
| 2221 | \n", "Fast lifts rise into record books Two high-sp... | \n", "tech | \n", "
| 2222 | \n", "Nintendo adds media playing to DS Nintendo is... | \n", "tech | \n", "
| 2223 | \n", "Fast moving phone viruses appear Security fir... | \n", "tech | \n", "
| 2224 | \n", "Hacker threat to Apples iTunes Users of Apple... | \n", "tech | \n", "
2225 rows × 2 columns
\n", "LogisticRegression()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LogisticRegression()