Skip to content

Instantly share code, notes, and snippets.

@kuchaale
Forked from JiaweiZhuang/metamodelling.ipynb
Created June 4, 2018 06:26
Show Gist options
  • Save kuchaale/d24ab2ccb9c3335fb1b309151c7d2203 to your computer and use it in GitHub Desktop.
Save kuchaale/d24ab2ccb9c3335fb1b309151c7d2203 to your computer and use it in GitHub Desktop.
Performance of different ML algorithms for fitting functions
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from sklearn.metrics import r2_score"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Rereference\t\n",
"- Jin, Ruichen, Wei Chen, and Timothy W. Simpson. \"Comparative studies of metamodelling techniques under multiple modelling criteria.\" Structural and multidisciplinary optimization 23.1 (2001): 1-13."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def f4(x1, x2):\n",
" y = (30+x1*np.sin(x1))*(4+np.exp(-x2**2))\n",
" return y"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"x1, x2 = np.meshgrid(np.linspace(0,10),\n",
" np.linspace(0,6))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"y = f4(x1, x2)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.colorbar.Colorbar at 0x11b197e48>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAD8CAYAAADUv3dIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGIhJREFUeJzt3X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.figure.Figure at 0x11b009a90>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.contourf(x1, x2, y)\n",
"plt.colorbar()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(2500, 2)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X = np.stack([x1.ravel(), x2.ravel()], axis=1)\n",
"X.shape"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"(2500,)"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Y = y.ravel()\n",
"Y.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# ANN"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from sklearn.neural_network import MLPRegressor"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"nn = MLPRegressor(hidden_layer_sizes=(20, 20), \n",
" activation='tanh', solver='lbfgs', max_iter=10000)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 47.8 s, sys: 7.52 s, total: 55.3 s\n",
"Wall time: 28.3 s\n"
]
},
{
"data": {
"text/plain": [
"MLPRegressor(activation='tanh', alpha=0.0001, batch_size='auto', beta_1=0.9,\n",
" beta_2=0.999, early_stopping=False, epsilon=1e-08,\n",
" hidden_layer_sizes=(20, 20), learning_rate='constant',\n",
" learning_rate_init=0.001, max_iter=10000, momentum=0.9,\n",
" nesterovs_momentum=True, power_t=0.5, random_state=None,\n",
" shuffle=True, solver='lbfgs', tol=0.0001, validation_fraction=0.1,\n",
" verbose=False, warm_start=False)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%time nn.fit(X, Y)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.074035161840334568"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nn.loss_"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"y_pred_nn = nn.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.96 ms ± 332 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
"source": [
"%timeit y_pred_nn = nn.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.99954188355407192"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r2_score(y_pred_nn, Y)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x1183c3f60>"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8lNWh//HPmUw2EkKALJCwBANBFhUUuODG5oYbdrPa\nRVwq3lprVWrR1lqXuqBerLa3i79qwVax+GpVhOsCKthSEFEBWQxkJCgEmAkQyITsOb8/ZnEmZCNk\nnfm+Xy9ezHPOSTg86teT85znHGOtRUREIpejszsgIiLtS0EvIhLhFPQiIhFOQS8iEuEU9CIiEU5B\nLyIS4RT0IiIRTkEvIhLhFPQiIhHO2dkdAEhLS7M5OTmd3Q0RkW7lo48+KrbWpjfXrksEfU5ODuvX\nr+/sboiIdCvGmF0taaepGxGRCKegFxGJcAp6EZEIp6AXEYlwCnoRkQin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QKcQB9gInAnsNgYYzq3S53ih8Dt1tqBwO3As53cnw4RiUG/\n3xjTH8D/e+BH1D345moDBvjLIpYx5lrgUuC7/v/pQXTdh1x8860bjTGF+P6uHxtj+hFd9wF8I9R/\nWp91QB2+fV6i7T7MAv7p//wyX03PRPR9iMSgX4LvHyb+318LKb/KGBNvjBkCDAPWdUL/OoQx5iJ8\n89KXW2uPhlRFzX2w1n5qrc2w1uZYa3Pwhd3p1tp9RNF98HsV3wNZjDF5QBy+zbyi7T4UAZP9n6cB\nO/yfI/s+dPbT4BP5BSwC9gLV+P4jvgHoC7yD7x/gCqBPSPtf4Huano//yXsk/GrkPhTgm3Pc4P/1\nx2i8D/XqC/Gvuom2+4Av2P8GbAY+BqZF6X04G/gI3wqbD4AzIv0+WGv1ZqyISKSLxKkbEREJoaAX\nEYlwCnoRkQinoBcRiXAKehGRCKegFxGJcAp6EZEIp6AXEYlw/x8l0UVe+K+ksgAAAABJRU5ErkJg\ngg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x1183c3d30>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(Y, Y, color='k', linewidth=1)\n",
"plt.scatter(Y, y_pred_nn, alpha=0.5, s=10)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.colorbar.Colorbar at 0x11a832828>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAD8CAYAAADUv3dIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGLBJREFUeJzt3XuwHOV95vHvw9EFkBSQLUwRCVbCK5SAysiRwtpmw2Jw\nbNahrOxmk0JVYdnYiUIKE5xKymXWTtg4RZVz3Xg367BnkQxJsFgWYcJSCYF1vJZTMRBhK1gSKEbg\n2EfGlnVBXCJ045c/po89HM053TPT8/Z0z/Opmjo9P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yEuZlZ\nQg5dM7OESg3dfk4XHlaSzpX0eUk7s9MCb6q6prJIGpP0FUkPVl1LWSSdKeleSU9LekrS26uuqV+S\nfiXb9rZL2iTp1Kpr6oWkjZL2StreNq+002vrorTQ7fV04Ro4DvxqRFwIvA24oSGvC+Am4KmqiyjZ\nJ4GHIuKHaJ3GWevXJ2kx8MvAmohYSWtn9jXVVtWzO4Cpx9SWdnptXZTZ0+36dOE6iIjnI+LL2fRL\ntN7Ei6utqn+SlgA/AdxedS1lkXQGcBmwASAijkbEC9VWVYpZwGmSZgGnA9+quJ6eRMQW4MCU2aWd\nXlsXZYbuYuCbbfcnaEA4tZO0FHgr8Fi1lZTiD4EPA0264s0y4LvAp7Nhk9slzau6qH5ExB7g94Bv\nAM8DhyLi4WqrKtXZEfF8Nv1t4Owqi0nBO9IKkjQf2Ax8KCJerLqefki6GtgbEU9UXUvJZgE/Avxx\nRLyV1mmctf53NRvjXEvrA+UHgXmSfrbaqgYjWsevNv4Y1jJDt7GnC0uaTStw74qI+6qupwSXAu+T\n9HVaw0BXSPqzaksqxQQwERGT/4ncSyuE6+xdwHMR8d2IOAbcB7yj4prKVNrptXVRZug28nTh7IpC\nG4CnIuIPqq6nDBFxc0QsiYiltP5Ofx0Rte89RcS3gW9Kmrwm45XAzgpLKsM3gLdJOj3bFq+k5jsH\npyjt9Nq6KPMqY72cLlwHlwLXAl+VtC2b958j4i8qrMmmdyNwV/bB/yzwcxXX05eIeEzSvcCXaR1J\n8xWG89TZXJI2AZcDiyRNALcApZ1eWxc+DdjMLCHvSDMzS8iha2aWkEPXzCwhh66ZWUIOXTOzhBy6\nZmYJOXTNzBL6Z+w+ylDnpGqPAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x1183c35f8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.contourf(x1, x2, y_pred_nn.reshape(50,50))\n",
"plt.colorbar()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# SVM"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from sklearn.svm import SVR"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"SVR(C=10000000000.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1,\n",
" gamma='auto', kernel='rbf', max_iter=-1, shrinking=True, tol=0.001,\n",
" verbose=False)"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"clf = SVR(C=1e10)\n",
"clf.fit(X, Y) "
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"y_pred_svm = clf.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"7.59 ms ± 208 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
"source": [
"%timeit clf.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.99998705295039281"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r2_score(y_pred_svm, Y)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.colorbar.Colorbar at 0x11aee8978>"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAD8CAYAAADUv3dIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGORJREFUeJzt3X2wXHV9x/H3hxuSAKEQDTA2CU2wIS1kJJZbqtLSCD5Q\ndUyfJ8yU0mqb0kGLfRgr1ZbWDjNW7YOtVXoLEbQYSglSylgKtWrsKOBFU0wCVAJWb0RjCISHhjzx\n7R97rm5v7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": [
"<matplotlib.figure.Figure at 0x11a95a198>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.contourf(x1, x2, y_pred_svm.reshape(50,50))\n",
"plt.colorbar()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# RF"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from sklearn.ensemble import RandomForestRegressor"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"rf = RandomForestRegressor(n_estimators=5, n_jobs=5, \n",
" max_leaf_nodes=200)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,\n",
" max_features='auto', max_leaf_nodes=200,\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=5, n_jobs=5,\n",
" oob_score=False, random_state=None, verbose=0, warm_start=False)"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rf.fit(X, Y) "
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.99868159386253585"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"y_pred_rf = rf.predict(X)\n",
"r2_score(y_pred_rf, Y)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x11b19c550>"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4nNVh7/HvmUU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7l5XPAQBr7az9BZwOrAK2pZV9B7gxcX0jcEfiegWwFfAAiwAf4JzuP8MkPofzAFfi\n+o5cfQ6J8oXAk8TXalTm4nMAzgKeBjyJz9U5+hyeAtYnri8Ensv252Ctnd09emvtC8DBIcWXAj9J\nXP8E+IO08oestSFr7W5gF7CGLDDSc7DWPmWtjSQ+bgYWJK5z6jkk3AX8NZD+QirXnsMXgduttaFE\nnbZEea49BwuUJK5LgebEddY+B5jlQzeHMNdaeyBx3QLMTVzXAnvT6u1LlOWCPwWeSFzn1HMwxlwK\n7LfWbh1yK6eeA7AE+Lgx5nfGmOeNMackynPtOVwP/L0xZi/wD8BNifKsfg7ZGPQpNv7fZDk9rcgY\nczMQAX423W2ZasaYQuBrwC3T3ZYZwAWUA2uBvwIeNsaY6W3StPgi8GVr7ULgy8C/TXN7pkQ2Bn2r\nMWY+QOL35H+i7ic+Vpu0IFGWtYwxnwMuBj6d+D89yK3n0Eh8vHWrMaaJ+J91izFmHrn1HCDeQ/2F\njXsFiBHf5yXXnsNVwC8S1z/nw+GZrH4O2Rj0jxL/m0ni91+llV9ujPEYYxYBxwKvTEP7poQx5gLi\n49KXWGv7027lzHOw1r5lra221jZYaxuIh90qa20LOfQcEh4h/kIWY8wSII/4Zl659hyagTMS12cD\n7yWus/s5TPfb4CP5BTwIHADCxP8lvhqoAJ4h/jfwaaA8rf7NxN+m7yDx5j0bfh3iOewiPub4RuLX\nD3LxOQy530Ri1k2uPQfiwf7vwDZgC3B2jj6HjwGvE59h8zvg5Gx/DtZarYwVEcl22Th0IyIiaRT0\nIiJZTkEvIpLlFPQiIllOQS8ikuUU9CIiWU5BLyKS5RT0IiJZ7v8DrNDSgU+kp44AAAAASUVORK5C\nYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x11b172438>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(Y, Y, color='k', linewidth=1)\n",
"plt.scatter(Y, y_pred_rf, alpha=0.5, s=10)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"104 ms ± 508 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
]
}
],
"source": [
"%timeit rf.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.colorbar.Colorbar at 0x11b45cfd0>"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAD8CAYAAADUv3dIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF9RJREFUeJzt3X+QJPV93vH3wx4/ToDhpAMKc5A7lONsuBInsyaSiAlC\nskRklXB+uaBiQizFF1xIRo5TiohkE8tFlWI7jhXbMtnACWSjI4RDmFAKhsiykMsCfEgXdMcPiwNZ\n2hPSCY7fPg7uePLH9Iphb2+nZ7ene6bneVVtbXdPd38/szvzzHe+090j20RERD0OarqAiIhxktCN\niKhRQjciokYJ3YiIGiV0IyJqlNCNiKhRqdCVdLSkmyQ9JOlBSW8ddGEREXWTtEHSTklbu5adLumr\nkr4h6X9L+pFi+UpJuyVtKX6uKtVGmeN0JV0HfMX21ZIOAV5n++kF3q+IiKEk6WzgeeCzttcWy/4a\n+Pe2vyzp/cAq278maSVw28x6ZfXs6Uo6CjgbuAbA9ksJ3IhoI9t3AbtmLT4FuKuYvhP4Z4tpY0mJ\ndVYBPwA+I+l04D7gMtsvdK8kaT2wHkAHH3LGYcuOXUxd0WXixWbOGjxo98uNtNvtlaUHV7q/fYdp\ncdsfWlEhXSYO3VfJfvbtmahkPwATe/pcv+RjdPZj6tmXdz5h+5j+Wnuts845zE/veqXUug984+Vt\nwItdi6ZsT/XYbBtwPnAL8C+AE7tuWyVpC/AM8HHbX+lVQ8/hBUmTwN3AWbbvkfQp4Fnbv3agbV53\n3IlefcG/69V2lL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dcZzlNne5K0ETgHWC5pGrgCqOz02lGR04AjImqUD9IiImqU0I2IqFFCNyKiRgndiIga\nJXQjImqU0I2IqFFCNyKiRv8fzgIAAvfsLvkAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x11b172390>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.contourf(x1, x2, y_pred_rf.reshape(50,50))\n",
"plt.colorbar()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pytorch"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import torch\n",
"from torch.autograd import Variable"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"x = Variable(torch.from_numpy(X).type(torch.FloatTensor))\n",
"y = Variable(torch.from_numpy(Y.reshape(-1,1)).type(torch.FloatTensor))"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"H1, H2 = 20, 20\n",
"\n",
"model = torch.nn.Sequential(\n",
" torch.nn.Linear(2, H1),\n",
" torch.nn.BatchNorm1d(H1),\n",
" #torch.nn.Dropout(),\n",
" torch.nn.Tanh(),\n",
" torch.nn.Linear(H1, H2),\n",
" torch.nn.BatchNorm1d(H2),\n",
" #torch.nn.Dropout(),\n",
" torch.nn.Tanh(),\n",
" torch.nn.Linear(H2, 1)\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"50 3.1374166011810303\n",
"100 0.6595962643623352\n",
"150 0.23710793256759644\n",
"200 0.08169987797737122\n",
"250 0.034176066517829895\n",
"300 0.022618694230914116\n",
"350 0.013968806713819504\n",
"400 0.00791569147258997\n",
"450 0.0064892577938735485\n",
"500 0.00543169304728508\n"
]
}
],
"source": [
"loss_fn = torch.nn.MSELoss()\n",
"\n",
"# LBFGS can make error very small\n",
"optimizer = torch.optim.LBFGS(model.parameters(), lr=0.1)\n",
"#optimizer = torch.optim.Adam(model.parameters(), lr = 0.01)\n",
"\n",
"for t in range(500):\n",
" \n",
" def closure():\n",
" optimizer.zero_grad()\n",
" y_pred = model(x)\n",
" loss = loss_fn(y_pred, y)\n",
" loss.backward()\n",
" return loss\n",
" optimizer.step(closure)\n",
" \n",
" if (t+1)%50==0:\n",
" y_pred = model(x)\n",
" loss = loss_fn(y_pred, y)\n",
" print(t+1, loss.data[0])"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"y_pred = model(x)"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.42 ms ± 96 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
"source": [
"%timeit model(x)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.99998320023540554"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r2_score(y_pred.data.numpy(), Y)"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x122c08978>"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH+hJREFUeJzt3Xl4VNX9x/H3NxB2RCEssoQgi7KooAEFqqzuImrVQq1C\n1YJbkUXZ1IK2oLhRkbYWN1B/Bm1LEaGoEIm2GhqgoAIaYIS0YHUGrW0HFQue3x+ZjDPZ11k/r+fJ\nw53vvYHDUT4czj33XHPOISIiiSsl2g0QEZG6paAXEUlwCnoRkQSnoBcRSXAKehGRBKegFxFJcA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E1wOtgGwK/wOuB1qGXH8nhXfT8wnceU+ErzL6YQ+Fc47bAl+PJ2M/\nFDu/j8Cqm2TrBwqD/XlgO/A3YHiS9sP3gC0UrrD5K3B6oveDc05PxoqIJLpEnLoREZEQCnoRkQSn\noBcRSXAKehGRBKegFxFJcAp6EZEEp6AXEUlwCnoRkQT3/5JwyaTWUb/2AAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x122c085c0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(Y, Y, color='k', linewidth=1)\n",
"plt.scatter(y_pred.data.numpy(), Y, alpha=0.5, s=10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Keras"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using TensorFlow backend.\n"
]
}
],
"source": [
"import keras\n",
"from keras import models\n",
"from keras import layers\n",
"from keras import regularizers"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /Users/zhuangjw/Research/Computing/miniconda3/envs/geo/lib/python3.6/site-packages/tensorflow/python/ops/nn_impl.py:667: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"keep_dims is deprecated, use keepdims instead\n"
]
}
],
"source": [
"network = models.Sequential()\n",
"network.add(layers.Dense(20, activation='tanh', input_shape=(2,)))\n",
"network.add(layers.BatchNormalization())\n",
"network.add(layers.Dense(20, activation='tanh'))\n",
"network.add(layers.BatchNormalization())\n",
"network.add(layers.Dense(1, activation=None))"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"network.compile(optimizer=keras.optimizers.Adam(lr=0.01), \n",
" loss='mse')"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 1/3\n",
"1000/1000 [==============================] - 5s 5ms/step - loss: 1618.2311\n",
"Epoch 2/3\n",
"1000/1000 [==============================] - 4s 4ms/step - loss: 0.0568\n",
"Epoch 3/3\n",
"1000/1000 [==============================] - 4s 4ms/step - loss: 0.0470\n"
]
},
{
"data": {
"text/plain": [
"<keras.callbacks.History at 0x1337cfa58>"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"network.fit(X, Y, epochs=3, steps_per_epoch=1000, verbose=1)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"y_pred = network.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"35.6 ms ± 3.33 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
]
}
],
"source": [
"%timeit network.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.99348591424505939"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r2_score(y_pred, Y)"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x1337cf320>"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl81NW9//HXmT2Z7MkkkIQkkBAW2USgoFZA3Cgg1/be\nVrsIrbe0LtWqt6LV1npbb6WLbe/119+Ve2vV3tZqf9e6KxYq0FYsVdSqQJCBgCGEJJBtJjOTWc7v\nj5kMM1nIQtaZz/Px4MF3zvdkPOeBvj2c7/meo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zP9kjdjhRAiwSXz1I0QQiQFCXohhEhwEvRCCJHgJOiFECLBSdALIUSCk6AXQogEJ0EvhBAJToJe\nCCES3P8Ha3DuPfGcTksAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x1337cf358>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.plot(Y, Y, color='k', linewidth=1)\n",
"plt.scatter(y_pred, Y, alpha=0.5, s=10)"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.colorbar.Colorbar at 0x1345ca668>"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAAD8CAYAAADUv3dIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGKJJREFUeJzt3X2wXPVh3vHv4ytexEtAtoAhCCpBhRLQGDko1DYNxdix\nqcOY9M0D01Aau1HJYAen6XhM7YTGGWbcJE3jNnXoLciQBItQhAllXAJ1HMsZG4iwVSzxEiMgtmRs\nGcR7hEDi6R97Ll5f3Xv37O7Zs7tnn8/Mzj3n7Dnn9zt7zz772995WdkmIiLq8YZhVyAiYpIkdCMi\napTQjYioUUI3IqJGCd2IiBoldCMialQqdCUdLekWSQ9LekjS2wZdsYiIuklaL2mXpK1t086Q9DVJ\n35T0vyX9WDF9uaQ9krYUj2tKlVHmPF1JNwBfsX2tpIOBw2w/2+N2RUSMJEnnAC8Cf2R7dTHtr4F/\nb/vLkj4ArLD965KWA3fMzFdWx5aupKOAc4DrAGy/ksCNiCayvQnYPWvyqcCmYvhu4J/1U8aiEvOs\nAH4AfFbSGcD9wBW2X2qfSdI6YB2ADjr4zEOXHNtPvWIOUy/Xf/XgG/a8WnuZM15bfFCl69t/qHpf\n9pAKK1KYOmR/JevZv3eqkvUATO3tcv6S++R8+9Hzr+56yvYx3ZX6o84+91A/u/u1U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1qpSx9l+\nshj+HnDcMCtThxxIK0nSEcBG4CO2nx92ffoh6QJgl+37h12Xii0Cfgr4Q9tvoXUZ51h/XS36OC+k\n9YHy48Dhkn5huLUaDLfOX238OaxVhm5jLxeWdBCtwL3R9q3Drk8FzgbeJ+kJWt1A50n6k+FWqRI7\ngB22Z76J3EIrhMfZu4DHbf/A9qvArcDbh1ynKlV2ee24qDJ0G3m5cHFHoeuAh2z/3rDrUwXbV9pe\nZns5rf/TX9ge+9aT7e8B35G0qpj0TuDBIVapCt8G3irpsGJffCdjfnBwlsourx0XVd5lrJfLhcfB\n2cAlwDclbSmm/QfbXxhinWJ+HwZuLD74HwN+ccj16YvteyXdAnyd1pk032A0L53tSNIG4FxgqaQd\nwFVAZZfXjotcBhwRUaMcSIuIqFFCNyKiRgndiIgaJXQjImqU0I2IqFFCNyKiRgndiIga/X9CmbVZ\n5DqwagAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x134370b00>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.contourf(x1, x2, y_pred.reshape(50,50))\n",
"plt.colorbar()"
]
}
],
"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.2"
},
"toc": {
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"toc_cell": false,
"toc_position": {},
"toc_section_display": "block",
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment