Last active
May 1, 2021 21:08
-
-
Save yudhastyawan/aa7be20d7792397c77626a7e660c1590 to your computer and use it in GitHub Desktop.
Jupyter notebooks and labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"id": "0121c1d4-caa5-4399-8030-5f28a32ecfec", | |
"metadata": {}, | |
"source": [ | |
"# 6.\tPerforming extrapolation and interpolation in arbitrary grid in polynomial\n", | |
"\n", | |
"Figure 28 show the code for the demonstration extrapolation and interpolation of the variant curve and data length.\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "b4051aa2-b5eb-42a0-a58f-fd8b47f39b1e", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAEGCAYAAAAjc0GqAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAA+J0lEQVR4nO3deVhV1frA8e9iEnAWhxxBTVNBccDSzNQGNe2qlaZlDpVDWpmNaphZalnen926maaZQ9LVtDJv17JBbbJyKCuHcgQEZ1QEkZje3x9nn8NhFGU4B3g/z3MeOGuvs/faW+Flrb32u4yIoJRSSpU0D1c3QCmlVPmkAUgppZRLaABSSinlEhqAlFJKuYQGIKWUUi7h5eoGlBY1a9aUoKAgVzdDKaVKlR07dpwWkVq5bdMAVEBBQUFs377d1c1QSqlSxRgTldc2HYJTSinlEhqAlFJKuYQGIKWUUi6h94AKITU1lZiYGJKTk13dFKXKHV9fXxo0aIC3t7erm6KukAagQoiJiaFy5coEBQVhjHF1c5QqN0SEuLg4YmJiaNy4saubo66QDsEVQnJyMgEBARp8lCphxhgCAgJ09KGYRUREEBQUhIeHB0FBQURERBTp/rUHVEgafJRyDf3ZK14RERGMGTOGpKQkAKKiohgzZgwAQ4cOLZJjaA9IKaVUDuHh4SQlJTF8OAQH28qSkpIIDw8vsmNoAFJ5Wrt2LXv27CmSfU2fPp1//vOfRbIvpVTxi46OpnlzuP9+aN8+a3lR0QCk8lSUAUgpVbo0atSIESPg/Hn48MOs5UVFA1Apt2LFCq699lratm3L2LFjSU9PZ9u2bbRp04bk5GQuXLhAcHAwu3btIjExkZtvvpn27dvTunVrPvnkE8d+li9fTps2bQgNDWXYsGFs2bKFdevW8fTTT9O2bVsOHjzoqBsfH09gYCAZGRkAXLhwgYYNG5KamsqiRYvo2LEjoaGh3HXXXY7xY2fdu3d3pDU6ffo09hx76enpPP3003Ts2JE2bdrw9ttvF+OVU0rl59VXH+D662HVKrD/GPv7+zNr1qwiO4ZOQigi+/dPJDFxZ5Hus1KltjRr9q88t+/du5dVq1bxww8/4O3tzfjx44mIiGD48OH069ePqVOncvHiRe677z5CQkJIS0vj448/pkqVKpw+fZpOnTrRr18/9uzZw8yZM9myZQs1a9bkzJkz1KhRg379+nH77bczcODALMetWrUqbdu25ZtvvqFHjx58+umn9OrVC29vb+68805Gjx4NwNSpU1m8eDGPPvpogc538eLFVK1alW3btvH333/TpUsXevbsqdNslXKBFi1+5NSpyuzYUQ1jYmjUqBGzZs0qsgkIoAGoVPv666/ZsWMHHTt2BODixYvUrl0bgGnTptGxY0d8fX154403ANuzE88++yzffvstHh4exMbGcuLECTZu3MigQYOoWbMmADVq1LjksQcPHsyqVavo0aMHK1euZPz48QDs2rWLqVOncu7cORITE+nVq1eBz+eLL77g999/Z82aNYCtp7V//34NQEqVsPj4LZw58znNmr3Kn38+XWzH0QBURPLrqRQXEWHEiBG8/PLLObbFxcWRmJhIamoqycnJVKxYkYiICE6dOsWOHTvw9vYmKCjoip+j6NevH88++yxnzpxhx44d3HTTTQCMHDmStWvXEhoaytKlS9m8eXOOz3p5eTmG75yPLyL8+9//vqygpZQqepGRz+PtXZv69ccX63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OT4GoBKUHGsr345yzFMnjyZ7777jrZt2/Laa6+xdOlS+vXrx0033cTNN9+c73INzpYuXcojjzwC2HK/TZgwgeuvv54mTZo4UutkP1ZeSy1s3ryZrl270q9fP1q1akVkZCQtWrRg6NChtGzZkoEDBzoCx9dff027du1o3bo1DzzwAH///XeOto0bN46wsDCCg4N5/vnnAXjjjTc4evQoPXr0oEePHoAtHZA9C8PcuXMJCQkhJCSEf/3rX4AtgLZs2ZLRo0cTHBxMz549uXjxYo7jHT58mM6dO9O6dWumTp3qKM/rWk6ePJmDBw/Stm1bnn766QJf84iICPr375/rtjlz5jiuq/2c82u//f+HvQ0hISGkpKQwbdo0Vq1aRdu2bVm1ahUAe/bsoXv37jRp0sSR1LY4bN26lauvvpomTZrg4+PDkCFDHNeia9eufPXVV5oVo4idP7+Nkyf/Q8OGT+Lr28A1jRARfRXg1aFDB8luz549OcrysmLFCvH39xfA8fL395cVK1YUeB+5Hf/222+XlJQUEREZN26cLFu2TEREwsPD5cknn5Tx48fLSy+9JCIimzZtkr59+zo+v2TJEqlfv77ExcWJiEhqaqrEx8eLiMipU6ekadOmkpGRkeO4S5YskYcfflhEREaMGCEDBw6U9PR02b17tzRt2jTXY7399tsyY8YMERFJTk6WDh06yKFDh2TTpk3i7+8vhw4dEhGRw4cPCyDff/+9iIjcf//9MmfOHLl48aI0aNBA/vrrLxERGTZsmLz22msiItKtWzfZtm2biIjjXNLS0qRbt27y22+/iYhIYGCgnDp1ytEe+/vt27dLSEiIJCYmSkJCgrRq1Up++eUXOXz4sHh6esqvv/4qIiKDBg2S9957L8e1+Mc//uG45m+++aZUrFgx32t5+PBhCQ4Odny+oNe8UaNGcv78ecd7+3E2bNggo0ePloyMDElPT5e+ffvKN998k2/7g4ODZcuWLSIiMmnSJEd7nP9dRUSef/556dy5syQnJ8upU6ekRo0ajv9rzu6++24JDQ3N8bJfF2ebNm2SGjVqSJs2baR3796ya9cuERFZvXq1PPjgg456y5cvz9KWW265RbZv355jf5fzM6gyZ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oB2wM9AHRE5Zm06DtRxVbuKwb+w/eGYYb0PAM45/XFV5v6dvVzdAHX5jDFfAVflsikceBbb8FuZkt85i8gnVp1wbEM3ESXZNlV8jDGVgA+BiSJy3tYpsBERMcaUiedIjDG3AydFZIcxpruLm1NiNACVQiJyS27lxpjWQGPgN+sHtQHwizHmWiAWaOhUvYFVVirkdc52xpiRwO3AzZL5cFupPud8lNXzysIY440t+ESIyEdW8QljTF0ROWYNIZ90XQuLVBegnzGmD+ALVAFexzZU7mX1gsrcv7MOwZUhIvKHiNQWkSARCcLWZW8vIseBdcBwazZcJyDeaSijVDPG9MY2dNFPRJKcNq0DhhhjKhhjGmObgLHVFW0sYtuAZtYMKR9sEy3WubhNRcq6/7EY2Csic502rQNGWN+PAD4p6bYVBxGZIiINrJ/bIcBGERkKbAIGWtXKzPnaaQ+o/FgP9MF2Iz4JuN+1zSlSbwIVgC+tnt9PIvKQiOw2xnwA7ME2NPewiKS7sJ1FQkTSjDGPABsAT+BdEdnt4mYVtS7AMOAPY8xOq+xZYDbwgTHmQWzLo9ztmuaVmEnASmPMTOBXbEG5zNBUPEoppVxCh+CUUkq5hAYgpZRSLqEBSCmllEtoAFJKKeUSGoCUUkq5hAYgpZRSLqEBSCmllEtoAFKqlDLGdLTWQPI1xlS01s0JcXW7lCoofRBVqVLMekLeF/ADYkTkZRc3SakC0wCkVClm5YLbBiQD15eFVEOq/NAhOKVKtwCgElAZW09IqVJDe0BKlWLGmHXYVkRtDNQVkUdc3CSlCkyzYStVShljhgOpIvK+McYT2GKMuUlENrq6bUoVhPaAlFJKuYTeA1JKKeUSGoCUUkq5hAYgpZRSLqEBSCmllEtoAFJKKeUSGoCUUkq5hAYgpZRSLvH/QOQlMxtNdI8AAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"from finitediff import derivatives_at_point_by_finite_diff\n", | |
"\n", | |
"def test_extraintrapolation():\n", | |
" # data\n", | |
" # f = lambda x: np.power(x,2) #<- function (option 1)\n", | |
" f = lambda x: np.power(x, 2) + np.power(x, 3) # <- function (option 2)\n", | |
" # x = np.array([0., 3., 4.7]) #<- data (option 1)\n", | |
" x = np.array([0., 2.2, 4.7, 7.]) # <- data (option 2)\n", | |
" y = f(x) #<- data\n", | |
" m = len(x) - 1\n", | |
" lenx = 50\n", | |
" x0 = np.linspace(-50,50,lenx) + np.random.random(lenx)*2 #<- need to be estimated\n", | |
" yest = np.zeros(x0.shape)\n", | |
" yexact = f(x0)\n", | |
" for i, xf in enumerate(x0):\n", | |
" out = derivatives_at_point_by_finite_diff(x, y, xf, m)\n", | |
" yest[i] = out[0]\n", | |
" plt.figure()\n", | |
" plt.scatter(x0,yest,marker='o',color='k', label='extra-interpolation data (length = {})'.format(lenx))\n", | |
" plt.plot(x0, yexact, 'y', label='exact value')\n", | |
" plt.scatter(x,y,marker='^', color='r',label='arbitrary available data (length = {})'.format(len(x)))\n", | |
" plt.xlabel('x')\n", | |
" plt.ylabel('y')\n", | |
" plt.legend()\n", | |
" plt.show()\n", | |
"\n", | |
"\n", | |
"if __name__ == '__main__':\n", | |
" test_extraintrapolation()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "c634c28f-fa5d-4c83-85e3-781e5d609275", | |
"metadata": {}, | |
"source": [ | |
"Figure 28. The demo code for interpolation and extrapolation" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "b2e4c400-5ee7-4ab2-b1e8-05ecb8e7f29d", | |
"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.8.8" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment