{"cells":[{"cell_type":"markdown","metadata":{"_cell_guid":"009a1d0a-033e-b0c3-6dab-c4f923c81c62"},"source":""},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"d0863e47-c319-621e-8f75-2cbbe8036bc3"},"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":"4ad0f542-7430-010a-2774-771d79935122"},"outputs":[],"source":"import xgboost as xgb\nfrom sklearn.metrics import matthews_corrcoef, roc_auc_score\nfrom sklearn.cross_validation import cross_val_score, StratifiedKFold\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n%matplotlib inline"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"765c9d81-5d84-09ae-d394-a59ce4a2d4cc"},"outputs":[],"source":"date_chunks = pd.read_csv('../input/train_date.csv', index_col = 0, chunksize=100000, dtype=np.float32)\nnum_chunks = pd.read_csv('../input/train_numeric.csv', index_col = 0, usecols=list(range(969)), chunksize=100000, dtype=np.float32)\nX = pd.concat([pd.concat([dchunk, nchunk], axis=1).sample(frac=0.05) for dchunk, nchunk in zip(date_chunks, num_chunks)])\npd.read_csv('../input/train_numeric.csv', index_col=0, usecols=[0,969], dtype=np.float32).oc[X.index].values.ravel()\nX = X.values"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"01875525-16c6-6baa-b2fc-3acf430c7632"},"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}