You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
## Linear Algebra Exercise
2
-
Welcome to the exercise repository for day 3 of our course.
2
+
Welcome to the exercise repository for day 2 of our course.
3
3
To help you, we have prepared unit-tests.
4
4
Use:
5
5
```shell
@@ -62,7 +62,7 @@ This will just be a straight line and there are only two coefficients $c_1$ and
62
62
Very often, this line is too simple to explain the data sufficiently.
63
63
That is why we want to fit polynomials of higher order, so $n > 2$.
64
64
Unfortunately, the more complex the model gets (i.e. the higher the order of the polynomial gets), the more noise will be tracked. Here we can make use of regularization techniques.
65
-
In the first and following part, you will be given artificial data and in the second part you will make use of real data!
65
+
In the first and following part, you will be given artificial data and in the second part you will make use of real data.
66
66
67
67
### Part 1: Proof of concept
68
68
The line `b = pandas.read_csv('./data/noisy_signal.tab')` is used to load a noisy signal.
@@ -75,6 +75,7 @@ Linear regression is usually a good first step.
75
75
76
76
1. Start by implementing the function `set_up_point_matrix` from the `src/regularization.py` module.
77
77
The function should produce polynomial-coordinate matrices $\mathbf{A}_n$ of the form:
78
+
78
79
$$
79
80
\mathbf{A}_n =
80
81
\begin{pmatrix}
@@ -89,17 +90,21 @@ $$
89
90
2. Go to the main-function and use the function you just implemented to create the point-matrix A for n=2.
will produce the coefficients for a straight line.
97
102
98
103
4. Evaluate your first-degree polynomial via $c_1 + c_2 \cdot x$ and plot the result as well as the original data using `matplotlib.pyplot`'s `plot` function.
99
104
100
105
101
106
102
-
#### ⊙Task 1.2: Fitting a Polynomial to a function
107
+
#### ⊙Task 1.2: Fitting a Polynomial to a function
103
108
The straight line above is insufficient to model the data.
104
109
So perform the very same steps as above, but change the degree of the polynomial to n=300 (to set up a square matrix since we have 300 data-points):
0 commit comments