{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Importing Essential libraries : \n", "import pandas as pd\n", "# import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Category | \n", "Message | \n", "
---|---|---|
0 | \n", "ham | \n", "Go until jurong point, crazy.. Available only ... | \n", "
1 | \n", "ham | \n", "Ok lar... Joking wif u oni... | \n", "
2 | \n", "spam | \n", "Free entry in 2 a wkly comp to win FA Cup fina... | \n", "
3 | \n", "ham | \n", "U dun say so early hor... U c already then say... | \n", "
4 | \n", "ham | \n", "Nah I don't think he goes to usf, he lives aro... | \n", "
\n", " | Category | \n", "Message | \n", "Spam | \n", "
---|---|---|---|
0 | \n", "ham | \n", "Go until jurong point, crazy.. Available only ... | \n", "0 | \n", "
1 | \n", "ham | \n", "Ok lar... Joking wif u oni... | \n", "0 | \n", "
2 | \n", "spam | \n", "Free entry in 2 a wkly comp to win FA Cup fina... | \n", "1 | \n", "
3 | \n", "ham | \n", "U dun say so early hor... U c already then say... | \n", "0 | \n", "
4 | \n", "ham | \n", "Nah I don't think he goes to usf, he lives aro... | \n", "0 | \n", "
Pipeline(steps=[('vectorizer', CountVectorizer()), ('nb', MultinomialNB())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Pipeline(steps=[('vectorizer', CountVectorizer()), ('nb', MultinomialNB())])
CountVectorizer()
MultinomialNB()