{ "cells": [ { "source": [ "# Delicious Asian and Indian Cuisines \n" ], "cell_type": "markdown", "metadata": {} }, { "source": [ "Install Imblearn which will enable SMOTE. This is a Scikit-learn package that helps handle imbalanced data when performing classification. (https://imbalanced-learn.org/stable/)" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: imblearn in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.0)\n", "Requirement already satisfied: imbalanced-learn in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imblearn) (0.8.0)\n", "Requirement already satisfied: numpy>=1.13.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imbalanced-learn->imblearn) (1.19.2)\n", "Requirement already satisfied: scipy>=0.19.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imbalanced-learn->imblearn) (1.4.1)\n", "Requirement already satisfied: scikit-learn>=0.24 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imbalanced-learn->imblearn) (0.24.2)\n", "Requirement already satisfied: joblib>=0.11 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from imbalanced-learn->imblearn) (0.16.0)\n", "Requirement already satisfied: threadpoolctl>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-learn>=0.24->imbalanced-learn->imblearn) (2.1.0)\n", "\u001b[33mWARNING: You are using pip version 20.2.3; however, version 21.1.2 is available.\n", "You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -m pip install --upgrade pip' command.\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "pip install imblearn" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import matplotlib as mpl\n", "import numpy as np\n", "from imblearn.over_sampling import SMOTE" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv('../../data/cuisines.csv')" ] }, { "source": [ "This dataset includes 385 columns indicating all kinds of ingredients in various cuisines from a given set of cuisines." ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Unnamed: 0 cuisine almond angelica anise anise_seed apple \\\n", "0 65 indian 0 0 0 0 0 \n", "1 66 indian 1 0 0 0 0 \n", "2 67 indian 0 0 0 0 0 \n", "3 68 indian 0 0 0 0 0 \n", "4 69 indian 0 0 0 0 0 \n", "\n", " apple_brandy apricot armagnac ... whiskey white_bread white_wine \\\n", "0 0 0 0 ... 0 0 0 \n", "1 0 0 0 ... 0 0 0 \n", "2 0 0 0 ... 0 0 0 \n", "3 0 0 0 ... 0 0 0 \n", "4 0 0 0 ... 0 0 0 \n", "\n", " whole_grain_wheat_flour wine wood yam yeast yogurt zucchini \n", "0 0 0 0 0 0 0 0 \n", "1 0 0 0 0 0 0 0 \n", "2 0 0 0 0 0 0 0 \n", "3 0 0 0 0 0 0 0 \n", "4 0 0 0 0 0 1 0 \n", "\n", "[5 rows x 385 columns]" ], "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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Unnamed: 0cuisinealmondangelicaaniseanise_seedappleapple_brandyapricotarmagnac...whiskeywhite_breadwhite_winewhole_grain_wheat_flourwinewoodyamyeastyogurtzucchini
065indian00000000...0000000000
166indian10000000...0000000000
267indian00000000...0000000000
368indian00000000...0000000000
469indian00000000...0000000010
\n

5 rows × 385 columns

\n
" }, "metadata": {}, "execution_count": 4 } ], "source": [ "df.head()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\nRangeIndex: 2448 entries, 0 to 2447\nColumns: 385 entries, Unnamed: 0 to zucchini\ndtypes: int64(384), object(1)\nmemory usage: 7.2+ MB\n" ] } ], "source": [ "df.info()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "korean 799\n", "indian 598\n", "chinese 442\n", "japanese 320\n", "thai 289\n", "Name: cuisine, dtype: int64" ] }, "metadata": {}, "execution_count": 6 } ], "source": [ "df.cuisine.value_counts()" ] }, { "source": [ "Show the cuisines in a bar graph" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 7 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZEAAAD4CAYAAAAtrdtxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAASY0lEQVR4nO3df7TldV3v8eerGZkRRoeAiXtE5UgNIkUCjlwQIzAiC7NscdcSbcmsfkxl5SXX0juuyzK9d3UvlXnpplajma0kMtCUhluImNcr8msGBmb4pZaTQCFQOYom0fi+f+zPkd14hpnzOWefvYfzfKy113z35/vde7/22fvMa3++3733SVUhSVKPbxt3AEnSgcsSkSR1s0QkSd0sEUlSN0tEktRt+bgDLKYjjjiipqenxx1Dkg4oW7dufbiq1sy2bkmVyPT0NFu2bBl3DEk6oCT5u72tc3eWJKmbJSJJ6maJSJK6WSKSpG6WiCSpmyUiSepmiUiSulkikqRulogkqduS+sT69vt3Mb3xqnHH0ALZefG5444gLXnORCRJ3SwRSVI3S0SS1M0SkSR1s0QkSd0sEUlSN0tEktRtIkokyaFJXtuWz0yyeY6X/29Jzh5NOknS3kxEiQCHAq/tvXBVvbmqPraAeSRJ+2FSSuRi4DuTbAN+E1iV5Iokdye5NEkAkrw5yc1JdiTZNDT+viTnjTG/JC1Jk1IiG4G/qaoTgTcAJwEXAscDxwCnt+3eUVUvrKrvAZ4KvGxfV5xk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yb5Llt6AeAOycl35DzeXxX1kyOScj3BeDUJAe33+OZn9/on3+LcSBqEk4M3i3xGQb70P/rmDJcxmB/5WMMXnn9NIP9kNcCnwU+BhzWtg3wzpZ3O7BuEfK9mMF0/HZgWzv9yKRkBL4XuLXl2wG8uY0fA9wEfI7BboYVbXxlO/+5tv6YRXqcz+Txd2dNRLaW47Z2umPmd2BSHtt2mycCW9rj+2Hg2ycs3yEMXq2vHhqbpHxvBe5uvxt/DKxYjOefX3siSeq2VHZnSZJGwBKRJHWzRCRJ3SwRSVI3S0SS1M0SkSR1s0QkSd3+PxNFbW14TY8fAAAAAElFTkSuQmCC\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "df.cuisine.value_counts().plot.barh()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "thai df: (289, 385)\njapanese df: (320, 385)\nchinese df: (442, 385)\nindian df: (598, 385)\nkorean df: (799, 385)\n" ] } ], "source": [ "\n", "thai_df = df[(df.cuisine == \"thai\")]\n", "japanese_df = df[(df.cuisine == \"japanese\")]\n", "chinese_df = df[(df.cuisine == \"chinese\")]\n", "indian_df = df[(df.cuisine == \"indian\")]\n", "korean_df = df[(df.cuisine == \"korean\")]\n", "\n", "print(f'thai df: {thai_df.shape}')\n", "print(f'japanese df: {japanese_df.shape}')\n", "print(f'chinese df: {chinese_df.shape}')\n", "print(f'indian df: {indian_df.shape}')\n", "print(f'korean df: {korean_df.shape}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## What are the top ingredients by class" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "def create_ingredient_df(df):\n", " # transpose df, drop cuisine and unnamed rows, sum the row to get total for ingredient and add value header to new df\n", " ingredient_df = df.T.drop(['cuisine','Unnamed: 0']).sum(axis=1).to_frame('value')\n", " # drop ingredients that have a 0 sum\n", " ingredient_df = ingredient_df[(ingredient_df.T != 0).any()]\n", " # sort df\n", " ingredient_df = ingredient_df.sort_values(by='value', ascending=False, inplace=False)\n", " return ingredient_df\n" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 10 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n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/Pqqg2tPTZqJTj/X7glYh4vqRtu4+3g6mKSOoN/BK4KiL+DtwGHAIMB1ZRHIrnzUkRcTRwBvB5SR8onRnF8wa5/JsHSbsCZwEzUlMlHO+t5PkYt0bStcBm4O7UtAo4MCJGAFcD/yXpXVnV14KK/GyU+ARb/gdsh463g2n7rQQOKHm/f2rLJUk9KIbS3RFxD0BEvBIRjRHxFnAHGZ0iaEtErEw/VwP3UqzxlabTR+nn6uwqbNMZwIKIeAUq43iXaO0Y5/5zL+liYBQwLoUq6VTYq2m6juK1mkMzK7KZNj4blXC8dwE+DkxratvR4+1g2n7zgcGSBqX/GV8AzMq4phal87//F3gmIm4uaS+9NvAxYEnzZbMkaQ9JfZqmKV7YXkLxOF+Uul0E3JdNhe3a4n+ReT/ezbR2jGcBF6a7844DGkpO+WVO0unAV4CzImJ9Sfvekrqn6YOBwcCfs6lya218NmYBF0jqKWkQxbr/2NX1teNU4NmIWNHUsMPHO4u7O3aWF8U7lJ6j+L+Ba7Oup406T6J4KmYxsDC9PgrcBdSn9lnAgKxrbVb3wRTvSFoELG06xkA/4EHgeeD3wF5Z19pC7XsArwJ9S9pyebwphucqYBPFaxiXtnaMKd6Nd2v6zNcDhZzV/QLFazJNn/PbU99z02doIbAAGJ2zulv9bADXpuO9DDgjT3Wn9inA5c367tDx9lcSmZlZrvhUnpmZ5YqDyczMcsXBZGZmueJgMjOzXHEwmZlZrjiYzMwsVxxMZmaWK/8fnSxrKwF+wYgAAAAASUVORK5CYII=\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "thai_ingredient_df = create_ingredient_df(thai_df)\r\n", "thai_ingredient_df.head(10).plot.barh()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 11 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaYAAAD4CAYAAACngkIwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAdqUlEQVR4nO3de5xXdb3v8dcbREh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g6RtJQ1omSa78b2Y7Lyem1Y7F7g7nwrbtdH/Not6fsu0dz7vAT6fns47GGguu+SXC0nHAf8dOCUi1pa1D5bUO03vDQwDXsinyn/o4Ht/D3C2pL6S9iKr96nurq8dRwHPRcTylobcz29eT130hC+yp5iWkv1v4vK862mjvsPJLtMsAhakrxOAnwJNqf0eYEjetaZ69yZ7cmkh8HTLOQV2AmYDzwP/F9gx71rLat4WeB0YWNZWmPNLFpgrgfVk9zXOb+98kj2Nd2P6eW4C6gtQ6x/I7s20/PzelNY9Pf2MLADmAScX5Ny2+70HLk/ndglwfBHqTe1TgS+2WjfX8+tXEpmZWaH4Up6ZmRWKg8nMzArFwWRmZoXiYDIzs0JxMJmZWaE4mMzMrFAcTGZmVij/H6ovFeU7ywQTAAAAAElFTkSuQmCC\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "japanese_ingredient_df = create_ingredient_df(japanese_df)\r\n", "japanese_ingredient_df.head(10).plot.barh()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 12 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaYAAAD4CAYAAACngkIwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAfeElEQVR4nO3deZwV1Z338c8XbCEKYlSMiEurISECsl1NULO5xD2aCYgT4hLzkkcn4pgEnyGPJoMTM+OSbTRGJRmFUUcF1GjCqHGUuBL1NggNKmgiPmGJ4tZiEILwmz/qtN603U033O5bl/6+X69+dd1Tp079Thfxl3Oqbh1FBGZmZnnRrdIBmJmZlXJiMjOzXHFiMjOzXHFiMjOzXHFiMjOzXNmm0gFsDXbZZZeora2tdBhmZlWlrq7u1Yjo27TciakMamtrKRaLlQ7DzKyqSHqpuXJP5ZmZWa44MZmZWa44MZmZWa74HpOZWSdYv349y5YtY+3atZUOpdP17NmTPfbYg5qamjbVd2Iqg/rlDdROmlXpMKyDLb30uEqHYFVs2bJl9O7dm9raWiRVOp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egG3A+dHxFul+6r1GjXTp6q+ThGxISKGAXuQjegGdnYMTkybbzmwZ8nnPVJZ1YmI5en3K8CdZP8YX26cOkm/X6lchJutpT5U5bWLiJfTfzQ2Ar/g/WmgquiPpBqy/4DfHBF3pOKqvkbN9anar1OjiHgTmA2MIptKbXy3amnc7/Up7e8DvLal53Zi2nxPAQPS0yrbkt34u7vCMbWbpO0l9W7cBr4ALCTry+mp2unAXZWJcIu01Ie7gdPSk1+fAhpKppNyq8k9li+RXSfI+nNKekJqH2AA8GRnx9eadN/hP4BnI+LHJbuq9hq11Kcqv059Je2Ytj8EHEl272w2MDpVa3qdGq/faODBNPLdMpV+CqSaf8ieHFpCNgd7YaXj2cw+7Ev2pNB8YFFjP8jmiR8Angf+B9ip0rFuoh+3kE2brCebA/96S30ge/Lo6nTd6oFCpeNvY39uTPEuSP9B6FdS/8LUn8XAMZWOv5n+HEo2TbcAeDr9HFvl16ilPlXzdToAmJdiXwh8L5XvS5ZEXwBmAD1Sec/0+YW0f99yxOFXEpmZWa54Ks/MzHLFicnMzHLFicnMzHLFicnMzHLFicnMzHLFicnMzHLFicnMzHLlfwHH5sUVMquziAAAAABJRU5ErkJggg==\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "chinese_ingredient_df = create_ingredient_df(chinese_df)\r\n", "chinese_ingredient_df.head(10).plot.barh()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 13 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaYAAAD4CAYAAACngkIwAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAfTElEQVR4nO3de5RXdb3/8ecLHEEdQkU0fngZNBRFBGH0eMtMTSs17QjiL0tMj/ws01ylHUrr4MnWsU4Xu1iGHsPMo1zSBcVKLe+aF2ZAbhJqggWSgOUkGoTj+/fH/ox8HecK35m9v8zrsdZ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qXNDGV7RERq9PyX4A98gmtTa3FWOR+/1y61HFzyeXRQsWbLhsdSva/5ML3cbN4oaB9LKm3pKeBNcBvyUZtr0bEmy3E9Ha8aXsDMCDPeCOiqX+/kfr3e5L6NI836fL+dWLa9h0TEaOBjwAXSzq2dGNkY/VC/81AJcQI/ATYDxgFrAa+k2847yapGvglcFlE/L10WxH7uIV4C9vHEdEYEaOAPclGa8NyDqlNzeOVdDDwZbK4DwN2Bf49r/icmLbcKmCvkvU9U1mhRMSq9HMNcBfZP5qXm4bi6eea/CJsVWsxFrLfI+Ll9I/9LeBGNl9KKkS8kqrIfsnfFhF3puLC9nFL8Ra9jwEi4lXgAeBIskteTe8jLY3p7XjT9v7AK90cKvCOeD+cLqFGRGwEfkaO/evEtOXmAkPTkzfbk93EnJ1zTO8gaSdJ/ZqWgZOAxWRxTkjVJgCz8omwTa3FOBs4Nz0pdATQUHI5KjfNrrl/nKyfIYv37PQk1hBgKPBUN8cm4H+ApRHx3ZJNhezj1uItah9LGihp57S8A/AhsvtiDwBjU7Xm/dvU72OB+9OINc94/1DynxSR3Q8r7d/u/T509dMV2/KH7GmVZ8muJ1+ZdzwtxLcv2dNKC4AlTTGSXc++D3gO+B2wa85x3k52aWYT2fXrC1qLkezJoOtTny8CagsS760pnoVk/5AHldS/MsW7DPhIDvEeQ3aZbiHwdPp8tKh93Ea8hexj4BBgfoprMfC1VL4vWYJ8HpgB9EnlfdP682n7vgWJ9/7Uv4uBX7D5yb1u/z74lURmZlYovpRnZmaF4sRkZmaF4sRkZmaF4sRkZmaF4sRkZmaF4sRkZmaF4sRkZmaF8v8BEBScEicaSW4AAAAASUVORK5CYII=\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "indian_ingredient_df = create_ingredient_df(indian_df)\r\n", "indian_ingredient_df.head(10).plot.barh()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "" ] }, "metadata": {}, "execution_count": 14 }, { "output_type": "display_data", "data": { "text/plain": "
", "image/svg+xml": "\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n", "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdIAAAD4CAYAAABYIGfSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uM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cjYoOknsCtZNeVXwO+GBHPFif69iXpcODCiDje49EyTqRmZmY5eGnXzMwsBydSMzOzHJxIzczMcnAiNTMzy8GJ1MzMLAcnUjMzsxycSM3MzHL4Hx9S2FkSapv/AAAAAElFTkSuQmCC\n" }, "metadata": { "needs_background": "light" } } ], "source": [ "korean_ingredient_df = create_ingredient_df(korean_df)\r\n", "korean_ingredient_df.head(10).plot.barh()" ] }, { "source": [ "Drop very common ingredients (common to all cuisines)" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " almond angelica anise anise_seed apple apple_brandy apricot \\\n", "0 0 0 0 0 0 0 0 \n", "1 1 0 0 0 0 0 0 \n", "2 0 0 0 0 0 0 0 \n", "3 0 0 0 0 0 0 0 \n", "4 0 0 0 0 0 0 0 \n", "\n", " armagnac artemisia artichoke ... whiskey white_bread white_wine \\\n", "0 0 0 0 ... 0 0 0 \n", "1 0 0 0 ... 0 0 0 \n", "2 0 0 0 ... 0 0 0 \n", "3 0 0 0 ... 0 0 0 \n", "4 0 0 0 ... 0 0 0 \n", "\n", " whole_grain_wheat_flour wine wood yam yeast yogurt zucchini \n", "0 0 0 0 0 0 0 0 \n", "1 0 0 0 0 0 0 0 \n", "2 0 0 0 0 0 0 0 \n", "3 0 0 0 0 0 0 0 \n", "4 0 0 0 0 0 1 0 \n", "\n", "[5 rows x 380 columns]" ], "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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
almondangelicaaniseanise_seedappleapple_brandyapricotarmagnacartemisiaartichoke...whiskeywhite_breadwhite_winewhole_grain_wheat_flourwinewoodyamyeastyogurtzucchini
00000000000...0000000000
11000000000...0000000000
20000000000...0000000000
30000000000...0000000000
40000000000...0000000010
\n

5 rows × 380 columns

\n
" }, "metadata": {}, "execution_count": 15 } ], "source": [ "feature_df= df.drop(['cuisine','Unnamed: 0','rice','garlic','ginger'], axis=1)\n", "labels_df = df.cuisine #.unique()\n", "feature_df.head()\n" ] }, { "source": [ "Balance data with SMOTE oversampling to the highest class. Read more here: https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTE.html" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "oversample = SMOTE()\n", "transformed_feature_df, transformed_label_df = oversample.fit_resample(feature_df, labels_df)" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "new label count: korean 799\nchinese 799\njapanese 799\nindian 799\nthai 799\nName: cuisine, dtype: int64\nold label count: korean 799\nindian 598\nchinese 442\njapanese 320\nthai 289\nName: cuisine, dtype: int64\n" ] } ], "source": [ "print(f'new label count: {transformed_label_df.value_counts()}')\r\n", "print(f'old label count: {df.cuisine.value_counts()}')" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " almond angelica anise anise_seed apple apple_brandy apricot \\\n", "0 0 0 0 0 0 0 0 \n", "1 1 0 0 0 0 0 0 \n", "2 0 0 0 0 0 0 0 \n", "3 0 0 0 0 0 0 0 \n", "4 0 0 0 0 0 0 0 \n", "\n", " armagnac artemisia artichoke ... whiskey white_bread white_wine \\\n", "0 0 0 0 ... 0 0 0 \n", "1 0 0 0 ... 0 0 0 \n", "2 0 0 0 ... 0 0 0 \n", "3 0 0 0 ... 0 0 0 \n", "4 0 0 0 ... 0 0 0 \n", "\n", " whole_grain_wheat_flour wine wood yam yeast yogurt zucchini \n", "0 0 0 0 0 0 0 0 \n", "1 0 0 0 0 0 0 0 \n", "2 0 0 0 0 0 0 0 \n", "3 0 0 0 0 0 0 0 \n", "4 0 0 0 0 0 1 0 \n", "\n", "[5 rows x 380 columns]" ], "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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
almondangelicaaniseanise_seedappleapple_brandyapricotarmagnacartemisiaartichoke...whiskeywhite_breadwhite_winewhole_grain_wheat_flourwinewoodyamyeastyogurtzucchini
00000000000...0000000000
11000000000...0000000000
20000000000...0000000000
30000000000...0000000000
40000000000...0000000010
\n

5 rows × 380 columns

\n
" }, "metadata": {}, "execution_count": 18 } ], "source": [ "transformed_feature_df.head()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " cuisine almond angelica anise anise_seed apple apple_brandy \\\n", "0 indian 0 0 0 0 0 0 \n", "1 indian 1 0 0 0 0 0 \n", "2 indian 0 0 0 0 0 0 \n", "3 indian 0 0 0 0 0 0 \n", "4 indian 0 0 0 0 0 0 \n", "... ... ... ... ... ... ... ... \n", "3990 thai 0 0 0 0 0 0 \n", "3991 thai 0 0 0 0 0 0 \n", "3992 thai 0 0 0 0 0 0 \n", "3993 thai 0 0 0 0 0 0 \n", "3994 thai 0 0 0 0 0 0 \n", "\n", " apricot armagnac artemisia ... whiskey white_bread white_wine \\\n", "0 0 0 0 ... 0 0 0 \n", "1 0 0 0 ... 0 0 0 \n", "2 0 0 0 ... 0 0 0 \n", "3 0 0 0 ... 0 0 0 \n", "4 0 0 0 ... 0 0 0 \n", "... ... ... ... ... ... ... ... \n", "3990 0 0 0 ... 0 0 0 \n", "3991 0 0 0 ... 0 0 0 \n", "3992 0 0 0 ... 0 0 0 \n", "3993 0 0 0 ... 0 0 0 \n", "3994 0 0 0 ... 0 0 0 \n", "\n", " whole_grain_wheat_flour wine wood yam yeast yogurt zucchini \n", "0 0 0 0 0 0 0 0 \n", "1 0 0 0 0 0 0 0 \n", "2 0 0 0 0 0 0 0 \n", "3 0 0 0 0 0 0 0 \n", "4 0 0 0 0 0 1 0 \n", "... ... ... ... ... ... ... ... \n", "3990 0 0 0 0 0 0 0 \n", "3991 0 0 0 0 0 0 0 \n", "3992 0 0 0 0 0 0 0 \n", "3993 0 0 0 0 0 0 0 \n", "3994 0 0 0 0 0 0 0 \n", "\n", "[3995 rows x 381 columns]" ], "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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
cuisinealmondangelicaaniseanise_seedappleapple_brandyapricotarmagnacartemisia...whiskeywhite_breadwhite_winewhole_grain_wheat_flourwinewoodyamyeastyogurtzucchini
0indian000000000...0000000000
1indian100000000...0000000000
2indian000000000...0000000000
3indian000000000...0000000000
4indian000000000...0000000010
..................................................................
3990thai000000000...0000000000
3991thai000000000...0000000000
3992thai000000000...0000000000
3993thai000000000...0000000000
3994thai000000000...0000000000
\n

3995 rows × 381 columns

\n
" }, "metadata": {}, "execution_count": 19 } ], "source": [ "# export transformed data to new df for classification\n", "transformed_df = pd.concat([transformed_label_df,transformed_feature_df],axis=1, join='outer')\n", "transformed_df" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\nRangeIndex: 3995 entries, 0 to 3994\nColumns: 381 entries, cuisine to zucchini\ndtypes: int64(380), object(1)\nmemory usage: 11.6+ MB\n" ] } ], "source": [ "transformed_df.info()" ] }, { "source": [ "Save the file for future use" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "transformed_df.to_csv(\"../../data/cleaned_cuisines.csv\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "interpreter": { "hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d" }, "kernelspec": { "name": "python3", "display_name": "Python 3.7.0 64-bit ('3.7')" }, "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.0" }, "metadata": { "interpreter": { "hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d" } } }, "nbformat": 4, "nbformat_minor": 4 }