Last active
January 16, 2019 01:21
-
-
Save farzadab/d94640a637b71e2fefb1e806cff930ce to your computer and use it in GitHub Desktop.
Linear Algebra Tutorial notebook [by Wilder Lavington]
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": [ | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# lets get all of our imports \nimport numpy as np\nfrom scipy import linalg", | |
"execution_count": 5, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# scaler - scaler multipliction\nx = 1\ny = 10\nx*y", | |
"execution_count": 6, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 6, | |
"data": { | |
"text/plain": "10" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# other functions \nx*y + 1 - np.sin(x)\nx*y + 1 + np.log(x)\nx*y + 1 + np.exp(x)", | |
"execution_count": 7, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 7, | |
"data": { | |
"text/plain": "13.718281828459045" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# generating arrays (random)\nnp.random.rand(2)", | |
"execution_count": 8, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 8, | |
"data": { | |
"text/plain": "array([0.05119316, 0.95945369])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# generating arrays (linspace)\nnp.linspace(2.0, 3.0, num=20)", | |
"execution_count": 9, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 9, | |
"data": { | |
"text/plain": "array([2. , 2.05263158, 2.10526316, 2.15789474, 2.21052632,\n 2.26315789, 2.31578947, 2.36842105, 2.42105263, 2.47368421,\n 2.52631579, 2.57894737, 2.63157895, 2.68421053, 2.73684211,\n 2.78947368, 2.84210526, 2.89473684, 2.94736842, 3. ])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# generating matrices (random)\nnp.random.rand(2,3)", | |
"execution_count": 10, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 10, | |
"data": { | |
"text/plain": "array([[0.95843142, 0.93179404, 0.83591989],\n [0.26030427, 0.82862825, 0.55423052]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# generating a array of zeros\nnp.zeros(5)", | |
"execution_count": 11, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 11, | |
"data": { | |
"text/plain": "array([0., 0., 0., 0., 0.])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# generating a matrix of zeros\nnp.zeros((2, 4))", | |
"execution_count": 8, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 8, | |
"data": { | |
"text/plain": "array([[0., 0., 0., 0.],\n [0., 0., 0., 0.]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# generating a matrix of ones\nnp.ones((2, 4))", | |
"execution_count": 13, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 13, | |
"data": { | |
"text/plain": "array([[1., 1., 1., 1.],\n [1., 1., 1., 1.]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "v = np.random.rand(10)\ns = 10", | |
"execution_count": 15, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# scaler - vector multipliction\ns * v", | |
"execution_count": 30, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 30, | |
"data": { | |
"text/plain": "array([3.37087199, 3.19873035, 5.16301149, 1.81301167, 9.50608079,\n 7.85936299, 3.50233133, 2.06077056, 5.43221286, 2.12565731])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# vector - vector multipliction: element-wise multiplication\nv1 = np.random.rand(5)\nv2 = np.random.rand(5)\n\nv1 * v2", | |
"execution_count": 34, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 34, | |
"data": { | |
"text/plain": "array([0.88838432, 0.74905216, 0.27255124, 0.12250431, 0.04525032])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# element-wise multiplication: matching shapes\nv2 = np.random.rand(4)\n\nv1 * v2", | |
"execution_count": 32, | |
"outputs": [ | |
{ | |
"output_type": "error", | |
"ename": "ValueError", | |
"evalue": "operands could not be broadcast together with shapes (5,) (4,) ", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-32-ec75d435b1b5>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# element-wise multiplication: matching shapes\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mv2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mv1\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mv2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m: operands could not be broadcast together with shapes (5,) (4,) " | |
] | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# make a two norm (l2)\nv = np.random.rand(100)\nnp.sqrt(sum(v*v))", | |
"execution_count": 33, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 33, | |
"data": { | |
"text/plain": "5.6292714435169" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# vector - matrix multipliction: broadcast\nv1 = np.array([1,100])\nv2 = np.array([1,2,3,4,5,6]).reshape(3,2)\n\nv1 * v2", | |
"execution_count": 36, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 36, | |
"data": { | |
"text/plain": "array([[ 1, 200],\n [ 3, 400],\n [ 5, 600]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# \"element-wise\" matrix - matrix multipliction: \nv1 = np.random.rand(3,3)\nv2 = np.random.rand(3,3)\nv1 * v2", | |
"execution_count": 46, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 46, | |
"data": { | |
"text/plain": "array([[0.0349701 , 0.31071419, 0.3563422 ],\n [0.40592048, 0.19475094, 0.37454803],\n [0.18862149, 0.84884285, 0.90960497]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# \"element-wise\" matrix - matrix multipliction: : size mismatch\nm1 = np.random.rand(3,8)\nm2 = np.random.rand(8,3)\nm1 * m2", | |
"execution_count": 47, | |
"outputs": [ | |
{ | |
"output_type": "error", | |
"ename": "ValueError", | |
"evalue": "operands could not be broadcast together with shapes (3,8) (8,3) ", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-47-d4ac30799317>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mv1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mv2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mv1\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mv2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m: operands could not be broadcast together with shapes (3,8) (8,3) " | |
] | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# matrix - matrix multipliction\nm1 = np.random.rand(3,8)\nm2 = np.random.rand(8,3)\nnp.matmul(m1, m2)", | |
"execution_count": 88, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 88, | |
"data": { | |
"text/plain": "array([[2.38098437, 2.70527655, 2.36424057],\n [2.76582467, 2.15053236, 2.25971462],\n [2.85678593, 2.32536773, 1.49983105]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# option 2 for matrix multiplication: @\nm1 @ m2", | |
"execution_count": 89, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 89, | |
"data": { | |
"text/plain": "array([[2.38098437, 2.70527655, 2.36424057],\n [2.76582467, 2.15053236, 2.25971462],\n [2.85678593, 2.32536773, 1.49983105]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# matrix - matrix multipliction: size mismatch\nm1 = np.random.rand(3,8)\nm2 = np.random.rand(3,3)\nnp.matmul(m1, m2)", | |
"execution_count": 85, | |
"outputs": [ | |
{ | |
"output_type": "error", | |
"ename": "ValueError", | |
"evalue": "shapes (3,8) and (3,3) not aligned: 8 (dim 1) != 3 (dim 0)", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-85-062e974cab63>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mm1\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mm2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmatmul\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mm1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mm2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m: shapes (3,8) and (3,3) not aligned: 8 (dim 1) != 3 (dim 0)" | |
] | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# option 3 for matrix multiplication: np.matrix\nm1 = np.matrix(np.random.rand(5,4))\nm2 = np.matrix(np.random.rand(4,5))\nm1 * m2", | |
"execution_count": 49, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 49, | |
"data": { | |
"text/plain": "matrix([[1.52944453, 0.52535152, 1.10522876, 1.84089603, 1.67559165],\n [1.42694103, 0.75291401, 1.09411873, 1.3024963 , 1.51751165],\n [1.10570363, 0.44129516, 0.64177185, 1.19396572, 1.01129319],\n [0.98769848, 0.27332851, 0.66693344, 0.86839107, 1.15408258],\n [0.72794788, 0.47725534, 0.60221488, 0.46389334, 0.79510672]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# matrix - vector multipliction\nm = np.matrix(np.random.rand(5,4))\nv = np.matrix(np.random.rand(4,1))\nm * v", | |
"execution_count": 50, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 50, | |
"data": { | |
"text/plain": "matrix([[1.46877674],\n [0.54569547],\n [1.05901183],\n [1.13739921],\n [0.66695699]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# matrix - vector multipliction: size mismatch\nm = np.matrix(np.random.rand(5,4))\nv = np.matrix(np.random.rand(4))\nm * v", | |
"execution_count": 52, | |
"outputs": [ | |
{ | |
"output_type": "error", | |
"ename": "ValueError", | |
"evalue": "shapes (5,4) and (1,4) not aligned: 4 (dim 1) != 1 (dim 0)", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-52-7195480c4f51>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mm\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmatrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmatrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mm\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mv\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;32m~/anaconda3_420/lib/python3.5/site-packages/numpy/matrixlib/defmatrix.py\u001b[0m in \u001b[0;36m__mul__\u001b[0;34m(self, other)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mother\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mN\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mndarray\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtuple\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[1;32m 214\u001b[0m \u001b[0;31m# This promotes 1-D vectors to row vectors\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mN\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0masmatrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mother\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 216\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misscalar\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mother\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mhasattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mother\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'__rmul__'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mN\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mother\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
"\u001b[0;31mValueError\u001b[0m: shapes (5,4) and (1,4) not aligned: 4 (dim 1) != 1 (dim 0)" | |
] | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# matrix norms \nfrom numpy.linalg import norm\n\nm = np.matrix([1,2,3,4]).reshape(2,2)\n\nprint(norm(m))\nprint(norm(m, 'fro'))\nprint(norm(m, np.inf))\nprint(norm(m, -np.inf))\nprint(norm(m, 2))\nprint(norm(m, -2))", | |
"execution_count": 76, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"text": "5.477225575051661\n5.477225575051661\n7.0\n3.0\n5.464985704219043\n0.36596619062625746\n", | |
"name": "stdout" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# solving a linear system\n# from numpy.linalg import solve\n\nA = np.matrix(np.random.rand(5,5))\nb = np.matrix(np.random.rand(5,1))\nnp.linalg.solve(A, b)", | |
"execution_count": 78, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 78, | |
"data": { | |
"text/plain": "matrix([[ 0.98458229],\n [-0.69050311],\n [ 0.65658468],\n [ 0.05219171],\n [-0.18769165]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "import scipy.linalg as sla\n\n# solving a linear system (LU)\nA = np.matrix(np.random.rand(5,5))\nb = np.matrix(np.random.rand(5,1))\nP, L, U = sla.lu(A)\n# LU x = P^{-1} * b\nPb = P.transpose()*b\n# Ly = Pb\ny = sla.solve_triangular(U, Pb)\n# Ux = y\nx = sla.solve_triangular(L, y, lower=True)\nx", | |
"execution_count": 98, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 98, | |
"data": { | |
"text/plain": "array([[ 0.19169271],\n [ 2.02041356],\n [-1.78465993],\n [ 0.10167166],\n [-1.89017998]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# finding a determinant\nimport numpy.linalg as la\n\nA = np.matrix(np.random.rand(5,5))\nla.det(A)", | |
"execution_count": 105, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 105, | |
"data": { | |
"text/plain": "0.009537127775052836" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# finding a determinant: only for square matrices\nA = np.matrix(np.random.rand(5,2))\nla.det(A)", | |
"execution_count": 107, | |
"outputs": [ | |
{ | |
"output_type": "error", | |
"ename": "LinAlgError", | |
"evalue": "Last 2 dimensions of the array must be square", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | |
"\u001b[0;31mLinAlgError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-107-f3ed28bdff00>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# finding a determinant: only for square matrices\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mA\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmatrix\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrandom\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrand\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m5\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----> 3\u001b[0;31m \u001b[0mla\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdet\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mA\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;32m~/anaconda3_420/lib/python3.5/site-packages/numpy/linalg/linalg.py\u001b[0m in \u001b[0;36mdet\u001b[0;34m(a)\u001b[0m\n\u001b[1;32m 2017\u001b[0m \u001b[0ma\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0masarray\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2018\u001b[0m \u001b[0m_assertRankAtLeast2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2019\u001b[0;31m \u001b[0m_assertNdSquareness\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2020\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult_t\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_commonType\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2021\u001b[0m \u001b[0msignature\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'D->D'\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misComplexType\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;34m'd->d'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
"\u001b[0;32m~/anaconda3_420/lib/python3.5/site-packages/numpy/linalg/linalg.py\u001b[0m in \u001b[0;36m_assertNdSquareness\u001b[0;34m(*arrays)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0mm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0ma\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\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[1;32m 214\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mm\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mn\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 215\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mLinAlgError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Last 2 dimensions of the array must be square'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 216\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 217\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_assertFinite\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0marrays\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", | |
"\u001b[0;31mLinAlgError\u001b[0m: Last 2 dimensions of the array must be square" | |
] | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# solving least squares normal equations\nA = np.matrix(np.random.rand(10,3))\nb = np.matrix(np.random.rand(10,1))\n# Ax = b --> x = (A^t A)^-1 A^t b --> (A^t A) x = A^t b\nla.solve(A.transpose(1,0)*A, A.transpose(1,0)*b)", | |
"execution_count": 230, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 230, | |
"data": { | |
"text/plain": "matrix([[-0.28516054],\n [ 0.98967105],\n [-0.20840818]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# solving least squares normal equations: QR\n\n# A = QR\n# (A^t A) x = A^t b --> (R^t Q^t Q R) x = R^t Q^t b --> (R^t R) x = R^t Q^t b --> R x = Q^t b\nQ, R = np.linalg.qr(A)\nnp.linalg.solve(R, Q.transpose()*b)", | |
"execution_count": 231, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 231, | |
"data": { | |
"text/plain": "matrix([[-0.28516054],\n [ 0.98967105],\n [-0.20840818]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# solving least squares SVD\n# A = U S V\n# |Ax-b| = |U^t (Ax - b)| = |SVx - U^t b| = |Sz - U^t b| --> S^t S x = S^t U^t b --> x = (S^t S)^-1 S^t U^t b\nU, s, V = la.svd(A)\nS = np.matrix(np.append(np.diag(s), np.zeros((7,3)), axis=0))\nV.transpose() * np.diag(np.power(1/s, 2)) * S.transpose() * U.transpose() * b", | |
"execution_count": 232, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 232, | |
"data": { | |
"text/plain": "matrix([[-0.28516054],\n [ 0.98967105],\n [-0.20840818]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# finding eigen values cholesky decomposition\nB = np.matrix(np.random.rand(4,4))\nA = B * np.transpose(B) \nL = la.cholesky(A)\nL", | |
"execution_count": 254, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"execution_count": 254, | |
"data": { | |
"text/plain": "matrix([[ 1.33128599, 0. , 0. , 0. ],\n [ 0.98050935, 0.43465579, 0. , 0. ],\n [ 0.88163049, -0.04960794, 0.7781799 , 0. ],\n [ 0.5850072 , -0.09671825, 0.39623734, 0.25361176]])" | |
}, | |
"metadata": {} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# eigen decomposition LL' = A -> ED*D'E' -> eigs = D.^2\n# print(np.sqrt(np.linalg.eigvals(A)))\n# np.linalg.norm(L, axis=1)", | |
"execution_count": 255, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# finding eigen values QR algorithm (this ones wierd!)\nA = np.matrix(np.random.rand(4,4))\nA = np.transpose(A)*A\nA_iter = A\nQ, R = la.qr(A)\nfor i in range(10**4):\n A_iter = R*Q\n Q, R = la.qr(A_iter)\nprint(np.transpose(Q)*A_iter)\nprint(la.eig(A)[0])", | |
"execution_count": 414, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "[[ 5.62337093e+00 7.30621903e-16 -5.58503854e-16 -1.45752362e-16]\n [ 0.00000000e+00 4.81876877e-01 -7.85316443e-17 3.50929779e-17]\n [ 0.00000000e+00 0.00000000e+00 6.86708026e-02 -4.31502051e-17]\n [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.38738068e-03]]\n[5.62337093e+00 4.81876877e-01 6.86708026e-02 1.38738068e-03]\n" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# finding eigen vectors power method\nA = np.matrix(np.random.rand(5,5))\nA = A*np.transpose(A)\nx = np.matrix(np.random.rand(5,1))\nfor i in range(10**3):\n x = A*x/la.norm(A*x)\nAx = A*x\nprint(Ax[0,0]/x[0,0])\nprint(la.eig(A)[0])", | |
"execution_count": 326, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "8.332651802211897\n[8.3326518 0.83269214 0.37356706 0.17681973 0.024805 ]\n" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# finding eigen vectors inverse power method\nA = np.matrix(np.random.rand(5,5))\nA = A*np.transpose(A)\nx = np.matrix(np.random.rand(5,1))\n# pick an eigen value\neig3 = la.eig(A)[0][3]\nfor i in range(10**4):\n x = la.solve(A,x)/la.norm(la.solve(A,x))\nAx = A*x\nprint(Ax[0,0]/x[0,0])\nprint(eig3)", | |
"execution_count": 406, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "0.025304822560150934\n0.025304822560150524\n" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# finding eigen vectors shifted inverse power method\nA = np.matrix(np.random.rand(5,5))\nA = A*np.transpose(A)\nx = np.matrix(np.random.rand(5,1))\n# pick an eigen value\neig3 = la.eig(A)[0][3]\nfor i in range(10**4):\n x = la.solve(A-eig3*np.eye(5),x)/la.norm(la.solve(A-eig3*np.eye(5),x))\nAx = A*x\nprint(Ax[0,0]/x[0,0])\nprint(eig3)", | |
"execution_count": 405, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "0.16029749338013227\n0.16029749338013202\n" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "import matplotlib.pyplot as plt\n# plotting stuff\nplt.plot([1, 2, 3, 4])\nplt.ylabel('some numbers')\nplt.show()", | |
"execution_count": 15, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAD8CAYAAACYebj1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xd81fX1x/HXAcLe0zDC3gQVw3DUhQMVRRSrrXUr1tra8VNAHLjqtq2tA7Fq0bZWSwCZropbUaCSwQxL9pSElX1+f9xrmqZAbiA339zk/Xw88sgdn3vv+XDDfd/vOl9zd0RERABqBF2AiIhUHgoFEREpolAQEZEiCgURESmiUBARkSIKBRERKaJQEBGRIgoFEREpolAQEZEitYIuoKxatmzpnTp1CroMEZGYsnDhwh3u3qq0cTEXCp06dWLBggVBlyEiElPMbF0k47T6SEREiigURESkiEJBRESKKBRERKSIQkFERIpEPRTMrKaZ/dvMZh3kvjpm9oaZZZjZfDPrFO16RETk0CpiSeGXwNJD3HcD8J27dwN+DzxWAfWIiMghRDUUzKw9cAHw50MMGQFMDl+eAgw1M4tmTSIisSavoJDnPsxg8frdUX+taC8p/AEYAxQe4v52wHoAd88HMoEWJQeZ2WgzW2BmC7Zv3x6tWkVEKp20jZlc/OxnPP72cuambYn660XtiGYzGw5sc/eFZnb60TyXu08CJgEkJSV5OZQnIlKpZecV8KcPVjLxo9U0q1+b568cwHmJ8VF/3Wi2uTgZuMjMzgfqAo3N7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13P+T7Ut6fYVUxFKqbmUAnd+8PvMd/vj1IcBYRailwLPAnYHrA9RyWmTUEkoFfuXtW0PUcjVLmEjPvi7sXuPtxhM5dP8jM+lXUa1fFUNgIFP+23D5820HHmFktoAmws0KqK5tS5+LuO909J3z1z8AJFVRbeYvkfYsJ7p71/eK/u88B4sysZcBlHZSZxRH6EP2bu089yJCYeV9Km0ssvS/fc/fdwDxgWIm7ovYZVhVD4Wugu5l1NrPahDbCzCgxZgZwTfjyKOADD2+xqWRKnUuJ9bsXEVqXGotmAFeH93YZAmS6++agizoSZnbM9+t3zWwQof9nle5LR7jGl4Cl7v67QwyLifclkrnE0PvSysyahi/XA84GlpUYFrXPsKidozko7p5vZj8H3iG0987L7p5uZg8AC9x9BqE/ntfMLIPQBsMrgqv40CKcy21mdhGQT2gu1wZW8GGY2euE9v5oaWYbgAmENqDh7hOBOYT2dMkA9gPXBVNp6SKYyyjgFjPLBw4AV1TSLx0nA1cBqeH11wDjgQSIufclkrnEyvsSD0w2s5qEgutNd59VUZ9hOqJZRESKVMXVRyIicoQUCiIiUkShICIiRRQKIiJSRKEgIiJFFAoiIlJEoSAiIkUUCiIiUuT/AUMEHwHu2ZYdAAAAAElFTkSuQmCC\n", | |
"text/plain": "<Figure size 432x288 with 1 Axes>" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "plt.plot([1, 2, 3, 4], [1, 4, 9, 16])\nplt.ylabel('some numbers')\nplt.show()", | |
"execution_count": 16, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD8CAYAAAB6paOMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIAB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IRETSnIJARCTNKQhERNKcgkBEJM0pCERE0tz/B3wrYdjs3/9VAAAAAElFTkSuQmCC\n", | |
"text/plain": "<Figure size 432x288 with 1 Axes>" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# function interpolation by solving polynomial basis vandermonde\n# 1 x x^2 x^3 ...\nx = np.linspace(0,1,10)\ny = 1.5*x**3 + 1 - 0.5*x**2 + 2*x\nN = 4\nV = np.array([[x_i**i for i in range(0,4)] for x_i in x])\ny = np.transpose(np.matrix(y))\n# lets get the coefficients V b = y \nb = la.solve(np.matmul(np.transpose(V),V), np.transpose(V)*y)\nf = lambda x: b[0,0] + b[1,0]*x + b[2,0]*x**2 + b[3,0]*x**3\ny_hat = np.array([f(x_i) for x_i in x])\n# lets see\nplt.plot(x,y)\nplt.plot(x,y_hat)\nprint(b)", | |
"execution_count": 60, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "[[ 1. ]\n [ 2. ]\n [-0.5]\n [ 1.5]]\n" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl4VPXd/vH3J2FfZDFhC1lQ9jUJSUhqa61WK4ogTy0ujwuWR1zAVmtL69b2UWtrr1qtgqW0LqA84oJLQFRQQLQmgbCFXcIOIRAIhE2WJN/fHzO/XoiBTJJJTmZyv64rF2dmvsm5D5Pc+ebMmXPMOYeIiISXCK8DiIhI8KncRUTCkMpdRCQMqdxFRMKQyl1EJAyp3EVEwpDKXUQkDKncRUTCkMpdRCQMNfJqxVFRUS4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tfBfnXgxc4HXmOtjmT4A9wAr/R6bXmWt7m88Yu5AQP1omwOfZ8O2OWgusAm7wOnMdbHNf4N/4jqRZAVzhdeYabu/rwG7gFL6/xMYAdwF3nfYcT/L/f6wK9ve13qEqIhKG6vNuGRERqSaVu4hIGFK5i4iEIZW7iEgYUrmLiIQhlbuISBhSuYuIhCGVu4hIGPp/CF5i2v39ZkkAAAAASUVORK5CYII=\n", | |
"text/plain": "<Figure size 432x288 with 1 Axes>" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# function interpolation by solving polynomial basis vandermonde\n# 1 x x^2 x^3 ...\nx = np.linspace(0,1,10)\ny = 3*x**5+2*x**4+1.5*x**3 + 1 - 0.5*x**2 + 2*x\nN = 4\nV = np.array([[x_i**i for i in range(0,4)] for x_i in x])\ny = np.transpose(np.matrix(y))\n# lets get the coefficients V b = y \nb = la.solve(np.matmul(np.transpose(V),V), np.transpose(V)*y)\nf = lambda x: b[0,0] + b[1,0]*x + b[2,0]*x**2 + b[3,0]*x**3\ny_hat = np.array([f(x_i) for x_i in x])\n# lets see\nplt.plot(x,y)\nplt.plot(x,y_hat)\nprint(b)", | |
"execution_count": 63, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "[[ 0.94049688]\n [ 4.06797744]\n [-10.0308642 ]\n [ 13.95679012]]\n" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xl8lNXd/vHPmaxkg0AStoBhE0QWgYC4gAruIO4KPtZd3H4+alutS1vb2trap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/sesAtY2vA20+vM4T7mb4ydQ5SfVRLi99kRXCJaCSwHJnqdOQLH3B/4hOAZJ0uB073OfJjH+xywA6gj+BvUtcCNwI1f+R4/2vD3sTwcP9e6clJEJMroykkRkSij4hYRiTIqbhGRKKPiFhGJMipuEZEoo+IWEYkyKm4RkSij4hYRiTL/H00vy20vYBloAAAAAElFTkSuQmCC\n", | |
"text/plain": "<Figure size 432x288 with 1 Axes>" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# function interpolation by solving polynomial basis vandermonde\n# 1 x x^2 x^3 ...\nx = np.linspace(0,1,10)\ny = 3*x**5+2*x**4+1.5*x**3 + 1 - 0.5*x**2 + 2*x\nN = 3\nV = np.array([[x_i**i for i in range(0,3)] for x_i in x])\ny = np.transpose(np.matrix(y))\n# lets get the coefficients V b = y \nb = la.solve(np.matmul(np.transpose(V),V), np.transpose(V)*y)\nf = lambda x: b[0,0] + b[1,0]*x + b[2,0]*x**2\ny_hat = np.array([f(x_i) for x_i in x])\n# lets see\nplt.plot(x,y)\nplt.plot(x,y_hat)\nprint(b)", | |
"execution_count": 65, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "[[ 1.42295382]\n [-3.8753315 ]\n [10.90432099]]\n" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xd81dX9x/HXySKQBWSwd8LeBBTqRlTcIFgQF2px1aq1Q21/rbWt1bqqraPUulCUKSJ14AAXQ8LeJGETyAIyybzn98f3iowAN5h7b27u+/l45MHN/R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GJOC0Trb6ssg65sk57wSGAxhjeuAEd65Pq/StucCN7tUlZwIF1tq9dfoZ/PjK7KU4s41M4Hfu5x7F+c8Lzhd3BpABfAd09veryV4+38+AbGCV+22uv2v29jkfM3YhAb6qxMOvs8FpEW0A1gLj/F2zD865J/AtzoqTVcBF/q75R57vO8BeoBLnN6hbgTuAO474Gr/g/vdY643va105KSISYHTlpIhIgFFwi4gEGAW3iEiAUXCLiAQYBbeISIBRcIuIBBgFt4hIgFFwi4gEmP8He+zSTgLW4CEAAAAASUVORK5CYII=\n", | |
"text/plain": "<Figure size 432x288 with 1 Axes>" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# function interpolation by solving exponential basis vandermonde\n# 1 x x^2 x^3 ...\nx = np.linspace(0,1,10)\ny = 1.5*x**3 + 1 - 0.5*x**2 + 2*x\nN = 4\nV = np.array([[np.exp(x_i)**i for i in range(0,4)] for x_i in x]) # change made here\ny = np.transpose(np.matrix(y))\n# lets get the coefficients V b = y \nb = la.solve(np.matmul(np.transpose(V),V), np.transpose(V)*y)\nf = lambda x: b[0,0] + b[1,0]*np.exp(x) + b[2,0]*np.exp(x)**2 + b[3,0]*np.exp(x)**3 # change made here\ny_hat = np.array([f(x_i) for x_i in x])\nplt.plot(x,y)\nplt.plot(x,y_hat)", | |
"execution_count": 77, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": "[<matplotlib.lines.Line2D at 0x1142dbc50>]" | |
}, | |
"execution_count": 77, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdG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WZtzCyG4jdM5x0zZh5we8nyIOAzV/JORYgqdZvN7BxgPMXFHurHYaGUbXbOZTjnGjrnWjvnWlP8PkN/59wqb+IGRSA/23Mo3mvHzBpSfJhme2WGDLJAtnkXcBmAmZ1JcbmnVWrKyjUPuK1k1kwPIMM5lxK0Z/f6HeVS3m2+muI9lp+Ax0vue5bif9xQ/OJPp/ji3N8Cbb3OXAnbvBjYD6wt+ZrndeaK3uZjxn5BiM+WCfB1NooPR20CNgBDvM5cCdvcEfia4pk0a4ErvM5czu39AEgBCin+TWwEcDdw91Gv8Sslfx8bgv1zrU+oioiEoap8WEZERE6Ryl1EJAyp3EVEwpDKXUQkDKncRUTCkMpdRCQMqdxFRMKQyl1EJAz9fzG7D1KXXP7HAAAAAElFTkSuQmCC\n", | |
"text/plain": "<Figure size 432x288 with 1 Axes>" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": false | |
}, | |
"cell_type": "code", | |
"source": "# numerical stability point\nx = np.linspace(0,1,4)\ny = 1.5*x**3 + 1 - 0.5*x**2 + 2*x\nV_n = np.array([[np.exp(x_i)**i for i in range(0,4)] for x_i in x]) # change made here\nV_e = np.array([[x_i**i for i in range(0,4)] for x_i in x])\n# look at the condition number\nprint(la.norm(la.inv(V_n),2)*la.norm(V_n,2))\nprint(la.norm(la.inv(V_e),2)*la.norm(V_e,2))", | |
"execution_count": 87, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "1315.566624409681\n98.86773850722757\n" | |
} | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3", | |
"language": "python" | |
}, | |
"language_info": { | |
"mimetype": "text/x-python", | |
"nbconvert_exporter": "python", | |
"name": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.4", | |
"file_extension": ".py", | |
"codemirror_mode": { | |
"version": 3, | |
"name": "ipython" | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment