Skip to content

Commit b2f8f8f

Browse files
committed
formating
1 parent 1417646 commit b2f8f8f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## 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.
33
To help you, we have prepared unit-tests.
44
Use:
55
```shell
@@ -62,7 +62,7 @@ This will just be a straight line and there are only two coefficients $c_1$ and
6262
Very often, this line is too simple to explain the data sufficiently.
6363
That is why we want to fit polynomials of higher order, so $n > 2$.
6464
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.
6666

6767
### Part 1: Proof of concept
6868
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.
7575

7676
1. Start by implementing the function `set_up_point_matrix` from the `src/regularization.py` module.
7777
The function should produce polynomial-coordinate matrices $\mathbf{A}_n$ of the form:
78+
7879
$$
7980
\mathbf{A}_n =
8081
\begin{pmatrix}
@@ -89,17 +90,21 @@ $$
8990
2. Go to the main-function and use the function you just implemented to create the point-matrix A for n=2.
9091

9192
3. Now,
92-
$$\mathbf{A}_2^{\dagger}\mathbf{b} = \mathbf{c} = \begin{pmatrix}
93+
94+
$$
95+
\mathbf{A}_2^{\dagger}\mathbf{b} = \mathbf{c} = \begin{pmatrix}
9396
c_1 \\\\
9497
c_2 \\\\
95-
\end{pmatrix} $$
98+
\end{pmatrix}
99+
$$
100+
96101
will produce the coefficients for a straight line.
97102

98103
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.
99104

100105

101106

102-
#### ⊙Task 1.2: Fitting a Polynomial to a function
107+
#### Task 1.2: Fitting a Polynomial to a function
103108
The straight line above is insufficient to model the data.
104109
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):
105110
1. Set up the point matrix by setting n=300.

0 commit comments

Comments
 (0)