{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"20Lec02.ipynb","provenance":[],"authorship_tag":"ABX9TyN9Obppgu+Ib1EF5Dps5F1F"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"code","metadata":{"id":"J42xMV3LZD2R","executionInfo":{"status":"ok","timestamp":1601475726224,"user_tz":-540,"elapsed":717,"user":{"displayName":"Ryuichiro Ishikawa","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GjJgT-uFW-zwu8fGNU9Z3XGuqsdW1w5M4IwCtffmA=s64","userId":"13189887461029207273"}},"outputId":"2a81f79a-fea4-4031-ac2f-25a3db4f25b5","colab":{"base_uri":"https://localhost:8080/","height":34}},"source":["from google.colab import drive\n","drive.mount('/content/drive')"],"execution_count":4,"outputs":[{"output_type":"stream","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"3qN_rL_tYti9","executionInfo":{"status":"ok","timestamp":1601475981318,"user_tz":-540,"elapsed":1000,"user":{"displayName":"Ryuichiro Ishikawa","photoUrl":"https://lh3.googleusercontent.com/a-/AOh14GjJgT-uFW-zwu8fGNU9Z3XGuqsdW1w5M4IwCtffmA=s64","userId":"13189887461029207273"}},"outputId":"5db32698-d72e-460a-c136-40b71e424385","colab":{"base_uri":"https://localhost:8080/","height":224}},"source":["import numpy as np\n","import scipy as sp\n","import pandas as pd\n","from pandas import Series, DataFrame\n","import matplotlib as mp\n","import seaborn as sns\n","\n","import matplotlib.pyplot as plt\n","\n","%matplotlib inline\n","\n","import requests\n","import io\n","\n","wine_data = pd.read_csv('/content/drive/My Drive/Colab Notebooks/02churn.csv')\n","wine_data.head()\n","\n"],"execution_count":13,"outputs":[{"output_type":"execute_result","data":{"text/html":["
\n"," | ID | \n","COLLEGE | \n","INCOME | \n","OVERAGE | \n","LEFTOVER | \n","HOUSE | \n","HANDSET_PRICE | \n","OVER_15MINS_CALLS_PER_MONTH | \n","AVERAGE_CALL_DURATION | \n","REPORTED_SATISFACTION | \n","REPORTED_USAGE_LEVEL | \n","LEAVE | \n","
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n","sample_01 | \n","zero | \n","31953 | \n","0 | \n","6 | \n","313378 | \n","161 | \n","0 | \n","4 | \n","unsat | \n","little | \n","STAY | \n","
1 | \n","sample_02 | \n","one | \n","36147 | \n","0 | \n","13 | \n","800586 | \n","244 | \n","0 | \n","6 | \n","unsat | \n","little | \n","STAY | \n","
2 | \n","sample_03 | \n","one | \n","27273 | \n","230 | \n","0 | \n","305049 | \n","201 | \n","16 | \n","15 | \n","unsat | \n","very_little | \n","STAY | \n","
3 | \n","sample_04 | \n","zero | \n","120070 | \n","38 | \n","33 | \n","788235 | \n","780 | \n","3 | \n","2 | \n","unsat | \n","very_high | \n","LEAVE | \n","
4 | \n","sample_05 | \n","one | \n","29215 | \n","208 | \n","85 | \n","224784 | \n","241 | \n","21 | \n","1 | \n","very_unsat | \n","little | \n","STAY | \n","