Skip to content

Commit e21f676

Browse files
committed
removed the solution parts
1 parent 719f7ce commit e21f676

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ will produce the coefficients for a straight line.
9898
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.
9999

100100

101-
Solution:
102-
103-
![regression](./figures/regression.png)
104101

105102
#### ⊙Task 1.2: Fitting a Polynomial to a function
106103
The straight line above is insufficient to model the data.
@@ -112,9 +109,6 @@ So perform the very same steps as above, but change the degree of the polynomial
112109
What do you see?
113110

114111

115-
Solution:
116-
117-
![regression](./figures/polyfit.png)
118112

119113

120114
#### ⊙Task 1.3: Regularization
@@ -185,9 +179,6 @@ Perform the following steps 2. - 4. for epsilon equal to 0.1, 1e-6, and 1e-12.
185179
3. Estimate the regularized coefficients by applying the formula above.
186180
4. Plot the result.
187181

188-
Solution:
189-
190-
![regression](./figures/regularized_fit.png)
191182

192183
#### ✪Task 1.4: Model Complexity (Optional):
193184
Another solution to the overfitting problem is reducing the complexity of the model.
@@ -203,17 +194,8 @@ $$MSE=\frac{1}{N} \sum_{i=1}^{N} (y_i-\hat{y_i})^2$$
203194
6. Are the degree of the polynomial and the MSE linked?
204195
From the plot, estimate the optimal degree of polynomial and fit the polynomial with this specific degree.
205196

206-
Solution:
207-
208-
![model_complexity](./figures/model_complexity_mse.png)
209-
210-
211197

212-
Solution:
213198

214-
From the plot we observe that after degree 7, the mean squared error doesn't reduce substantially.
215-
216-
![model_complexity](./figures/model_complexity_fit.png)
217199

218200
### Part 2: Rhine water level analysis
219201
Now we are ready to deal with real data! Feel free to use your favorite time series data or work with the Rhine level data we provide.
@@ -231,9 +213,6 @@ Now we want to do the same as in Part 1 and start with linear regression!
231213
Or in other words: On which day will the Rhine water level be at 0 cm?
232214
> **Hint:** Plug in $y=0$ into the equation of your line with the estimated coefficients and solve for the date $x$.
233215
234-
Solution:
235-
236-
![regression](./figures/rhine_regression.png)
237216

238217

239218
#### ⊙ Task 2.2: Fitting a higher-order Polynomial
@@ -246,9 +225,6 @@ Re-using the code you wrote for the proof of concept task, fit a polynomial of d
246225
4. Evaluate the polynomial.
247226
5. Plot the result.
248227

249-
Solution:
250-
251-
![rhine_polyfit](./figures/rhine_polyfit.png)
252228

253229

254230

@@ -265,8 +241,3 @@ Perform the following steps 2. - 4. for epsilon equal to 0.1, 1e-3, and 1e-9.
265241
> **Hint:** Remember the zero-block! You need degree-many rows and number-of-datapoints-many columns!
266242
4. Evaluate the regularized polynomial and plot the results.
267243

268-
269-
Solution:
270-
271-
![rhine_reg_fit](./figures/rhine_regularized_fit.png)
272-

0 commit comments

Comments
 (0)