diff --git a/05/History for 05_assignment_05.ipynb - 2haein_machine-learning-assignment.pdf b/05/History for 05_assignment_05.ipynb - 2haein_machine-learning-assignment.pdf new file mode 100644 index 0000000..2ffab1f Binary files /dev/null and b/05/History for 05_assignment_05.ipynb - 2haein_machine-learning-assignment.pdf differ diff --git a/05/assignment_05.html b/05/assignment_05.html new file mode 100644 index 0000000..cd882dc --- /dev/null +++ b/05/assignment_05.html @@ -0,0 +1,15093 @@ + + + + + +assignment_05 + + + + + + + + + + + + + + + + + + + + + +
+
+

Least square problem for polynomial regression

+
+
+
+
+

import library

+
+
+
+ +
+ +
+
+
+

load data points

+ +
+
+
+ +
+ +
+ + + + +
+ +
+
+
+

solve a linear system of equation $A z = b$

$$ +A = +\begin{bmatrix} +x_1^0 & x_1^1 & \cdots & x_1^{p-1}\\ +x_2^0 & x_2^1 & \cdots & x_2^{p-1}\\ +\vdots & \vdots & \vdots & \vdots\\ +x_n^0 & x_n^1 & \cdots & x_n^{p-1} +\end{bmatrix}, +\quad +z = +\begin{bmatrix} +\theta_0\\ +\theta_1\\ +\vdots\\ +\theta_{p-1} +\end{bmatrix}, +\quad +b = +\begin{bmatrix} +y_1\\ +y_2\\ +\vdots\\ +y_n +\end{bmatrix} +$$ +
+
+
+
+

construct matrix A for the polynomial regression with power $p-1$

+ +
+
+
+ +
+ +
+
+
+

construct vector $b$

+
+
+
+ +
+ +
+
+
+

solve the linear system of equation $A z = b$

+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+ +
+ +
+
+
+

approximate by polynomial regression

+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+

functions for presenting the results

+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+

results

+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+ +
+ + + + +
+ +
+ + + + + + + + + diff --git a/05/assignment_05.pdf b/05/assignment_05.pdf new file mode 100644 index 0000000..c12d049 Binary files /dev/null and b/05/assignment_05.pdf differ