{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"3f67ceae-8078-1ee1-fcbc-7df3d954bf7a"},"outputs":[],"source":"df_test.columns"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"7cdb3c6c-7339-4d87-aed5-68c35f8238db"},"outputs":[],"source":"import pandas as pd\nimport numpy as np\n\ndf_train = pd.read_csv('../input/train.csv')\ndf_test = pd.read_csv('../input/test.csv')\n\nprint('Size of training data: ' + str(df_train.shape))\nprint('Size of testing data:  ' + str(df_test.shape))\n\nprint('\\nColumns:' + str(df_train.columns.values))\n\nprint(df_train.describe())\n\n#print(df_train['place_id'])\n\nprint('\\nNumber of place ids: ' + str(len(list(set(df_train['place_id'].values.tolist())))))"},{"cell_type":"markdown","metadata":{"_cell_guid":"2c9b568d-6b87-4294-9706-7e367b7fe9cf"},"source":"As you can see, there are a huge number of place ids. This means that any algorithm which trains using a one vs all approach won't work on this dataset (unless of course you're willing to train 100k models).\n\nThat combined with the extremely low input dimensionality should make this an interesting competition, indeed :)"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"fb248edb-c571-4f96-9258-b0864bb54005"},"outputs":[],"source":""},{"cell_type":"markdown","metadata":{"_cell_guid":"0afa7096-1f58-4de6-ac7a-3b6c9cecdbd3"},"source":"I expected the distribution of the target values to be uniform, however it looks like some are much more common than others. This could be used to cut down the number of classes substantially."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"ac2597eb-1631-43c9-b204-0fa7636e8078"},"outputs":[],"source":"import matplotlib.pyplot as plt\nimport matplotlib.mlab as mlab\nfrom matplotlib.colors import LogNorm\n\ntime = df_train['time']\nx = df_train['x']\ny = df_train['y']\naccuracy = df_train['accuracy']\n\nn, bins, patches = plt.hist(time, 50, normed=1, facecolor='green', alpha=0.75)\nplt.title('Data density at different time dimension')\nplt.xlabel('Time')\nplt.ylabel('Frequency')\nplt.grid(True)\nplt.show()\n\nn, bins, patches = plt.hist(accuracy, 50, normed=1, facecolor='green', alpha=0.75)\nplt.title('Histogram of location accuracy')\nplt.xlabel('Accuracy')\nplt.ylabel('Frequency')\nplt.show()"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"f3a52ba6-63a0-4aad-ae83-84e570e1e060"},"outputs":[],"source":"bins = 20\nwhile bins <=160:\n    plt.hist2d(x, y, bins=bins, norm=LogNorm())\n    plt.colorbar()\n    plt.title('x and y location histogram - ' + str(bins) + ' bins')\n    plt.xlabel('x')\n    plt.ylabel('y')\n    plt.show()\n    bins = bins * 2"}],"metadata":{"_change_revision":0,"_is_fork":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.5.2"}},"nbformat":4,"nbformat_minor":0}