Complete Solution to Machinehack's Predicting Restaurant Food Cost Hackathon.
April 22, 2019 · View on GitHub
{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "Predict_Restaurant_Food_Cost_Final.ipynb", "version": "0.3.2", "provenance": [], "collapsed_sections": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "accelerator": "GPU" }, "cells": [ { "metadata": { "id": "KH0KhRX3hO4a", "colab_type": "text" }, "cell_type": "markdown", "source": [ "# Predicting Restaurant Food Cost Hackathon by MachineHack\n", "\n", "This is one of many approaches to solving "Predicting Restaurant Food Cost Hackathon, the latest hackathon by Machinehack.\n", "\n", "This tutorial is for all Data Science enthusiasts who have just begun the journey. Use this tutorial to learn and submit your predictions at MachineHack. The winner will get a free pass to the Machinecon 2019 event.\n", "\n", "Check out the details here : https://www.machinehack.com/course/predicting-restaurant-food-cost-hackathon/" ] }, { "metadata": { "id": "uJ8CZAQukbmD", "colab_type": "text" }, "cell_type": "markdown", "source": [ "##Importing the Data Sets" ] }, { "metadata": { "id": "aurtDLutuv3k", "colab_type": "code", "colab": {} }, "cell_type": "code", "source": [ "import numpy as np\n", "import pandas as pd\n", "\n", "training_set = pd.read_excel("Data_Train.xlsx")\n", "test_set = pd.read_excel("Data_Test.xlsx")" ], "execution_count": 0, "outputs": [] }, { "metadata": { "id": "U8sBPtYeggZW", "colab_type": "code", "outputId": "0bee7791-cd78-4ad7-d802-cbd168844586", "colab": { "base_uri": "https://localhost:8080/", "height": 204 } }, "cell_type": "code", "source": [ "training_set.head()" ], "execution_count": 0, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " TITLE RESTAURANT_ID \\n", "0 CASUAL DINING 9438 \n", "1 CASUAL DINING,BAR 13198 \n", "2 CASUAL DINING 10915 \n", "3 QUICK BITES 6346 \n", "4 DESSERT PARLOR 15387 \n", "\n", " CUISINES \\n", "0 Malwani, Goan, North Indian \n", "1 Asian, Modern Indian, Japanese \n", "2 North Indian, Chinese, Biryani, Hyderabadi \n", "3 Tibetan, Chinese \n", "4 Desserts \n", "\n", " TIME CITY LOCALITY RATING \\n", "0 11am – 4pm, 7:30pm – 11:30pm (Mon-Sun) Thane Dombivali East 3.6 \n", "1 6pm – 11pm (Mon-Sun) Chennai Ramapuram 4.2 \n", "2 11am – 3:30pm, 7pm – 11pm (Mon-Sun) Chennai Saligramam 3.8 \n", "3 11:30am – 1am (Mon-Sun) Mumbai Bandra West 4.1 \n", "4 11am – 1am (Mon-Sun) Mumbai Lower Parel 3.8 \n", "\n", " VOTES COST \n", "0 49 votes 1200 \n", "1 30 votes 1500 \n", "2 221 votes 800 \n", "3 24 votes 800 \n", "4 165 votes 300 " ], "text/html": [ "