Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DryLabRebel/7440cd9bb2b51e196033c5f70cf1ca06 to your computer and use it in GitHub Desktop.
Save DryLabRebel/7440cd9bb2b51e196033c5f70cf1ca06 to your computer and use it in GitHub Desktop.
Created on Skills Network Labs
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<center>\n",
" <img src=\"https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-ML0101EN-SkillsNetwork/labs/Module%202/images/IDSNlogo.png\" width=\"300\" alt=\"cognitiveclass.ai logo\" />\n",
"</center>\n",
"\n",
"# Non Linear Regression Analysis\n",
"\n",
"Estimated time needed: **20** minutes\n",
"\n",
"## Objectives\n",
"\n",
"After completing this lab you will be able to:\n",
"\n",
"- Differentiate between Linear and non-linear regression\n",
"- Use Non-linear regression model in Python\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If the data shows a curvy trend, then linear regression will not produce very accurate results when compared to a non-linear regression because, as the name implies, linear regression presumes that the data is linear. \n",
"Let's learn about non linear regressions and apply an example on python. In this notebook, we fit a non-linear model to the datapoints corrensponding to China's GDP from 1960 to 2014.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h2 id=\"importing_libraries\">Importing required libraries</h2>\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Though Linear regression is very good to solve many problems, it cannot be used for all datasets. First recall how linear regression, could model a dataset. It models a linear relation between a dependent variable y and independent variable x. It had a simple equation, of degree 1, for example y = $2x$ + 3.\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEHCAYAAABFroqmAAAAOXRFWHRTb2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KDlJW3P0zgmakvyc6pBelvDyWoMlkhpnNSjxPepqgGWg6QZt7o7u/BowCHjWzGQTrWm/eRghnEKyJ/BLBRTcZ16PAncBzZjYTuIfsF36APwE3tuyQTvEoQX/DX1LuYsYAfzWzp4Cwpd2vBC4zs2cI+i1Stfp3SX0xx+8lHYCqskqHZ2ZDCDpaT4s7FpFyoTsHERFpRXcOIiLSiu4cRESkFSUHERFpRclBRERaUXIQEZFWlBxERKSV/weIxwQK3SMPsQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"x = np.arange(-5.0, 5.0, 0.1)\n",
"\n",
"##You can adjust the slope and intercept to verify the changes in the graph\n",
"y = 2*(x) + 3\n",
"y_noise = 2 * np.random.normal(size=x.size)\n",
"ydata = y + y_noise\n",
"#plt.figure(figsize=(8,6))\n",
"plt.plot(x, ydata, 'bo')\n",
"plt.plot(x,y, 'r') \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Non-linear regressions are a relationship between independent variables $x$ and a dependent variable $y$ which result in a non-linear function modeled data. Essentially any relationship that is not linear can be termed as non-linear, and is usually represented by the polynomial of $k$ degrees (maximum power of $x$). \n",
"\n",
"$$ \\ y = a x^3 + b x^2 + c x + d \\ $$\n",
"\n",
"Non-linear functions can have elements like exponentials, logarithms, fractions, and others. For example: $$ y = \\log(x)$$\n",
"\n",
"Or even, more complicated such as :\n",
"$$ y = \\log(a x^3 + b x^2 + c x + d)$$\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's take a look at a cubic function's graph.\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEGCAYAAACZ0MnKAAAAOXRFWHRTb2Z0d2FyZQBN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N1/mqomWjlwq6rGjvF+drLPF+BPqnp73GeXJ7iOVqShqt+KyNPAiThVUyPct/4O3KSqM92J8cZ5DtuQ5HTXAv9W1RPd/LyU4lriXye8LlPYrE3DFJL3gN4i0sd9fZrnvWeAiz1tHwd43hsoIru5bQcnAK8ALwA/E5HO7v67iUhZms9/BecmDlAZ99m/FGcNCUSke+y8KazDmbgxmfuAkUAXnBUOwSk1fOo+H5bm/DHeY86Key/R9+LVmOsyec6ChikYqroJpzpqltsQXuN5+1qcqpe3ReRd93XMf3Gqk+bj1OlXq+pCYAzwrIi8jbN2edc0WbgUZ83rN3BuxrF8PQv8E3hVRN4BHiR1QACYCkyKbwj3eBanPeMBT6lnHPAvEfkP4Hca/b8AfxKRV3DaRbzqfS/eNxt5XSbP2Sy3pqiJyFk4DbwXhZ0XY/KBlTSMMcb4ZiUNY4wxvllJwxhjjG8WNIwxxvhmQcMYY4xvFjSMMcb4ZkHDGGOMb/8furf+chwzqREAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"x = np.arange(-5.0, 5.0, 0.1)\n",
"\n",
"##You can adjust the slope and intercept to verify the changes in the graph\n",
"y = 1*(x**3) + 1*(x**2) + 1*x + 3\n",
"y_noise = 20 * np.random.normal(size=x.size)\n",
"ydata = y + y_noise\n",
"plt.plot(x, ydata, 'bo')\n",
"plt.plot(x,y, 'r') \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As you can see, this function has $x^3$ and $x^2$ as independent variables. Also, the graphic of this function is not a straight line over the 2D plane. So this is a non-linear function.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some other types of non-linear functions are:\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Quadratic\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"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h6U5UBH3CRoLwCveOeMAHp5j3fBTZfQBFezXgm0ABoD83BBd1/gX0B975yHgQu9xwp09x7fDQz2Hk8POqZ/UHlPwi2yLV55XwG6AoW4iegO8o57IaiMM3FTdIT6d/grMM17vAdujp9cYFcqBlZeCtzrPR4CzAEaB/37Bf5ddgLqeY9PAKZ6j0P+u1T5PYT8XKn+O7HN380maTOp9LGqfg8gIp/hguhGYLGqLvL2FwH9vONPwk2UdYP3vBGQ7z1+S1XXeOe8hLuJ7AA6AbO9LxONgZ+947fhghy4gHqi9/go4Gzv8SRgVNB7nwR86j1virs5LfPK+1nQtQpj+OyvAA+LyE7AOcAUVS315nx/XkTaAA2AxUHnTFfVzSGutTMwUUQ64m5o9YNeC/XvUhL0erjP9W4Mn8FkKAv8JpWC89mlVPw9hptHRICzVXVhpZ0ih4U4R73jJ6pqqBXAtqtq4Jzg9w73/gLcpaqPVXnvwhCfozFRqOpmEXkDOBOX5rnOe+kBYIyqTvcmAxsSdNpvYS43FPivqp7plWdmhM9S9XnIz2XqNsvxm3SzAGgvInt5z88Peu1N4KqgtoCDg147UUSae7n0M4APgBlADxFp7R3fXEQKorz/B7hADNCzyntfLG4OekSkbeC6EWzATVYXzrPAAGA33Epl4GrvK7zHfaJcPyD4nL5VXgv17xKsNp/LZDgL/CatqOoWXGrnVa9xd2nQy0NxaYzPRWSe9zzgfVxq5jNcjrtEVb8CBgP/FpHPcWsBt4lShGtwa8jOxgXUQLn+DUwG/iciXwBTiBzUAZ4GHq3auBvk37j8/vNB3z6GAC+KyHtArNN33w3cJSIf4NoJglX7dwl+sZafy2Q4m53TZDwR6YtrtLwy1WUxJhNYjd8YY7KM1fiNMSbLWI3fGGOyjAV+Y4zJMhb4jTEmy1jgN8aYLGOB3xhjssz/A2E5mzVS+Es9AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"x = np.arange(-5.0, 5.0, 0.1)\n",
"\n",
"##You can adjust the slope and intercept to verify the changes in the graph\n",
"\n",
"y = np.power(x,2)\n",
"y_noise = 2 * np.random.normal(size=x.size)\n",
"ydata = y + y_noise\n",
"plt.plot(x, ydata, 'bo')\n",
"plt.plot(x,y, 'r') \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exponential\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"An exponential function with base c is defined by $$ Y = a + b c^X$$ where b ≠0, c > 0 , c ≠1, and x is any real number. The base, c, is constant and the exponent, x, is a variable. \n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAERCAYAAAB2CKBkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAnPklEQVR4nO3deZxddX3/8ddntsxkspHMJGRPgABCWBLSsAiCKApUGkW0oGHTQvUHVfxVqrXWam2t1f5sFYSYn4BgEasoGJFVkCVIdkISkkBiQpIJE2ayzZLZ7/30j3OGXCYzk5tkzj13eT8fj/u4Z/mecz5nCPOZc76buTsiIlK4iuIOQERE4qVEICJS4JQIREQKnBKBiEiBUyIQESlwSgQiIgUuJxOBmd1tZnVmtibN8h83s7Vm9qqZ/Szq+EREconlYj8CM3sP0Azc5+7TD1J2GvAL4EJ332Nmo929LhNxiojkgpx8InD354HdqdvM7Fgze9zMlpvZC2Z2YrjrBuCH7r4nPFZJQEQkRU4mgj7MB/7G3c8AvgjcEW4/HjjezF40s0VmdnFsEYqIZKGSuAMYCGY2BDgH+KWZdW8eFH6XANOAC4AJwAtmNt3d92Y4TBGRrJQXiYDgyWavu5/ey74aYJG7dwKbzew1gsSwNIPxiY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jPcRgqHGpxAMuHZ6WO4XKTE+SzA/Q28/h48BD4XL4wiG7C4GjmJ/p8+/Av5fuPx1YDlQkfLz6/65DANKwuX3A78Kl3v9ufT479DrfcX970Sf6D8lveQGkTgscfcaADNbSfBLtZlg8LoN4fb/Bm4My38A+Asz+2K4Xg5MCpefcvdd4TG/JkgqXcAZwNLwYaOC/YPBdRD80oPgF+xF4fK7gY+Gyz8F/j3l2h8AXg7XhxAkq61hvCtTzjUljXt/BLjDgrkrPg486O4JM5sA/E84cF0ZsDnlmAXu3trLuYYD95rZNIIEV5qyr7efy7KU/X3d1/Np3IPkMCUCyRap78MT7P+32dcYKAZ81N1fe8dGszN7OcbD8ve6e28zZ3W6e/cxqdfu6/oG/Ju7/6jHtaf0ch8VHIS7t5rZ48BHCF4LfSHcdRvwPXdfYGYXEDwJdNvXx+m+CfzB3T8SxvNsP/fSc73X+5L8pzoCyWbrgalmdmy4flXKvieAv0mpS5iRsu8iC+YNriCYHexFgikjrzCz0WH5kWY2+SDXf5H9U2x+sse1P2VmQ8Jzje8+bz+aCAZl68sDwP8FxhDM8AXBX/fbw+VrezuoF6nHXNdjX28/l1SHc1+SB5QIJGu5exvBq6DfhZXFW1J2f5PgtccqCyYTT63MXUjwKmclwTvyZe6+Fvgq8KQFo8A+BYw9SAifB24ys6UEv2C743oS+BnwkpmtJhhptb9f8hDMdzuvZ2VxiicJ6gf+J+Xp5OvAL83sBWDnQc7f7TvAv5nZiwT1DKkO+Lmk7jzM+5I8oNFHJa+Y2XUElaA3xx2LSK7QE4GISIHTE4GISIHTE4GISIFTIhARKXBKBCIiBU6JQESkwCkRiIgUuP8FvRY/V29ulTUAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"X = np.arange(5.0, 15.0, 0.1)\n",
"##You can adjust the slope and intercept to verify the changes in the graph\n",
"\n",
"Y= np.exp(X)\n",
"\n",
"plt.plot(X,Y) \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Logarithmic\n",
"\n",
"The response $y$ is a results of applying logarithmic map from input $x$'s to output variable $y$. It is one of the simplest form of **log()**: i.e. $$ y = \\log(x)$$\n",
"\n",
"Please consider that instead of $x$, we can use $X$, which can be polynomial representation of the $x$'s. In general form it would be written as \n",
"\\begin{equation}\n",
"y = \\log(X)\n",
"\\end{equation}\n"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jupyterlab/conda/envs/python/lib/python3.6/site-packages/ipykernel_launcher.py:3: RuntimeWarning: invalid value encountered in log\n",
" This is separate from the ipykernel package so we can avoid doing imports until\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEGCAYAAAB7DNKzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAArDUlEQVR4nO3deXxV9Z3/8deHEPZ9SYBACEtYVVAjLtgqFjfGrdV2tK5dhnaqrWN/tbW102WcTju2TqfT0Y7ULra1WpdarVoV3BeURXYIskNIQoBAFiD75/fHPcFbvLm5QO49Se77+XjcR+4553vP93Mi3k++5/s936+5OyIiIi3pEnYAIiLSvilRiIhIXEoUIiISlxKFiIjEpUQhIiJxdQ07gGQYMmSI5+XlhR2GiEiHsXTp0j3uPjTWsU6ZKPLy8liyZEnYYYiIdBhmtq2lY7r1JCIicSlRiIhIXEoUIiISlxKFiIjEpUQhIiJxKVGIiEhcShQiIhJXp3yOQkQkXeytrmVDWTUbyqo5UNvAF88Z1+Z1KFGIiHQAe6treX9XNe/vqmJDWRUbdlWzsayavQfqDpfJ6tudL3x0LGbWpnUrUYiItCMVB+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WIgvBLCbyBdwc14vAH4GFZrYKeJz4SQDgt8D/HdmZHeVFIv0Tf4pq3XwPeMzM3gASXQ/5buCHZvYWkX6OaB/6vUQfPMbrkk5As8dKWjGzm4h00t4SdiwiHYVaFCIiEpdaFCIiEpdaFCIiEpcShYiIxKVEISIicSlRiIhIXEoUIiIS1/8HbpHWqkCBfAwAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"X = np.arange(-5.0, 5.0, 0.1)\n",
"\n",
"Y = np.log(X)\n",
"\n",
"plt.plot(X,Y) \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Sigmoidal/Logistic\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"$$ Y = a + \\frac{b}{1+ c^{(X-d)}}$$\n"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEJCAYAAACKWmBmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAArBUlEQVR4nO3dd5xU5dn/8c+1DVh6lbqAilRFdAXUxBIbEkvUaOz1EX0Sf9HkSR5bYoymGE3V2HhQYy+JYkUBo8YKAoqA9M5Sl74sbL9+f5xDnODsMMDOnJ3d7/v1mtecNnO+syxz7Tn3Ofdt7o6IiEhtsqIOICIi9ZsKhYiIJKRCISIiCalQiIhIQioUIiKSkAqFiIgkFGmhMLNHzWydmc2qZb2Z2b1mttDMZpjZYenOKCLS2EV9RPE3YESC9acCfcLHKODBNGQSEZEYOVHu3N3fN7NeCTY5E3jCg7sCJ5lZGzPr4u6rE71vhw4d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RlmNiuc3+lDglNF0wnO0U9199nAz4AJZjaDYBzvLruJcD3B+M9TCL6Ad+aaADwDfGJmM4F/kLgIAPwNeGjXxuwYEwjaJ56PObq5Hfi7mX0AJNsd/d3Ab83sI4J2jlhf+7nErtzLzyUNgHqPlUbFzC4naKS9LuosIplCRxQiIpKQjihERCQhHVGIiEhCKhQiIpKQCoWIiCSkQiEiIgmpUIiISEIqFCIiktD/ByDQnCv9loi5AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"X = np.arange(-5.0, 5.0, 0.1)\n",
"\n",
"\n",
"Y = 1-4/(1+np.power(3, X-2))\n",
"\n",
"plt.plot(X,Y) \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a id=\"ref2\"></a>\n",
"\n",
"# Non-Linear Regression example\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For an example, we're going to try and fit a non-linear model to the datapoints corresponding to China's GDP from 1960 to 2014. We download a dataset with two columns, the first, a year between 1960 and 2014, the second, China's corresponding annual gross domestic income in US dollars for that year. \n"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-28 07:23:17 URL:https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-ML0101EN-SkillsNetwork/labs/Module%202/data/china_gdp.csv [1218/1218] -> \"china_gdp.csv\" [1]\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Year</th>\n",
" <th>Value</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1960</td>\n",
" <td>5.918412e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1961</td>\n",
" <td>4.955705e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1962</td>\n",
" <td>4.668518e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1963</td>\n",
" <td>5.009730e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1964</td>\n",
" <td>5.906225e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>1965</td>\n",
" <td>6.970915e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>1966</td>\n",
" <td>7.587943e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>1967</td>\n",
" <td>7.205703e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>1968</td>\n",
" <td>6.999350e+10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>1969</td>\n",
" <td>7.871882e+10</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Year Value\n",
"0 1960 5.918412e+10\n",
"1 1961 4.955705e+10\n",
"2 1962 4.668518e+10\n",
"3 1963 5.009730e+10\n",
"4 1964 5.906225e+10\n",
"5 1965 6.970915e+10\n",
"6 1966 7.587943e+10\n",
"7 1967 7.205703e+10\n",
"8 1968 6.999350e+10\n",
"9 1969 7.871882e+10"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"#downloading dataset\n",
"!wget -nv -O china_gdp.csv https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-ML0101EN-SkillsNetwork/labs/Module%202/data/china_gdp.csv\n",
" \n",
"df = pd.read_csv(\"china_gdp.csv\")\n",
"df.head(10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Did you know?** When it comes to Machine Learning, you will likely be working with large datasets. As a business, where can you host your data? IBM is offering a unique opportunity for businesses, with 10 Tb of IBM Cloud Object Storage: [Sign up now for free](http://cocl.us/ML0101EN-IBM-Offer-CC)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Plotting the Dataset\n",
"\n",
"This is what the datapoints look like. It kind of looks like an either logistic or exponential function. The growth starts off slow, then from 2005 on forward, the growth is very significant. And finally, it decelerate slightly in the 2010s.\n"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfEAAAFICAYAAABA98fAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAa/ElEQVR4nO3dfZBkV3nf8e+zuwh7BBiMFiIkzYxwCWyFIEBjgQkvsimMBGUvLpAj1AGCqUxUhSjixDaiNomdoqYSMHG5sCDyhCxv6kKOBQUyCFQOTsCEN81S0qJFLF4EO1pLhZYXB6MpkBc9+ePeyfY2Pd09L3d6Tvf3U9V1+577smeORvvbc+6590ZmIkmSyrNr1BWQJEkbY4hLklQoQ1ySpEIZ4pIkFcoQlySpUIa4JEmFKjLEI+JARNwfEXcOse/zIuJLEXEyIl7eUT4TEQcj4vaIOBwRVzdba0mStlaUeJ94RDwP+AHwvsx8yoB9Z4FHAb8D3JyZN9XlZ1D9/D+KiEcAdwLPzsx7G628JElbpMieeGZ+GvhuZ1lE/FxEfKLuXf91RPx8ve83M/MQ8FDXO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BcRT6N6S9uTOk7xRQNc2l6GuKROD9WfAF6WmUc6N0bEHwDfAi6imhj7w47ND2xTHSXVnJ0uqZdbgdfXb3giIp5el/8McF9mPgS8kmoSnKQRMcQl9fJm4GHAoYi4s14HeCfw6oj4PNVQur1vaYSc2CZJUqHsiUuSVChDXJKkQhnikiQVyhCXJKlQhrgkSYUyxCVJKpQhLklSoQxxSZIK9f8AYYTfqv5b1r0AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 576x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(8,5))\n",
"x_data, y_data = (df[\"Year\"].values, df[\"Value\"].values)\n",
"plt.plot(x_data, y_data, 'ro')\n",
"plt.ylabel('GDP')\n",
"plt.xlabel('Year')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Choosing a model\n",
"\n",
"From an initial look at the plot, we determine that the logistic function could be a good approximation,\n",
"since it has the property of starting with a slow growth, increasing growth in the middle, and then decreasing again at the end; as illustrated below:\n"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAApS0lEQVR4nO3dd3yV9fn/8deVSQgQRhiyoyKIDIUAjlqx1lmts+5Zv7W2tfVbW0etWvvD1tZO+61KqbMVtXUjbtu6qiCggGzC3iQEQva8fn+cgx5jCAfMnTsn5/18PM4j5x7n5H2HcK7c9/0Z5u6IiEjySgk7gIiIhEuFQEQkyakQiIgkORUCEZEkp0IgIpLk0sIOsLdyc3N98ODBYccQEUkoc+bMKXL3nk1tS7hCMHjwYGbPnh12DBGRhGJma3a3TZeGRESSnAqBiE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mjyvs3xM9gn9o0DlpKz5w9/UAZjaXyIdqGbDK3ZdH1z8KXBXd/wQiA3/9OLrcARgYff66u2+LvuYZIkWlDhgLzIqebGQBW6P71xD50IPIB+zx0edHAWdHn/8d+HXM9z4B+Ci63IlIsVobzTs35r0Gx3Hs04F7zawLcC7wlLvXR8e8/4eZ7QdkAKtiXjPN3SubeK8c4BEzG0KkwKXHbGvq5zI7ZvvujuvtOI5BEpgKgbQVsdfD6/n0d3N3Y6AYcLa7L/3MSrMJTbzGo/s/4u5NzZBW6+67XhP7vXf3/Q24093/0uh7D27iOLLYA3evNLNXgDOJXBb6YXTT/wG/d/dp0cHNbo95Wflu3m4S8B93PzOa581mjqXxcpPHJe2f7hFIW7YEyDOzA6LLF8RsexX4fsy9hMNith1vZt2j1+LPAP4L/As4x8x6RffvbmaD9vD9/0vkgxngokbf+5sWGYMfM+u3632bUUpk8L3deRy4DuhNZCY3iPx1vyH6/LI9vP8usa+5vNG2pn4usfbluKQdUCGQNsvdq4hcCnoxerN4TczmSUQue8w3swXR5V3eJXIpZy6Ra+Sz3X0RcAvwmpnNJzKX8n57iHAtkTl4ZxH5gN2V6zXgMeB9M/sYeIrmP+QBHgYmN75ZHOM1IvcH/hFzdnI78KSZvQPEO1z5XcCdZvZfIvcZYn3u5xK7cR+PS9oBjT4q7YqZXU7kJug1YWcRSRQ6IxARSXI6IxARSXI6IxARSXIqBCIiSU6FQEQkyakQiIgkORUCEZEk9/8BvZixZJ111/gAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"X = np.arange(-5.0, 5.0, 0.1)\n",
"Y = 1.0 / (1.0 + np.exp(-X))\n",
"\n",
"plt.plot(X,Y) \n",
"plt.ylabel('Dependent Variable')\n",
"plt.xlabel('Independent Variable')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The formula for the logistic function is the following:\n",
"\n",
"$$ \\hat{Y} = \\frac1{1+e^{\\beta_1(X-\\beta_2)}}$$\n",
"\n",
"$\\beta_1$: Controls the curve's steepness,\n",
"\n",
"$\\beta_2$: Slides the curve on the x-axis.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Building The Model\n",
"\n",
"Now, let's build our regression model and initialize its parameters. \n"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"def sigmoid(x, Beta_1, Beta_2):\n",
" y = 1 / (1 + np.exp(-Beta_1*(x-Beta_2)))\n",
" return y"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Lets look at a sample sigmoid line that might fit with the data:\n"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7f42b0e85f28>]"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEDCAYAAAAlRP8qAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAp8UlEQVR4nO3deXxU1f3/8dcnG4Qdwg5ZWEWQPSyCFVqrIm7tV23FuIGKe+3397VqtYtd7KPa5etepEgVQangRhWlWltRQSRBtoQtrAk7hCUQICRzfn/M8DWGmWRCJpkl7+fjkUdm7tzcfA4k75w599xzzTmHiIhEv7hwFyAiIqGhQBcRiREKdBGRGKFAFxGJEQp0EZEYoUAXEYkRYQ10M5tuZnvMbHUQ+55vZsvMrMzMrq6wPd3McsxsuZnlmtkddVu1iEhksnDOQzez84EjwAzn3DnV7JsBtADuB+Y55+b6tifhbccJM2sGrAZGOed21GnxIiIRJqw9dOfcQqCo4jYz62FmH/h63Z+aWR/fvluccysBT6VjlDrnTvieNkLDSCLSQEVi+E0F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IOBJUAH59xO8IYi3ncc4K27oMKXnWpLxLcxyPYFErHti/RAnwTcbWY5eN8ilfq2J+B9K5Tl+/x9M7sA79ufyiJ5Xmag9gFgZiOAEufcqTHbaGsfBG7jcKAc6Iz37fr/mFl3oq+Ngdo3He8vejbeu30tAsqIgvaZWTPgDeDHzrnDVe3qZ5urYntEqEH7Ah7Cz7aIaF9QdywKF+fcWrzDK5hZb7z3LgXvL8onzrl9vtfm4x3bnAl0rXCIrsCOeiu4hqpo3ynX8nXvHLztjpr2QZVtvA74wDl3EthjZp8DmcCnRFEbA7XPOVcG/Pep/cxsEbABOEAEt8/MEvGG3Szn3Ju+zbvNrJNzbqdvuGGPb3sh33xXeaotEftzWsP2BRKx7YvoHrqZtfd9jgN+Bpy67d0CYICZNfGNwY4B8nxvl4rNbKTvrPONwDthKD0oVbTv1LZrgNmntkVb+6DKNm4DvmNeTfHeXHxttLUxUPt8P5tNfY8vBMqccxH9M+qr50VgjXPuzxVemgfc5Ht8E1/XOw+41swa+YaVeuG9QXxEtvEM2udXpLYPiKhZLq/hHU89ifcv4C3AfXjPRK8Hfo/vylbf/tcDuXjHMJ+osD3Tt20j3htXW323JUTtGwt84ec4Edm+mrYRaAbM8f0f5gE/ifQ21rB9GcA6vCfePsK75Gmkt+88vEMHK4Hlvo/xeGeR/QvvO4x/AW0qfM0jvnaso8JMj0hs4xm2bwveE+FHfP/nfSO1fc45XfovIhIrInrIRUREgqdAFxGJEQp0EZEYoUAXEYkRCnQRkRihQBcRiREKdBGRGPH/ARnGfxuWiNipAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"beta_1 = 0.10\n",
"beta_2 = 1990.0\n",
"\n",
"#logistic function\n",
"Y_pred = sigmoid(x_data, beta_1 , beta_2)\n",
"\n",
"#plot initial prediction against datapoints\n",
"plt.plot(x_data, Y_pred*15000000000000.)\n",
"plt.plot(x_data, y_data, 'ro')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Our task here is to find the best parameters for our model. Lets first normalize our x and y:\n"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"# Lets normalize our data\n",
"xdata =x_data/max(x_data)\n",
"ydata =y_data/max(y_data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### How we find the best parameters for our fit line?\n",
"\n",
"we can use **curve_fit** which uses non-linear least squares to fit our sigmoid function, to data. Optimal values for the parameters so that the sum of the squared residuals of sigmoid(xdata, *popt) - ydata is minimized.\n",
"\n",
"popt are our optimized parameters.\n"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" beta_1 = 690.451715, beta_2 = 0.997207\n"
]
}
],
"source": [
"from scipy.optimize import curve_fit\n",
"popt, pcov = curve_fit(sigmoid, xdata, ydata)\n",
"#print the final parameters\n",
"print(\" beta_1 = %f, beta_2 = %f\" % (popt[0], popt[1]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we plot our resulting regression model.\n"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfEAAAE9CAYAAAAbGFuyAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAu7UlEQVR4nO3de3xU9Z3/8ddnkpAwEu4gEEiCigqCogJWq5attt62ILqttNnWum1Tt7Xby7arXX5b3V/L1la7VX+tdVO1N7NSrxQr1ar11noDBEFAFISEgNxFAiHkMt/fH2cymQyTe86czMz7+XjkMXO+58zJZ44j73zPfM/3mHMOERERST+hoAsQERGRnlGIi4iIpCmFuIiISJpSiIuIiKQphbiIiEiaUoiLiIikqdygC+iukS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hFJRiEuIgCY2Y+BQ8Ax0ccSYBre9Mw3Oef+YGaleBN6HBN92XXOuZfMbDZwI96kGNOdc1NSW71IdlKIiwgAZnYM8DrQgDfn9Vrn3H1mNhR4Da+X7oCIc67ezCYB9zvnZkRD/HFgqnNuc7L9i0jf0w1QRAQA59whM/s9cBD4FPAJM/t2dHUBUIx3A4efmdl0oBk4MW4XrynARVJLIS4i8SLRHwOudM5tiF9pZjcBO4HT8AbG1setPpSiGkUkSqPTRSSZJ4GvRe96hpmdHm0fArznnIsAn8UbBCciAVGIi0gy3wfygNVm9mZ0GeBO4GozewXvVLp63yIB0sA2ERGRNKWeuIiISJpSiIuIiKQphbiIiEiaUoiLiIikKYW4iIhImlKIi4iIpCmFuIiISJpSiIuIiKSp/w/oozqz6ixTRwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 576x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"x = np.linspace(1960, 2015, 55)\n",
"x = x/max(x)\n",
"plt.figure(figsize=(8,5))\n",
"y = sigmoid(x, *popt)\n",
"plt.plot(xdata, ydata, 'ro', label='data')\n",
"plt.plot(x,y, linewidth=3.0, label='fit')\n",
"plt.legend(loc='best')\n",
"plt.ylabel('GDP')\n",
"plt.xlabel('Year')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Practice\n",
"\n",
"Can you calculate what is the accuracy of our model?\n"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mean absolute error: 0.03\n",
"Residual sum of squares (MSE): 0.00\n",
"R2-score: 0.96\n"
]
}
],
"source": [
"# write your code here\n",
"# split data into train/test\n",
"msk = np.random.rand(len(df)) < 0.8\n",
"train_x = xdata[msk]\n",
"test_x = xdata[~msk]\n",
"train_y = ydata[msk]\n",
"test_y = ydata[~msk]\n",
"\n",
"# build the model using train set\n",
"popt, pcov = curve_fit(sigmoid, train_x, train_y)\n",
"\n",
"# predict using test set\n",
"y_hat = sigmoid(test_x, *popt)\n",
"\n",
"# evaluation\n",
"print(\"Mean absolute error: %.2f\" % np.mean(np.absolute(y_hat - test_y)))\n",
"print(\"Residual sum of squares (MSE): %.2f\" % np.mean((y_hat - test_y) ** 2))\n",
"from sklearn.metrics import r2_score\n",
"print(\"R2-score: %.2f\" % r2_score(y_hat , test_y) )\n",
"\n",
"# Yeah, the code is basically the same as the previous labs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<details><summary>Click here for the solution</summary>\n",
"\n",
"```python\n",
"# split data into train/test\n",
"msk = np.random.rand(len(df)) < 0.8\n",
"train_x = xdata[msk]\n",
"test_x = xdata[~msk]\n",
"train_y = ydata[msk]\n",
"test_y = ydata[~msk]\n",
"\n",
"# build the model using train set\n",
"popt, pcov = curve_fit(sigmoid, train_x, train_y)\n",
"\n",
"# predict using test set\n",
"y_hat = sigmoid(test_x, *popt)\n",
"\n",
"# evaluation\n",
"print(\"Mean absolute error: %.2f\" % np.mean(np.absolute(y_hat - test_y)))\n",
"print(\"Residual sum of squares (MSE): %.2f\" % np.mean((y_hat - test_y) ** 2))\n",
"from sklearn.metrics import r2_score\n",
"print(\"R2-score: %.2f\" % r2_score(y_hat , test_y) )\n",
"\n",
"```\n",
"\n",
"</details>\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h2>Want to learn more?</h2>\n",
"\n",
"IBM SPSS Modeler is a comprehensive analytics platform that has many machine learning algorithms. It has been designed to bring predictive intelligence to decisions made by individuals, by groups, by systems – by your enterprise as a whole. A free trial is available through this course, available here: <a href=\"https://www.ibm.com/analytics/spss-statistics-software\">SPSS Modeler</a>\n",
"\n",
"Also, you can use Watson Studio to run these notebooks faster with bigger datasets. Watson Studio is IBM's leading cloud solution for data scientists, built by data scientists. With Jupyter notebooks, RStudio, Apache Spark and popular libraries pre-packaged in the cloud, Watson Studio enables data scientists to collaborate on their projects without having to install anything. Join the fast-growing community of Watson Studio users today with a free account at <a href=\"https://www.ibm.com/cloud/watson-studio\">Watson Studio</a>\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Thank you for completing this lab!\n",
"\n",
"## Author\n",
"\n",
"Saeed Aghabozorgi\n",
"\n",
"### Other Contributors\n",
"\n",
"<a href=\"https://www.linkedin.com/in/joseph-s-50398b136/\" target=\"_blank\">Joseph Santarcangelo</a>\n",
"\n",
"## Change Log\n",
"\n",
"| Date (YYYY-MM-DD) | Version | Changed By | Change Description |\n",
"| ----------------- | ------- | ---------- | ---------------------------------- |\n",
"| 2020-11-03 | 2.1 | Lakshmi | Made changes in URL |\n",
"| 2020-08-27 | 2.0 | Lavanya | Moved lab to course repo in GitLab |\n",
"| | | | |\n",
"| | | | |\n",
"\n",
"## <h3 align=\"center\"> © IBM Corporation 2020. All rights reserved. <h3/>\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python",
"language": "python",
"name": "conda-env-python-py"
},
"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.13"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment