{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%run loadmlfuncs.py" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Naive Bayes\n", "\n", "Naive Bayes models are a group of extremely fast and simple classification algorithms that are often suitable for very high-dimensional datasets. Because they are so fast and have so few tunable parameters, they end up being very useful as a quick-and-dirty baseline for a classification problem. This section will focus on an intuitive explanation of how naive Bayes classifiers work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bayesian Classification\n", "\n", "Naive Bayes classifiers are built on Bayesian classification methods. These rely on Bayes's theorem, which is an equation describing the relationship of conditional probabilities of statistical quantities. \n", "\n", "In Bayesian classification, we're interested in finding the probability of a label given some observed features, which we can write as $P(C~|~{\\rm features})$. Bayes's theorem tells us how to express this in terms of quantities we can compute more directly:\n", "\n", "$$\n", "P(C~|~{\\rm features}) = \\frac{P({\\rm features}~|~C)P(C)}{P({\\rm features})}\n", "$$\n", "\n", "If we are trying to decide between two labels — let's call them $C_1$ and $C_2$ — then one way to make this decision is to compute the ratio of the posterior probabilities for each label:\n", "\n", "$$\n", "\\frac{P(C_1~|~{\\rm features})}{P(C_2~|~{\\rm features})} = \\frac{P({\\rm features}~|~C_1)}{P({\\rm features}~|~C_2)}\\frac{P(C_1)}{P(C_2)}\n", "$$\n", "\n", "All we need now is some model by which we can compute $P({\\rm features}~|~C_i)$ for each label. Such a model is called a *generative model* because it specifies the hypothetical random process that generates the data.\n", "\n", "Specifying this generative model for each label is the main piece of the training of such a Bayesian classifier. The general version of such a training step is a very difficult task, but we can make it simpler through the use of some simplifying assumptions about the form of this model.\n", "\n", "This is where the \"naive\" in \"naive Bayes\" comes in: if we make very naive assumptions about the generative model for each label, we can find a rough approximation of the generative model for each class, and then proceed with the Bayesian classification." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bernoulli Naive Bayes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There are 856 people who have either tried or not tried a company's new frozen lasagna product. The data includes the categorical dependent variable `tried` and several other explanatory variables." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ageweightincomecar_valuedebtmall_tripsgenderalonedwellpay_typenbhdtried
person
14817565500219035107MaleNoHomeHourlyEastNo
2332022910021107404FemaleNoCondoHourlyEastYes
3511883220051409101MaleNoCondoSalariedEastNo
4562441900070016203FemaleNoHomeHourlyWestNo
52821881400266206003MaleNoAptSalariedWestYes
\n", "
" ], "text/plain": [ " age weight income car_value debt mall_trips gender alone dwell \\\n", "person \n", "1 48 175 65500 2190 3510 7 Male No Home \n", "2 33 202 29100 2110 740 4 Female No Condo \n", "3 51 188 32200 5140 910 1 Male No Condo \n", "4 56 244 19000 700 1620 3 Female No Home \n", "5 28 218 81400 26620 600 3 Male No Apt \n", "\n", " pay_type nbhd tried \n", "person \n", "1 Hourly East No \n", "2 Hourly East Yes \n", "3 Salaried East No \n", "4 Hourly West No \n", "5 Salaried West Yes " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_lasagna = pd.read_csv(dataurl+'lasagna.csv', header=0, index_col='person')\n", "df_lasagna.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For the Naive Bayes method, numeric predictors must be binned, i.e., made categorical. For this example, each numeric variable has been binned by its quartiles as shown below." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ageweightincomecar_valuedebtmall_trips
0.0022.0142.02600.0130.00.00.0
0.2531.0174.024475.02110.0560.03.0
0.5037.5190.039950.04175.01020.04.0
0.7546.0210.058225.07717.51972.57.0
1.0064.0258.0190500.033870.08960.017.0
\n", "
" ], "text/plain": [ " age weight income car_value debt mall_trips\n", "0.00 22.0 142.0 2600.0 130.0 0.0 0.0\n", "0.25 31.0 174.0 24475.0 2110.0 560.0 3.0\n", "0.50 37.5 190.0 39950.0 4175.0 1020.0 4.0\n", "0.75 46.0 210.0 58225.0 7717.5 1972.5 7.0\n", "1.00 64.0 258.0 190500.0 33870.0 8960.0 17.0" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_quantile = df_lasagna.quantile([0, .25, .5, .75, 1])\n", "df_quantile" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ageweightincomecar_valuedebtmall_tripsgenderalonedwellpay_typenbhdtried
person
1313133MaleNoHomeHourlyEastNo
2121112FemaleNoCondoHourlyEastYes
3311210MaleNoCondoSalariedEastNo
4330021FemaleNoHomeHourlyWestNo
5033311MaleNoAptSalariedWestYes
\n", "
" ], "text/plain": [ " age weight income car_value debt mall_trips gender alone dwell \\\n", "person \n", "1 3 1 3 1 3 3 Male No Home \n", "2 1 2 1 1 1 2 Female No Condo \n", "3 3 1 1 2 1 0 Male No Condo \n", "4 3 3 0 0 2 1 Female No Home \n", "5 0 3 3 3 1 1 Male No Apt \n", "\n", " pay_type nbhd tried \n", "person \n", "1 Hourly East No \n", "2 Hourly East Yes \n", "3 Salaried East No \n", "4 Hourly West No \n", "5 Salaried West Yes " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "for col in df_lasagna.columns:\n", " if df_lasagna[col].dtypes == 'int64': \n", " df_lasagna[col] = pd.cut(df_lasagna[col], bins=round(df_quantile[col])-[1,1,1,1,0], labels=False)\n", "df_lasagna.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We partition data into training and testing datasets." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "df_lasagna_train = df_lasagna.iloc[:700]\n", "df_lasagna_test = df_lasagna.iloc[700:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We fit a frequency count based on the training data, which provides the probability of a feature given an individual's class. For example, person 1 has value 'No' for `tried` and has dwell 'Home'. We obtain a probability\n", "\n", "\\begin{align}\n", "p(\\text{dwell $=$ 'Home'}|\\text{No}) = \\frac{\\text{# of persons whose dwell $=$ 'Home' and tried $=$ 'No'}}{\\text{# of persons whose tried $=$ 'No'}} = 0.468 \\nonumber\n", "\\end{align}\n", "\n", "The value ('No', 'Home'): 0.468 shows that, if a customer did not try the lasagna product, the probability of his/her dwell type being Home is 0.468." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "scrolled": true }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e84b3ba10ec84e25b681828afaa4847b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "interactive(children=(Dropdown(description='column:', index=8, options=('age', 'weight', 'income', 'car_value'…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "def frequency_count(col, normalize):\n", " return dict(df_lasagna_train.groupby('tried')[col].value_counts(normalize=normalize))\n", "\n", "interact(frequency_count,\n", " col=widgets.Dropdown(options=df_lasagna_train.columns, value='dwell', description='column:',disabled=False),\n", " normalize=widgets.Checkbox(value=True, description='normalize',disabled=False)\n", " );" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Similarly, we can calculate\n", "\n", "\\begin{align}\n", "p(\\text{dwell $=$ 'Home'}|\\text{Yes}), p(\\text{age = '3'}|\\text{No}), p(\\text{income = '2'}|\\text{Yes}), \\nonumber\n", "\\end{align}\n", "\n", "and so on. In summary, we have $p(\\text{feature}|\\text{No})$ and $p(\\text{feature}|\\text{Yes})$ for each possible feature of customers, which can be considered as a feature dictionary.\n", "\n", "With this feature dictionary, we want to obtain probabilities\n", "\\begin{align}\n", "p(\\text{person 1}|\\text{No}) \\text{ and } p(\\text{person 1}|\\text{Yes}) \\nonumber\n", "\\end{align}\n", "\n", "where the probability $p(\\text{person 1}|\\text{No})$ can be interpret as\n", "\n", "- if a person did not want to try the lasagna product, s/he has probability $p(\\text{person 1}|\\text{No})$ being person 1.\n", "\n", "Then our prediction is as simple as follows\n", "\n", "- If $p(\\text{person 1}|\\text{No}) > p(\\text{person 1}|\\text{Yes})$ then we prediction the person will **not** try the lasagna production\n", "\n", "- Otherwise, we prediction the person will try the lasagna production.\n", "\n", "Here is how probabilities\n", "\\begin{align}\n", "p(\\text{person 1}|\\text{No}) \\text{ and } p(\\text{person 1}|\\text{Yes}) \\nonumber\n", "\\end{align}\n", "\n", "are derived. For example, for the first person\n", "\n", "\\begin{align}\n", "p(\\text{person 1}|\\text{No}) = & p(\\text{age}=3|\\text{No}) \\times p(\\text{weight}=1|\\text{No}) \\times \\cdots \\times\\nonumber \\\\\n", "& p(\\text{pay_type $=$ hourly}|\\text{No}) \\times p(\\text{nbhd $=$ East}|\\text{No}) \\nonumber\n", "\\end{align}\n", "\n", "and\n", "\n", "\\begin{align}\n", "p(\\text{person 1}|\\text{Yes}) = & p(\\text{age}=3|\\text{Yes}) \\times p(\\text{weight}=1|\\text{Yes}) \\times \\cdots \\times \\nonumber \\\\\n", "& p(\\text{pay_type $=$ hourly}|\\text{Yes}) \\times p(\\text{nbhd $=$ East}|\\text{Yes}) \\nonumber\n", "\\end{align}\n", "\n", "Note that we assume all the features are independent so that a simple multiplication can be applied (that is why this method is called naive). Thus, $p(\\text{person 1}|\\text{No})$ is the probability to have the exactly same features as person 1 if a random person did not want to try the lasagna product." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ageweightincomecar_valuedebtmall_tripsgenderalonedwellpay_typenbhdtriedprediction
person
1313133MaleNoHomeHourlyEastNoYes
2121112FemaleNoCondoHourlyEastYesNo
3311210MaleNoCondoSalariedEastNoNo
4330021FemaleNoHomeHourlyWestNoNo
5033311MaleNoAptSalariedWestYesYes
\n", "
" ], "text/plain": [ " age weight income car_value debt mall_trips gender alone dwell \\\n", "person \n", "1 3 1 3 1 3 3 Male No Home \n", "2 1 2 1 1 1 2 Female No Condo \n", "3 3 1 1 2 1 0 Male No Condo \n", "4 3 3 0 0 2 1 Female No Home \n", "5 0 3 3 3 1 1 Male No Apt \n", "\n", " pay_type nbhd tried prediction \n", "person \n", "1 Hourly East No Yes \n", "2 Hourly East Yes No \n", "3 Salaried East No No \n", "4 Hourly West No No \n", "5 Salaried West Yes Yes " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def predict(df):\n", " df['prediction'] = ['No' \n", " if np.prod([frequency_count(col, True)[('No',df.iloc[row][col])]\n", " for col in df.columns if col not in ['tried','prediction']]) > \\\n", " np.prod([frequency_count(col, True)[('Yes',df.iloc[row][col])]\n", " for col in df.columns if col not in ['tried','prediction']])\\\n", " else 'Yes'\n", " for row in range(df.shape[0])]\n", "\n", "predict(df_lasagna_train)\n", "df_lasagna_train.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The classification matrix of training data is" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
triedNoYes
prediction
No25081
Yes49320
\n", "
" ], "text/plain": [ "tried No Yes\n", "prediction \n", "No 250 81\n", "Yes 49 320" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_lasagna_train.groupby(['prediction','tried']).size().unstack(level=1, fill_value=0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The feature dictionary can be used in testing data and its classification matrix is" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
triedNoYes
prediction
No5621
Yes673
\n", "
" ], "text/plain": [ "tried No Yes\n", "prediction \n", "No 56 21\n", "Yes 6 73" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "predict(df_lasagna_test)\n", "df_lasagna_test.groupby(['prediction','tried']).size().unstack(level=1, fill_value=0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Multinomial Naive Bayes\n", "\n", "In multinomial naive Bayes, the features are assumed to be generated from a simple multinomial distribution. \n", "\n", "The multinomial distribution describes the probability of observing counts among a number of categories, and thus multinomial naive Bayes is most appropriate for features that represent counts or count rates.\n", "\n", "The idea is precisely the same as before, except that instead of modeling the data distribution with the best-fit Gaussian, we model the data distribution with a best-fit multinomial distribution." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example: Classifying Text\n", "\n", "One place where multinomial naive Bayes is often used is in text classification, where the features are related to word counts or frequencies within the documents to be classified.\n", "\n", "Here we will use the sparse word count features from the 20 Newsgroups corpus to show how we might classify these short documents into categories." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['alt.atheism',\n", " 'comp.graphics',\n", " 'comp.os.ms-windows.misc',\n", " 'comp.sys.ibm.pc.hardware',\n", " 'comp.sys.mac.hardware',\n", " 'comp.windows.x',\n", " 'misc.forsale',\n", " 'rec.autos',\n", " 'rec.motorcycles',\n", " 'rec.sport.baseball',\n", " 'rec.sport.hockey',\n", " 'sci.crypt',\n", " 'sci.electronics',\n", " 'sci.med',\n", " 'sci.space',\n", " 'soc.religion.christian',\n", " 'talk.politics.guns',\n", " 'talk.politics.mideast',\n", " 'talk.politics.misc',\n", " 'talk.religion.misc']" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from sklearn.datasets import fetch_20newsgroups\n", "\n", "data = fetch_20newsgroups()\n", "display(data.target_names)\n", "\n", "# choose a subset categories to learn\n", "categories = ['talk.religion.misc', \n", " 'soc.religion.christian',\n", " 'sci.space',\n", " 'comp.graphics']\n", "\n", "train = fetch_20newsgroups(subset='train', categories=categories)\n", "test = fetch_20newsgroups(subset='test', categories=categories)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is a representative entry from the data:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "From: dmcgee@uluhe.soest.hawaii.edu (Don McGee)\n", "Subject: Federal Hearing\n", "Originator: dmcgee@uluhe\n", "Organization: School of Ocean and Earth Science and Technology\n", "Distribution: usa\n", "Lines: 10\n", "\n", "\n", "Fact or rumor....? Madalyn Murray O'Hare an atheist who eliminated the\n", "use of the bible reading and prayer in public schools 15 years ago is now\n", "going to appear before the FCC with a petition to stop the reading of the\n", "Gospel on the airways of America. And she is also campaigning to remove\n", "Christmas programs, songs, etc from the public schools. If it is true\n", "then mail to Federal Communications Commission 1919 H Street Washington DC\n", "20054 expressing your opposition to her request. Reference Petition number\n", "\n", "2493.\n", "\n" ] } ], "source": [ "print(train.data[5])" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhE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snAXh5k15IyImAp0AHYArgeuyzbSksEF2swaUt3fvCtwfUQ8DLTMMM8SwwXazBrysaQbgH7A45Ja4dpRFh5mZ2b1ktQG2AkYHxHvSloV2DQiBmccrclzgTYzyyl/TDEzyykXaDOznHKBNisxSctIOq6Er3+opKsbWOdsSaf8yNed3vBaVkou0GaltwxQa4GW1KzMWawRcYE2K70LgXUljZV0iaTekp6TdBcwXlJHSa9XryzpFElnp7fXlfSkpFcl/UfShvVtSNLukl6RNEbSM5JWrvHwZpKelfSupCNrPGeApJGSXpP01+Luui0On+ptVnqnAptERGcASb2BLdNlEyV1rOe5NwLHpMPbtgKuBfrUs/6LQPeICElHAH8E/pA+1gnoDrQFxkh6jOQU7vXSPAIekdQrIoYu0p5aUblAm2VjRERMrG8FSe1I5r24X1L14lYNvO5PgHvTscotgZrbeDgivge+l/QcSVHuCewIjEnXaUdSsF2gc8AF2iwbM2rcnsP83Y2t0+8VwDfVLe8CXQX8X0Q8krbUz67x2IInPQRJq/lvEXHDj9iGlYn7oM1KbxrQvp7HPwNWkrR8ehr1bgDpBEUTJe0LoERDk+QvDXyc3j5kgcd+Kam1pOWB3sBI4CngN2lrHUmrS1qp8F2zUnIL2qzEIuJLSS+lBwKfAB5b4PHZks4BXiHpknirxsMHANdJOp3kslP3AOPq2dzZJF0iHwPDgbVrPDYi3faawLkR8QnwiaSfAS+n3SjTgQOBzxdxd62IfKq3mVlOuYvDzCynXKDNzHLKBdrMLKdcoM3McsoF2swsp1ygzcxyygXazCynXKDNzHLq/wFIhvWZXoFMdQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "from sklearn.feature_extraction.text import TfidfVectorizer\n", "from sklearn.naive_bayes import MultinomialNB\n", "from sklearn.pipeline import make_pipeline\n", "from sklearn.metrics import confusion_matrix\n", "\n", "# Fit the model and show the classification matrix\n", "#convert the content of each string into a vector of numbers\n", "model = make_pipeline(TfidfVectorizer(), MultinomialNB()) \n", "model.fit(train.data, train.target)\n", "labels = model.predict(test.data)\n", "mat = confusion_matrix(test.target, labels)\n", "sns.heatmap(mat.T, square=True, annot=True, fmt='d', cbar=False,\n", " xticklabels=train.target_names, yticklabels=train.target_names)\n", "plt.xlabel('true label')\n", "plt.ylabel('predicted label');\n", "\n", "def predict_category(s, train=train, model=model):\n", " pred = model.predict([s])\n", " return train.target_names[pred[0]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Evidently, even this very simple classifier can successfully separate space talk from computer talk, but it gets confused between talk about religion and talk about Christianity. This is perhaps an expected area of confusion!\n", "\n", "The very cool thing here is that we now have the tools to determine the category for any string, using the predict() method of this pipeline. Here's a quick utility function that will return the prediction for a single string:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'soc.religion.christian'" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "predict_category('discussing islam vs atheism')" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'comp.graphics'" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "predict_category('determining the screen resolution')" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'sci.space'" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "predict_category('sending a payload to the ISS')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## When to Use Naive Bayes\n", "Because naive Bayesian classifiers make such stringent assumptions about data, they will generally not perform as well as a more complicated model. That said, they have several advantages:\n", "\n", "- They are extremely fast for both training and prediction\n", "\n", "- They provide straightforward probabilistic prediction\n", "\n", "- They are often very easily interpretable\n", "\n", "- They have very few (if any) tunable parameters\n", "\n", "These advantages mean a naive Bayesian classifier is often a good choice as an initial baseline classification." ] } ], "metadata": { "hide_input": false, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "02ac26b46a814828a9b81f8972dbdec4": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "030c487009d1410d8ced064dd107565d": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_3b8552f9a2824a95bdb5ea78b829ee67", "outputs": [ { "data": { "text/plain": "{('No', 'Home'): 0.4682274247491639,\n ('No', 'Condo'): 0.3010033444816054,\n ('No', 'Apt'): 0.23076923076923078,\n ('Yes', 'Home'): 0.4463840399002494,\n ('Yes', 'Apt'): 0.2817955112219451,\n ('Yes', 'Condo'): 0.2718204488778055}" }, "metadata": {}, "output_type": "display_data" } ] } }, "0805c7226a944433b98e728a24de7ea8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "088e80d27aa94dc5845bae94e1ba505c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "Column:", "index": 10, "layout": "IPY_MODEL_c1fdc4bd8e414f5eba6b721dd735eaec", "style": "IPY_MODEL_78ec677b4ffd43999ab44d7173b2b98d" } }, "088eef9a400947bb8f1bd62367c8414a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "09372641f0eb4e51a972acf2a2edd5ab": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "column:", "index": 8, "layout": "IPY_MODEL_eb8e6a4e902944fb8ae7a8a8be64d533", "style": "IPY_MODEL_c895cab4be9c4e2d9b4bd8677f48eb8f" } }, "09b6385c4d72409ba9c41edacf6bf19e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried" ], "description": "column:", "index": 8, "layout": "IPY_MODEL_985e9fb6d82a4a12a5879fa92fb7ee4c", "style": "IPY_MODEL_fa27574bc79f4dd086783fe3a330cfe5" } }, "0e5e5d3db5a94ca5be9f31b97541103e": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_5d70dac643644120a45f9e9b7d1c65e1", "outputs": [ { "data": { "text/plain": "{('No', 0): 114,\n ('No', 1): 84,\n ('No', 2): 60,\n ('No', 3): 41,\n ('Yes', 3): 133,\n ('Yes', 2): 118,\n ('Yes', 1): 96,\n ('Yes', 0): 54}" }, "metadata": {}, "output_type": "display_data" } ] } }, "11f30440d26e49aa897d4ca9450b4b1c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "144c023c6db448e4900de9b761cf3d72": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "1cda8df16a4b4528ad5d3ae8cd4ddffe": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "normalize", "disabled": false, "layout": "IPY_MODEL_02ac26b46a814828a9b81f8972dbdec4", "style": "IPY_MODEL_cc655065fa1049d299b25adf9c0cbaaf", "value": true } }, "270809a559ab4649ab560cb5df432a5a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "2996961fca8f4a8ab512f184a1a4aa27": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_3efeb61257ac496282bd1937d7bb8967", "IPY_MODEL_642d0764a4894e73900e4c3ab936de3d" ], "layout": "IPY_MODEL_ff11d81ca5094e0a9e39eaee11232930" } }, "2a72908e9f86469381708572f49031f3": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "2d78545b9cac485eb3f5dd443add87f8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "39b23b35de654b61b0e337f7143f1994": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "normalize", "disabled": false, "layout": "IPY_MODEL_b3c811a701d54294bc88364048ce1c35", "style": "IPY_MODEL_88f062c326c64eaea7096b150784fc98", "value": true } }, "3b8552f9a2824a95bdb5ea78b829ee67": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "3c53e85e17a0446ca9c55e0b2dcde09a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "3efeb61257ac496282bd1937d7bb8967": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "Column:", "index": 0, "layout": "IPY_MODEL_cd750e09a5164090945128e2ca4a7dc5", "style": "IPY_MODEL_eb27b3528d114714947314686216cd37" } }, "47a18e42bd944e718eef3d006b88cadc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried" ], "description": "column:", "index": 8, "layout": "IPY_MODEL_0805c7226a944433b98e728a24de7ea8", "style": "IPY_MODEL_4a001a68e9884711837d7dd083b21c92" } }, "4a001a68e9884711837d7dd083b21c92": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "4a6b7e7cb6454ac8b7c9e2d7f91a5822": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "4dbf12a6fd314bc78df778c0482c909a": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_aa296f6feae644168faf07401265e631", "outputs": [ { "data": { "text/plain": "{('No', 'Home'): 0.4682274247491639,\n ('No', 'Condo'): 0.3010033444816054,\n ('No', 'Apt'): 0.23076923076923078,\n ('Yes', 'Home'): 0.4463840399002494,\n ('Yes', 'Apt'): 0.2817955112219451,\n ('Yes', 'Condo'): 0.2718204488778055}" }, "metadata": {}, "output_type": "display_data" } ] } }, "4e2ec3e6a3bc463bbfcad8374163f0bc": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "5a74a4e44b3e4dc7aefdc49c2353bab8": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_09372641f0eb4e51a972acf2a2edd5ab", "IPY_MODEL_b21f64157ea84696b46fb2d5b8b7194a", "IPY_MODEL_e8e75fbeecf64b1ea52b5042160f7512" ], "layout": "IPY_MODEL_f6055c98e8d94d229f27f3b524db9478" } }, "5d70dac643644120a45f9e9b7d1c65e1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "5ec1d2f33c8a4188b69629a028b84ff1": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_9431d8c583cf42308c2aabf9bc75dd6b", "IPY_MODEL_67d6b88db7f24e16965191027c13da78" ], "layout": "IPY_MODEL_72f1ecfe3218403792b0a794fa6c056a" } }, "642d0764a4894e73900e4c3ab936de3d": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_6e618252456c4b19b326e7ce3c8c113b", "outputs": [ { "ename": "TypeError", "evalue": "'dict' object is not callable", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m~\\AppData\\Local\\Continuum\\anaconda3\\envs\\bzan\\lib\\site-packages\\ipywidgets\\widgets\\interaction.py\u001b[0m in \u001b[0;36mupdate\u001b[1;34m(self, *args)\u001b[0m\n\u001b[0;32m 249\u001b[0m \u001b[0mvalue\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mwidget\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_interact_value\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 250\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mwidget\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_kwarg\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 251\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 252\u001b[0m \u001b[0mshow_inline_matplotlib_plots\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 253\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mauto_display\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mresult\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mTypeError\u001b[0m: 'dict' object is not callable" ] } ] } }, "65102e81de1244b5a21117766cd32a9b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "67d6b88db7f24e16965191027c13da78": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_b4328f18e86e4d72a4068793c13ece74", "outputs": [ { "ename": "TypeError", "evalue": "'dict' object is not callable", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m~\\AppData\\Local\\Continuum\\anaconda3\\envs\\bzan\\lib\\site-packages\\ipywidgets\\widgets\\interaction.py\u001b[0m in \u001b[0;36mupdate\u001b[1;34m(self, *args)\u001b[0m\n\u001b[0;32m 249\u001b[0m \u001b[0mvalue\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mwidget\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_interact_value\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 250\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mwidget\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_kwarg\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 251\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mresult\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mf\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m**\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 252\u001b[0m \u001b[0mshow_inline_matplotlib_plots\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 253\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mauto_display\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mresult\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mTypeError\u001b[0m: 'dict' object is not callable" ] } ] } }, "699e5a8612e0429b8e7efe5c65e303ee": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "69fadb5f1be144aca26068b917e484cb": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "6e618252456c4b19b326e7ce3c8c113b": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "7131ec3ca9be4eea9005b10690209803": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_e85bff0461da470d83ad7ce1056fa4e9", "outputs": [ { "data": { "text/plain": "{('No', 'Home'): 0.4682274247491639,\n ('No', 'Condo'): 0.3010033444816054,\n ('No', 'Apt'): 0.23076923076923078,\n ('Yes', 'Home'): 0.4463840399002494,\n ('Yes', 'Apt'): 0.2817955112219451,\n ('Yes', 'Condo'): 0.2718204488778055}" }, "metadata": {}, "output_type": "display_data" } ] } }, "72f1ecfe3218403792b0a794fa6c056a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "751f3f104ed741cf8219e833a390bc0e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "normalize", "disabled": false, "layout": "IPY_MODEL_afcc7df3490345be88c1139c9711bd3a", "style": "IPY_MODEL_c8682019f5fe47fdbc64c0fc3f5edaac", "value": true } }, "76247d988f024141ad8c6b4c4f2acae2": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_4a6b7e7cb6454ac8b7c9e2d7f91a5822", "outputs": [ { "data": { "text/plain": "{('No', 'No'): 271, ('No', 'Yes'): 28, ('Yes', 'No'): 306, ('Yes', 'Yes'): 95}" }, "metadata": {}, "output_type": "display_data" } ] } }, "764e1914c53d40f3a26c342600141489": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_ed1b5a26f6f243daa0246888d8869c1c", "IPY_MODEL_76247d988f024141ad8c6b4c4f2acae2" ], "layout": "IPY_MODEL_270809a559ab4649ab560cb5df432a5a" } }, "78ec677b4ffd43999ab44d7173b2b98d": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "7b411561029345079a41649012effcb0": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "Column:", "index": 0, "layout": "IPY_MODEL_2d78545b9cac485eb3f5dd443add87f8", "style": "IPY_MODEL_d78cdb09f41a43758b95b09831cd9835" } }, "7d4de20a63604446acd409ff62f1c238": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_088e80d27aa94dc5845bae94e1ba505c", "IPY_MODEL_de09e4d8e77a4f3bad53753e5d0a7cfd" ], "layout": "IPY_MODEL_b87eebbeb0c04c54af3cedca133b8870" } }, "8291685d395749cb9a6d3759d17a6c77": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "88f062c326c64eaea7096b150784fc98": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "8fc99cc858434a259e2fec8ea0cea8b7": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "9431d8c583cf42308c2aabf9bc75dd6b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "Column:", "index": 0, "layout": "IPY_MODEL_8291685d395749cb9a6d3759d17a6c77", "style": "IPY_MODEL_088eef9a400947bb8f1bd62367c8414a" } }, "985e9fb6d82a4a12a5879fa92fb7ee4c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "9b3fbd23673b447cad9edf34b06f024c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "a1302bbf978c469382d4c47f8e6591a6": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_e789edfeedd34d74b9b6ac28872c83ce", "IPY_MODEL_751f3f104ed741cf8219e833a390bc0e", "IPY_MODEL_7131ec3ca9be4eea9005b10690209803" ], "layout": "IPY_MODEL_69fadb5f1be144aca26068b917e484cb" } }, "aa296f6feae644168faf07401265e631": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "aeba3057a6b24107831fd5b470a04517": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "afcc7df3490345be88c1139c9711bd3a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b21f64157ea84696b46fb2d5b8b7194a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "normalize", "disabled": false, "layout": "IPY_MODEL_fa0058d26d0d4e31a42909bc3bb43623", "style": "IPY_MODEL_144c023c6db448e4900de9b761cf3d72", "value": false } }, "b3c811a701d54294bc88364048ce1c35": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b3d9f949872b402c85e0fce3675fe20e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b4328f18e86e4d72a4068793c13ece74": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b6d7d917a2794e4bba9b3e70b0954e5c": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b77026796d6c4ef1a84839a30502f9e0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "b87eebbeb0c04c54af3cedca133b8870": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "bf8a81c9928b4799ae11b36481639f05": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "c1fdc4bd8e414f5eba6b721dd735eaec": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "c8682019f5fe47fdbc64c0fc3f5edaac": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "c895cab4be9c4e2d9b4bd8677f48eb8f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "cc1cf31782fb40258841bb7c775c4fda": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "cc655065fa1049d299b25adf9c0cbaaf": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "cd750e09a5164090945128e2ca4a7dc5": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "d78cdb09f41a43758b95b09831cd9835": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "d8ca7b7c246a4308ad76a66c40217169": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_f77f421297434875804ee8629253445e", "IPY_MODEL_0e5e5d3db5a94ca5be9f31b97541103e" ], "layout": "IPY_MODEL_bf8a81c9928b4799ae11b36481639f05" } }, "da8dc4c775984fba8388ae465c33a438": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "CheckboxModel", "state": { "description": "normalize", "disabled": false, "layout": "IPY_MODEL_b6d7d917a2794e4bba9b3e70b0954e5c", "style": "IPY_MODEL_9b3fbd23673b447cad9edf34b06f024c", "value": true } }, "de09e4d8e77a4f3bad53753e5d0a7cfd": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_b3d9f949872b402c85e0fce3675fe20e", "outputs": [ { "data": { "text/plain": "{('No', 'East'): 159,\n ('No', 'South'): 76,\n ('No', 'West'): 64,\n ('Yes', 'West'): 239,\n ('Yes', 'South'): 86,\n ('Yes', 'East'): 76}" }, "metadata": {}, "output_type": "display_data" } ] } }, "e1937632160c4ecea5653920f3f09867": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_4e2ec3e6a3bc463bbfcad8374163f0bc", "outputs": [ { "data": { "text/plain": "{('No', 'Home'): 0.4682274247491639,\n ('No', 'Condo'): 0.3010033444816054,\n ('No', 'Apt'): 0.23076923076923078,\n ('Yes', 'Home'): 0.4463840399002494,\n ('Yes', 'Apt'): 0.2817955112219451,\n ('Yes', 'Condo'): 0.2718204488778055}" }, "metadata": {}, "output_type": "display_data" } ] } }, "e669e836fea040c6936a349c9c1b0cde": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried" ], "description": "column:", "index": 8, "layout": "IPY_MODEL_699e5a8612e0429b8e7efe5c65e303ee", "style": "IPY_MODEL_cc1cf31782fb40258841bb7c775c4fda" } }, "e789edfeedd34d74b9b6ac28872c83ce": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried" ], "description": "column:", "index": 8, "layout": "IPY_MODEL_b77026796d6c4ef1a84839a30502f9e0", "style": "IPY_MODEL_ea8657aa9dce47ab9f95c7a74433633e" } }, "e84b3ba10ec84e25b681828afaa4847b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_09b6385c4d72409ba9c41edacf6bf19e", "IPY_MODEL_da8dc4c775984fba8388ae465c33a438", "IPY_MODEL_e1937632160c4ecea5653920f3f09867" ], "layout": "IPY_MODEL_65102e81de1244b5a21117766cd32a9b" } }, "e85bff0461da470d83ad7ce1056fa4e9": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "e8e75fbeecf64b1ea52b5042160f7512": { "model_module": "@jupyter-widgets/output", "model_module_version": "1.0.0", "model_name": "OutputModel", "state": { "layout": "IPY_MODEL_11f30440d26e49aa897d4ca9450b4b1c", "outputs": [ { "data": { "text/plain": "{('No', 'Home'): 140,\n ('No', 'Condo'): 90,\n ('No', 'Apt'): 69,\n ('Yes', 'Home'): 179,\n ('Yes', 'Apt'): 113,\n ('Yes', 'Condo'): 109}" }, "metadata": {}, "output_type": "display_data" } ] } }, "e933b13a16aa47adaf3913ff73c750d7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "ea8657aa9dce47ab9f95c7a74433633e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "eb27b3528d114714947314686216cd37": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "eb8e6a4e902944fb8ae7a8a8be64d533": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "ed1b5a26f6f243daa0246888d8869c1c": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "Column:", "index": 7, "layout": "IPY_MODEL_aeba3057a6b24107831fd5b470a04517", "style": "IPY_MODEL_e933b13a16aa47adaf3913ff73c750d7" } }, "eef45a9504ef4f3cbc13b5479622d855": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_47a18e42bd944e718eef3d006b88cadc", "IPY_MODEL_1cda8df16a4b4528ad5d3ae8cd4ddffe", "IPY_MODEL_4dbf12a6fd314bc78df778c0482c909a" ], "layout": "IPY_MODEL_3c53e85e17a0446ca9c55e0b2dcde09a" } }, "f6055c98e8d94d229f27f3b524db9478": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "f6605a5a327b495eac0d85a679f1f961": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "f77f421297434875804ee8629253445e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DropdownModel", "state": { "_options_labels": [ "age", "weight", "income", "car_value", "debt", "mall_trips", "gender", "alone", "dwell", "pay_type", "nbhd", "tried", "prediction" ], "description": "Column:", "index": 4, "layout": "IPY_MODEL_2a72908e9f86469381708572f49031f3", "style": "IPY_MODEL_f6605a5a327b495eac0d85a679f1f961" } }, "fa0058d26d0d4e31a42909bc3bb43623": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "fa27574bc79f4dd086783fe3a330cfe5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, "fcf89b8c51994d8dbba43ed62f38d6a7": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "_dom_classes": [ "widget-interact" ], "children": [ "IPY_MODEL_e669e836fea040c6936a349c9c1b0cde", "IPY_MODEL_39b23b35de654b61b0e337f7143f1994", "IPY_MODEL_030c487009d1410d8ced064dd107565d" ], "layout": "IPY_MODEL_8fc99cc858434a259e2fec8ea0cea8b7" } }, "ff11d81ca5094e0a9e39eaee11232930": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }