Skip to content

Instantly share code, notes, and snippets.

@JiaweiZhuang
Last active August 17, 2018 01:16
Show Gist options
  • Save JiaweiZhuang/8d565f71f15f194cb7f3b07527f248bd to your computer and use it in GitHub Desktop.
Save JiaweiZhuang/8d565f71f15f194cb7f3b07527f248bd to your computer and use it in GitHub Desktop.
Failed uncertainty estimate experiments
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Try two methods to predict uncertainty.\n",
"\n",
"Ensemble method `forestci`:\n",
"- https://github.com/scikit-learn-contrib/forest-confidence-interval\n",
"- Usage: http://contrib.scikit-learn.org/forest-confidence-interval/auto_examples/plot_mpg.html#sphx-glr-auto-examples-plot-mpg-py\n",
"\n",
"\n",
"Conformal prediction `nonconformist`:\n",
"- https://github.com/donlnz/nonconformist\n",
"- Usage: https://github.com/donlnz/nonconformist/blob/master/README.ipynb"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/zhuangjw/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.\n",
" from numpy.core.umath_tests import inner1d\n",
"Failed to import duecredit due to No module named 'duecredit'\n"
]
}
],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import xarray as xr\n",
"\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.preprocessing import StandardScaler\n",
"from sklearn.metrics import mean_squared_error, r2_score\n",
"\n",
"from sklearn.ensemble import RandomForestRegressor\n",
"\n",
"import forestci as fci\n",
"\n",
"from nonconformist.cp import IcpRegressor\n",
"from nonconformist.nc import NcFactory"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Frozen(SortedKeysDict(OrderedDict([('lon', 144), ('lat', 91), ('lev', 25), ('time', 20)])))"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ds = xr.open_mfdataset('./nc/*.nc4').drop('KPP_RFactive')\n",
"ds.dims"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Preprocessing"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"df = ds.isel(time=0, lev=0, drop=True).to_dataframe().reset_index(drop=True).rename(columns=lambda s: s.replace('KPP_', ''))\n",
"\n",
"df_y = df.iloc[:, df.columns.str.startswith('AFTER_CHEM')].rename(columns=lambda s: s.replace('AFTER_CHEM_', ''))\n",
"\n",
"df_x = df.iloc[:, df.columns.str.startswith('BEFORE_CHEM')].rename(columns=lambda s: s.replace('BEFORE_CHEM_', ''))\n",
"\n",
"df_in = df.iloc[:, ~df.columns.str.startswith('AFTER_CHEM')].rename(columns=lambda s: s.replace('BEFORE_CHEM_', ''))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(13104, 1)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# scaling has no effect for decision tree\n",
"# do this just for neural nets\n",
"X_all= StandardScaler().fit_transform(df_in)\n",
"X_all.shape\n",
"\n",
"# predict the difference\n",
"# pick up a single variable for now\n",
"Y_all = StandardScaler().fit_transform( (df_y-df_x)[['O3']]) \n",
"Y_all.shape"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"X_train, X_test, Y_train, Y_test = train_test_split(X_all, Y_all, test_size=0.2, random_state=42)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(10483, 127)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X_train.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Basic random forest"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"model_rf = RandomForestRegressor(n_estimators=20, max_leaf_nodes=1000, verbose=2)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/zhuangjw/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/ipykernel_launcher.py:1: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n",
" \"\"\"Entry point for launching an IPython kernel.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"building tree 1 of 20\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Parallel(n_jobs=1)]: Done 1 out of 1 | elapsed: 1.0s remaining: 0.0s\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"building tree 2 of 20\n",
"building tree 3 of 20\n",
"building tree 4 of 20\n",
"building tree 5 of 20\n",
"building tree 6 of 20\n",
"building tree 7 of 20\n",
"building tree 8 of 20\n",
"building tree 9 of 20\n",
"building tree 10 of 20\n",
"building tree 11 of 20\n",
"building tree 12 of 20\n",
"building tree 13 of 20\n",
"building tree 14 of 20\n",
"building tree 15 of 20\n",
"building tree 16 of 20\n",
"building tree 17 of 20\n",
"building tree 18 of 20\n",
"building tree 19 of 20\n",
"building tree 20 of 20\n",
"CPU times: user 18.9 s, sys: 206 ms, total: 19.1 s\n",
"Wall time: 19.4 s\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Parallel(n_jobs=1)]: Done 20 out of 20 | elapsed: 19.4s finished\n"
]
},
{
"data": {
"text/plain": [
"RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
" max_features='auto', max_leaf_nodes=1000,\n",
" min_impurity_decrease=0.0, min_impurity_split=None,\n",
" min_samples_leaf=1, min_samples_split=2,\n",
" min_weight_fraction_leaf=0.0, n_estimators=20, n_jobs=1,\n",
" oob_score=False, random_state=None, verbose=2, warm_start=False)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%time model_rf.fit(X_train, Y_train)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x1c180c77b8>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xm0HVWZ9/HvjzAkl0AiMxkkCLRAAga4gt2NItBgumVUkNAi4cXutAivNCovqGhHXGhkEFEwGJTJhQEHplaw6RXAlgbBmxAyMBgiEULCFKaEEDTJ8/5R+ySVc8+995zkDHXv/X3WOitVu3bV2acW5MmuXfvZigjMzMzqYZNWN8DMzPoOBxUzM6sbBxUzM6sbBxUzM6sbBxUzM6sbBxUzM6sbBxUzM6sbBxUzM6sbBxUzM6ubTVvdgGbbbrvtYtSoUa1uhplZrzJjxoxXImL7nur1u6AyatQoOjo6Wt0MM7NeRdKfq6nXtMdfkpaX7Z8m6cq0/XlJj0uaLWm6pF1y9UZLulfSHyXNl/RVSUrHPpnOmS3pQUnva9bvMTOzzorSU3kUaI+IFZLOAC4GTpI0CLgTOCMi7pHUBvwS+CxwFfAMcEhEvCbpH4GpwEHdfdGyZXOYfu9u65UdftiCuv8gM7P+qBAD9RFxX0SsSLu/B0ak7X8G/jci7kn1VgBnAeen/Qcj4rUK55mZWQs0s6cySNKs3P42ZL2Qcp8G7k7bo4EZ+YMRsUDSYElbR8SbXZxnZmYt0Myg8nZEjC3tSDoNaM9XkHRKKjukVAR0teDL2nJJh5IFlY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SLolHX9Y0qjmt7I1qrg3H5I0U9IqSSe0oo2tUsW9+bykxyXNljRd0i6taGerVHF/PiNpjqRZkh6QtHcr2tkKPd2bXL0T0lpRffONsIjocx9gALAAeA+wOfAYsHdZnc8CV6ft8cAtrW53ge7NKGBfskSeJ7S6zQW7N4cCbWn7jP7y300N92fr3PYxwG9a3e6i3JtUbyvgf4DfA+2tbncjPn21p3Ig8HRE/Cki/gLcDBxbVudYsvVXAH4BHC5JTWxjq/R4byJiYUTMBta0ooEtVM29uS8iVqTd3wMjmtzGVqrm/ryZ292SClnD+6hq/s4B+AZZ3sKVzWxcM/XVoDIceC63vyiVVawTEauAN4Btm9K61qrm3vRXtd6bTwN3N7RFxVLV/ZF0pqQFZH95VrNkRV/Q472RtB8wMiJ+1cyGNVtfDSqVehzl/2Kqpk5f1F9/dzWqvjeSTgHagUsa2qJiqer+RMRVEbEb2eqsFzS8VcXQ7b2RtAlwOfCFprWoRfpqUFkEjMztjwAWd1VH0qbAEODVprSutaq5N/1VVfdG0j8AXwGOiYh3mtS2Iqj1v52bgeMa2qLi6OnebAWMAe6XtBD4AHBnXxys76tB5Q/AHpJ2lbQ52UD8nWV17gQmpO0TgHsjjaT1cdXcm/6qx3uTHmH8kCygvNSCNrZSNfdnj9zuR4H5TWxfK3V7byLijYjYLiJGRcQosvG4YyKiozXNbZw+GVTSGMlZwH8BTwA/i4h5ki6UdEyq9mNgW0lPA58HunwFsC+p5t5Ier+kRcCJwA8lzWtdi5unyv9uLgEGAz9Pr832m4Bc5f05S9I8SbPI/r+a0MXl+pQq702/4Bn1ZmZWN32yp2JmZq3hoGJmZnXjoGJmZnXjoGJmZnXjoGJmZnXjoGJmZnXjoGJmZnXjoGJmZnXz/wGAmaUOOYAikwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# feature importance diagnostics\n",
"feat_importances = pd.Series(model_rf.feature_importances_, index=df_in.columns)\n",
"feat_importances.nlargest(20).plot(kind='barh')"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Parallel(n_jobs=1)]: Done 1 out of 1 | elapsed: 0.0s remaining: 0.0s\n",
"[Parallel(n_jobs=1)]: Done 20 out of 20 | elapsed: 0.0s finished\n",
"[Parallel(n_jobs=1)]: Done 1 out of 1 | elapsed: 0.0s remaining: 0.0s\n",
"[Parallel(n_jobs=1)]: Done 20 out of 20 | elapsed: 0.0s finished\n"
]
}
],
"source": [
"Y_pred_train = model_rf.predict(X_train)\n",
"Y_pred_test = model_rf.predict(X_test)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(0.979036008792889, 0.8272216700069426)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r2_score(Y_pred_train, Y_train), r2_score(Y_pred_test, Y_test)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x1c180c71d0>"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl0XOWZ5/HvU6XSLnnRZuPdgLEcYxyk2IFsQOQQ21kAH3oC6Q5Mp+Oc6YTpTkKGZNI5k9M5Wchkme7MTE+cDk16EshmEphgIBINDYmNQXIc20jCOHZsyzZleZVkrVX1zh9VJZfl0l6lWvT7nKNTpdru64v46dVzn/tec84hIiLZw5PqAYiISGIp2EVEsoyCXUQkyyjYRU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0gupHdWo/GY21zl3IlJzPZnqAY3EOeeP3k/Hn10z8xEOyR875x6LPJy2+zjeeJO1j9Nmxj5BTwAfMrM8M1sCXA28nOIxXSLywxV1O7BvuNem0CvA1Wa2xMxygQ8R3rdpycyKIgegMLMi4D2k534d6gngnsj9e4DHUziWUaXzz66ZGfADoMU59+2Yp9JyHw833mTt40zpirkd+C5QAZwDdjvnbo089wXgL4EA4T9vnkrZQOMws/9L+M8sB/wJ+Hi0BphOIm1W/wPwAg85576S4iENy8yWAr+MfJsDPJJu4zWzR4GbCK/e5wf+G/Ar4GfAQuAIcKdzLi0OWA4z3ptI059dM3s78CKwl3DHHMB/JVy3Trt9PMJ47yIJ+zgjgl1ERMYu00sxIiIyhIJdRCTLKNhFRLKMgl1EJMso2EVEsoyCXUQkyyjYRUSyjIJdRCTL/H8ZoPIsKcmdxAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.scatter(Y_train, Y_pred_train, alpha=0.5, s=4)\n",
"plt.scatter(Y_test, Y_pred_test, alpha=0.5, s=4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ensemble method for error estimate"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/zhuangjw/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/mkl_fft/_numpy_fft.py:1044: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
" output = mkl_fft.rfftn_numpy(a, s, axes)\n"
]
}
],
"source": [
"# variance (calibrated) as an indicator of error\n",
"rf_error = fci.random_forest_error(model_rf, X_train, X_test)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(69.44043213133598, 67.16287773993044)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rf_error.max(), rf_error.mean() # this is huge"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x1c1a9e6ba8>]"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xt8lOWZ//HP9cwpkwNJIBhCgAIKEomKHFSqlaKArK7VKtittvXQV7H18MJzrdqK3fWw1mrb3ZYWK1u7+rNVsV1dLR7Qql1tJWiRQAoIRCCEACHnzPm5f3/MJCaYhBwmmUOu96tpkieTmWsy5pub67mf+xZjDEoppdKHlegClFJKxZcGu1JKpRkNdqWUSjMa7EoplWY02JVSKs1osCulVJrRYFdKqTSjwa6UUmlGg10ppdKMMxEPWlBQYCZOnJiIh1ZKqZS1YcOGQ8aY0Ue7XUKCfeLEiZSVlSXioZVSKmWJyCe9uZ22YpRSKs1osCulVJrRYFdKqTSjwa6UUmlGg10ppdJMr4NdRMaLyJsiUiEim0Vkeez4ChGpEpG/x97OG7xylVJKHU1fpjuGgVuMMR+ISA6wQURei33tUWPMw/EvTymlVF/1OtiNMdVAdezjJhGpAIoHqzCllEonhw4dIhwOM2bMmEF/rH712EVkInAK8LfYoetF5CMRWS0i+d18zzIRKRORsoMHD/arWKWUSjXGGJ544gmmTZvGddddNySP2edgF5FsYA1wozGmEVgJHAvMIDqi/3FX32eMWWWMmW2MmT169FGviFVKqZS3fft2FixYwJVXXsnxxx/PvffeOySP26clBUTERTTUnzLGPA9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gmvpERLJiJ4wQkSxgEanxs+/OC8AVsY+vAP4ngbX0War9HoiIAI8DFcaYRzp8KWVeh+6ew1C8FsNhVsx/E/0njwEqgWvaenTJLDYF6ieAA1htjLkvwSX1iYhMBv4Q+9QJ/L9UeQ4i8jTwRaKr8NUA9wB/BJ4BJgC7gaXGmKQ8QdlN/V8khX4PRORM4B1gE2DHDt9JtEedKq9Dd8/hqwzya5H2wa6UUsNN2rdilFJquNFgV0qpNKPBrpRSaUaDXSml0owGu1JKpRkNdqWUSjMa7EoplWY02JVSKs38fzi+jWNaPnkyAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.errorbar(Y_test, Y_pred_test, yerr=np.sqrt(rf_error)/5, fmt='o', alpha=0.5)\n",
"plt.plot([-5, 25], [-5, 25], 'k--')\n",
"# almost the same for all points..."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x1c1939bd68>"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XmQnPd93/n393n66XvuGQwAAiAG4E3JulAyJYJM1hIt2VYk59iitbHKTlxFpyqVw9FW1t6tbGprK1WuxE6iqmwlYsnXKorMjWzLLjtWJEaJCVAkRfCwSAIkwZnBPYPpufp+up/jt388PQMMOAPM9PSgex58X1UsYBo93b95OP15fs/3dzxijEEppdTuZ3W7AUoppTpDA10ppWJCA10ppWJCA10ppWJCA10ppWJCA10ppWJCA10ppWJCA10ppWJ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DGNO/0MG/5FDB5p4b5dRJApnXjnizr3H1tN4hVoBPdbOOfcufccepWDPBdEXmldW/XO9kRoAD8Tqsk9zURyXW7UT3g54BvdrsR3WSMuQz8BnABmAGKxpjvdrdV7YlNoIvI54A5Y8wr3W5LD3nUGPNR4KeAvy8ij3e7QV2UAD4K/HtjzEeAKvCr3W1Sd7XKTp8H/nO329JNIjIEfAGYAPYDORH5+e62qj2xCXTgUeDzrbrx7wM/ISL/sbtN6i5jzJXWn3PAHwEf726LuuoScMkY81Lr628RBfyd7KeAV40xV7vdkC77NDBtjCkYYzzgD4FPdrlNbYlNoBtjfs0Yc8AYc5joMvL7xphdeZbtBBHJiUjfyt+BnwTe7G6ruscYMwtcFJH7Ww99CjjdxSb1gi9yh5dbWi4Aj4hIVkSE6HfjTJfb1JZEtxugdsw48EfR7ycJ4D8ZY77T3SZ13T8AvtEqNUwBf6fL7ekaEckCTwC/3O22dJsx5iUR+RbwKuADr7FLV43GbtqiUkrdqWJTclFKqTudBrpSSsWEBrpSSsWEBrpSSsWEBrpSSsWEBrpSSsWEBrpSSsWEBrpSSsXE/w/nEH6BhhQFhQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# doesn't look useful...\n",
"plt.scatter(np.sqrt(rf_error), np.abs(Y_test.ravel() - Y_pred_test), alpha=0.4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Conformal prediction for error estimate"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"nc = NcFactory.create_nc(RandomForestRegressor(n_estimators=10, max_leaf_nodes=1000))\n",
"model_icp = IcpRegressor(nc)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(10483, 127)"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X_train.shape"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/zhuangjw/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/nonconformist/base.py:60: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n",
" self.model.fit(x, y, **self.fit_params)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 4.08 s, sys: 31.3 ms, total: 4.11 s\n",
"Wall time: 4.14 s\n"
]
}
],
"source": [
"%time model_icp.fit(X_train[0:5000], Y_train[0:5000])"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 2.04 s, sys: 331 ms, total: 2.37 s\n",
"Wall time: 1.95 s\n"
]
}
],
"source": [
"%time model_icp.calibrate(X_train[5000:], Y_train[5000:])"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"ename": "IndexError",
"evalue": "index 1503163 is out of bounds for axis 0 with size 5483",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<timed exec>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32m~/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/nonconformist/icp.py\u001b[0m in \u001b[0;36mpredict\u001b[0;34m(self, x, significance)\u001b[0m\n\u001b[1;32m 387\u001b[0m \t\t\t\tp = self.nc_function.predict(x[idx, :],\n\u001b[1;32m 388\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcal_scores\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcondition\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 389\u001b[0;31m \t\t\t\t significance)\n\u001b[0m\u001b[1;32m 390\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mn_significance\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 391\u001b[0m \u001b[0mprediction\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0midx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m:\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/nonconformist/nc.py\u001b[0m in \u001b[0;36mpredict\u001b[0;34m(self, x, nc, significance)\u001b[0m\n\u001b[1;32m 501\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0msignificance\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 502\u001b[0m \u001b[0mintervals\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mzeros\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 503\u001b[0;31m \u001b[0merr_dist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merr_func\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapply_inverse\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msignificance\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 504\u001b[0m \u001b[0merr_dist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhstack\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0merr_dist\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mn_test\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 505\u001b[0m \u001b[0merr_dist\u001b[0m \u001b[0;34m*=\u001b[0m \u001b[0mnorm\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/Research/Computing/miniconda3/envs/sci/lib/python3.6/site-packages/nonconformist/nc.py\u001b[0m in \u001b[0;36mapply_inverse\u001b[0;34m(self, nc, significance)\u001b[0m\n\u001b[1;32m 163\u001b[0m \u001b[0;31m# TODO: should probably warn against too few calibration examples\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 164\u001b[0m \u001b[0mborder\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmax\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mborder\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnc\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msize\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 165\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvstack\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mnc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mborder\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnc\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mborder\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 166\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 167\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mIndexError\u001b[0m: index 1503163 is out of bounds for axis 0 with size 5483"
]
}
],
"source": [
"%time y_pred_icp = model_icp.predict(X_test, significance=0.05)\n",
"# requires a terribly huge \"calibration set\""
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"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.6.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment