{"cells":[{"metadata":{"_uuid":"a1a1046a007ec3576f6c4d192ed771ed31bbf6bd"},"cell_type":"markdown","source":"## Idea: Request values in different clusters to start\n\n1. Cluster the points\n2. Choose K points from each of N cluster\n3. Request values for these KxN points only\n4. Use active learning to decide which more points to get"},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"_kg_hide-input":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 pandas as pd\nimport numpy as np\nimport time,sys,datetime\nimport os,requests,math,string,itertools,fractions,heapq,collections,re,array,bisect\nfrom sqlalchemy import create_engine\nfrom dateutil.relativedelta import relativedelta\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n%matplotlib inline\npd.set_option('display.max_columns', 500)\nimport matplotlib.dates as mdates\n\nfrom sklearn.cluster import DBSCAN\nfrom sklearn import metrics\nfrom sklearn.datasets.samples_generator import make_blobs\nfrom sklearn.preprocessing import StandardScaler\n\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\"))\nseed = 11389\n","execution_count":null,"outputs":[]},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":true},"cell_type":"code","source":"df = pd.read_csv('../input/dataset_X.csv')\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"3edb93b341be6030c9398c6a9a1681c760e4db65"},"cell_type":"code","source":"df.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"46d3b88cc3f19b28b3df6e4237459db4ecb6913a"},"cell_type":"code","source":"df.describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"d39721bd0636e5e2f753129face100c1926f7468"},"cell_type":"code","source":"dft = pd.DataFrame(StandardScaler().fit_transform(df.drop(['id'], axis = 1)))\ndft.describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"89578f32807e1826fe8269834b7141fb1431b64c"},"cell_type":"code","source":"db = DBSCAN(eps=0.3, min_samples=100).fit(dft.sample(100000, random_state=0))\ncollections.Counter(db.labels_)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"5af4a9d72397d28a52c978a9ad4a086384f40a2e"},"cell_type":"markdown","source":"# Conclusion\nNo clusters found. The features seem to cover the space uniformly. Like a Monte Carlo over the function in question."}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}