{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"86b963b9-7cfa-4a27-e7ce-18d3a101a204"},"outputs":[],"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\nfrom subprocess import check_output\nprint(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))\n\n# Any results you write to the current directory are saved as output."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"4b1f79a2-9f96-3186-1cea-7c71a33dd277"},"outputs":[],"source":"import matplotlib.pyplot as plt\n%matplotlib inline"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"3cb7d528-7a13-62ea-b278-06a17220c321"},"outputs":[],"source":"train = pd.read_csv('../input/train.csv')"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"58604bfd-f3b0-71ca-7461-eaec3e105f73"},"outputs":[],"source":"train.head()"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"05d6e959-7b29-919c-95d4-b74df3193f0c"},"outputs":[],"source":"# Now we need to go through and train a model using (x,y) and place_id\n# First we need to import the necessary classes from scikit-learn\nfrom sklearn.neighbors import KNeighborsClassifier as KNN\n\n# create and fit model, we will start with 5 neighbors\n# we fit the model on X and y\n# here we are going to first look at only the location of the point so (x,y)\nmodel = KNN(5)\nprint(train['x', 'y'])"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"cbceea7c-74e8-e504-c9da-04f9f0eed1b2"},"outputs":[],"source":""}],"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}