Skip to content

Commit 3a9f8b3

Browse files
committed
Norms and CG added
1 parent 7434119 commit 3a9f8b3

9 files changed

+2327
-411
lines changed

AR1-Model-Octave.ipynb

+1,298
Large diffs are not rendered by default.

ConjugateGradients.ipynb

+404
Large diffs are not rendered by default.

DynamicalSystems.ipynb

+10-7
Large diffs are not rendered by default.

MultivariateGaussian.ipynb

+158-24
Large diffs are not rendered by default.

Norms.ipynb

+247
Large diffs are not rendered by default.

Regression.ipynb

+52-189
Large diffs are not rendered by default.

RobustRegression.ipynb

+3-37
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@
4444
"here \n",
4545
"\n",
4646
"\\begin{eqnarray}\n",
47-
"\\|e\\|_2 & = & \\left(e_1^2 + e_2^2 + \\dots + e_N\\right)^{\\frac{1}{2}}\n",
47+
"\\|e\\|_2 & = & \\left(e_1^2 + e_2^2 + \\dots + e_N^2\\right)^{\\frac{1}{2}}\n",
4848
"\\end{eqnarray}\n",
4949
"\n",
5050
"Another possibility is measuring the error with other norms, such as the absolute error\n",
5151
"\\begin{eqnarray}\n",
52-
"\\|e\\|_1 & = & \\left|e_1\\right| + \\left|e_2\\right| + \\dots + \\left|e_2\\right|\n",
52+
"\\|e\\|_1 & = & \\left|e_1\\right| + \\left|e_2\\right| + \\dots + \\left|e_N\\right|\n",
5353
"\\end{eqnarray}\n",
5454
"\n",
5555
"and more general $p$ norms\n",
5656
"\\begin{eqnarray}\n",
57-
"\\|e\\|_p & = & \\left( \\left|e_1\\right|^p + \\left|e_2\\right|^p + \\dots + \\left|e_2\\right|^p\\right)^{\\frac{1}{p}}\n",
57+
"\\|e\\|_p & = & \\left( \\left|e_1\\right|^p + \\left|e_2\\right|^p + \\dots + \\left|e_N\\right|^p\\right)^{\\frac{1}{p}}\n",
5858
"\\end{eqnarray}\n",
5959
"\n",
6060
"\n",
@@ -827,28 +827,6 @@
827827
"plt.show()"
828828
]
829829
},
830-
{
831-
"cell_type": "markdown",
832-
"metadata": {},
833-
"source": [
834-
"## Drawing norm-balls in 2-D\n",
835-
"\n",
836-
"Calculate the points in polar coordinates. \n",
837-
"\n",
838-
"In $2-D$, take rays of the form \n",
839-
"$$x = \\left( \\begin{array}{c} x_1 \\\\ x_2 \\end{array} \\right) = \n",
840-
"\\left( \\begin{array}{c} \\alpha \\cos(\\theta) \\\\ \\alpha \\sin(\\theta) \\end{array} \\right)\n",
841-
"$$\n",
842-
"where $\\alpha>0$ and $0\\leq \\theta \\leq 2\\pi$.\n",
843-
"\n",
844-
"The $p$-norm of a vector $x$ with $\\|x\\|_p = 1 $ satisfies \n",
845-
"\n",
846-
"$\\left|x_1\\right|^p + \\left|x_2\\right|^p = \\alpha^p (\\left|\\cos(\\theta)\\right|^p + \\left|\\sin(\\theta)\\right|^p) = 1 $\n",
847-
"\n",
848-
"Solve for $\\alpha(\\theta)$:\n",
849-
"$$\\alpha = \\left(\\frac{1}{\\left|\\cos(\\theta)\\right|^p + \\left|\\sin(\\theta)\\right|^p}\\right)^{1/p} $$"
850-
]
851-
},
852830
{
853831
"cell_type": "code",
854832
"execution_count": 11,
@@ -1009,18 +987,6 @@
1009987
"plt.xlim((-5,N))\n",
1010988
"plt.show()"
1011989
]
1012-
},
1013-
{
1014-
"cell_type": "markdown",
1015-
"metadata": {},
1016-
"source": [
1017-
"The Matrix norm\n",
1018-
"\n",
1019-
"\\begin{eqnarray}\n",
1020-
"\\|A\\|_{(p,q)} = \\sup_{\\|x\\|\\neq 0} \\frac{\\|A x\\|_{(p)}}{\\|x\\|_{(q)}} = \\sup_{\\|x\\|_{(q)} = 1} {\\|A x\\|_{(p)}}\n",
1021-
"\\end{eqnarray}\n",
1022-
"\n"
1023-
]
1024990
}
1025991
],
1026992
"metadata": {

SVD.ipynb

+146-9
Large diffs are not rendered by default.

cmpe482/CmpE482-CourseNotes.ipynb

+9-145
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)