{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nimport os\nprint(os.listdir(\"../input\"))\n\n# Any results you write to the current directory are saved as output.","execution_count":49,"outputs":[]},{"metadata":{"collapsed":true,"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"train_sample = pd.read_csv('../input/train_sample.csv')","execution_count":50,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"51c81830bae977f34d01791ea322c8cf690e765b"},"cell_type":"code","source":"train_sample.head()","execution_count":51,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"a05a9524fb48ffeedbab078ff785add0b3a92c20"},"cell_type":"code","source":"train_sample.describe()","execution_count":52,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"a1320b17a78d34f61d5e9738f053d3377962e3e4"},"cell_type":"code","source":"train_sample.is_attributed.plot.hist()","execution_count":53,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"3d2c752661e885dba9b0bfe886a3cc648d7895f1"},"cell_type":"code","source":"train_good = train_sample[(train_sample.is_attributed == 1)]\ntrain_bad = train_sample[(train_sample.is_attributed == 0)]","execution_count":54,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"05db16b0eb037c34cffd6339b7264e63a9a6ffb0"},"cell_type":"code","source":"train_good.describe()","execution_count":55,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"c3723180b3e68675996b4682405fd8155f1a9495"},"cell_type":"code","source":"train_bad.describe()","execution_count":56,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"69bc78eba1c67ef1c413ab8421597f6951c6a587"},"cell_type":"code","source":"import matplotlib.pyplot as plt\n\nfig, axarr = plt.subplots(2, 3,figsize=(20, 5))\ntrain_sample.app.plot.hist(ax=axarr[0,0],title='train_sample')\ntrain_good.app.plot.hist(ax=axarr[0,1],title='train_good')\ntrain_bad.app.plot.hist(ax=axarr[0,2],title='train_bad')\n\ntrain_sample[train_sample.app > 50].app.plot.hist(ax=axarr[1,0],title='train_sample > 50')\ntrain_good[train_good.app > 50].app.plot.hist(ax=axarr[1,1],title='train_good > 50')\ntrain_bad[train_bad.app > 50].app.plot.hist(ax=axarr[1,2],title='train_bad > 50')","execution_count":74,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"a1482525463204e7afa09e1fbd3641bffeea7f67"},"cell_type":"code","source":"fig, axarr = plt.subplots(2, 3,figsize=(20, 5))\ntrain_sample.ip.plot.hist(ax=axarr[0,0],title='train_sample')\ntrain_good.ip.plot.hist(ax=axarr[0,1],title='train_good')\ntrain_bad.ip.plot.hist(ax=axarr[0,2],title='train_bad')\n\ntrain_sample[train_sample.ip > 50].os.plot.hist(ax=axarr[1,0],title='train_sample > 50')\ntrain_good[train_good.ip > 50].os.plot.hist(ax=axarr[1,1],title='train_good > 50')\ntrain_bad[train_bad.ip > 50].os.plot.hist(ax=axarr[1,2],title='train_bad > 50')","execution_count":75,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"9cfffac4fb900a315c4a1a50d5cc6134832ddf09"},"cell_type":"code","source":"fig, axarr = plt.subplots(1, 3,figsize=(20, 5))\ntrain_sample.device.plot.hist(ax=axarr[0],title='train_sample')\ntrain_good.device.plot.hist(ax=axarr[1],title='train_good')\ntrain_bad.device.plot.hist(ax=axarr[2],title='train_bad')","execution_count":59,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"2d857f06ad2ce8b85eb1fb7becf7dc9d97359add"},"cell_type":"code","source":"fig, axarr = plt.subplots(2, 3,figsize=(20, 5))\ntrain_sample.os.plot.hist(ax=axarr[0,0],title='train_sample')\n\ntrain_good.os.plot.hist(ax=axarr[0,1],title='train_good')\ntrain_bad.os.plot.hist(ax=axarr[0,2],title='train_bad')\n\ntrain_sample[train_sample.os > 100].os.plot.hist(ax=axarr[1,0],title='train_sample > 100')\ntrain_good[train_good.os > 100].os.plot.hist(ax=axarr[1,1],title='train_good > 100')\ntrain_bad[train_bad.os > 100].os.plot.hist(ax=axarr[1,2],title='train_bad > 100')\n\n","execution_count":70,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"11ed3580de1c85c4a400a7e79cd5a8247670d939"},"cell_type":"code","source":"fig, axarr = plt.subplots(1, 3,figsize=(20, 5))\ntrain_sample.channel.plot.hist(ax=axarr[0],title='train_sample')\ntrain_good.channel.plot.hist(ax=axarr[1],title='train_good')\ntrain_bad.channel.plot.hist(ax=axarr[2],title='train_bad')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"collapsed":true,"_uuid":"49a2f003e19a1af794a6cc0c122f744cfdd44644"},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.4","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}