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
Setting $m=300$ turns $A$ into a square matrix. In this case, the zero block in the sigma-matrix disappears.
107
107
Plot the result for epsilon equal to 0.1, 1e-6, and 1e-12.
108
108
109
109
#### Model Complexity (Optional):
110
110
Another solution to the overfitting problem is reducing the complexity of the model.
111
-
To assess the quality of polynomial fit to the data, compute and plot the Mean Squared Error (Mean Squared Error (MSE) measure how close the regression line is to data points) for every degree of polynomial upto 20.
111
+
To assess the quality of polynomial fit to the data, compute and plot the Mean Squared Error (Mean Squared Error (MSE) measure how close the regression line is to data points) for every degree of polynomial up to 20.
112
112
113
113
MSE can be calculated using the following equation, where $N$ is the number of samples, $y_i$ is the original point and $\hat{y_i}$ is the predictied output.
From the plot, estimate the optimal degree of polynomial and fit the polynomial with this new degree and compare the regression.
116
+
Are the degree of the polynomial and the MSE linked?
117
117
118
118
### Part 2: Real data analysis
119
119
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.
@@ -123,7 +123,8 @@ Data source: https://pegel.bonn.de.
123
123
#### Regression:
124
124
The `src/pegel_bonn.py` file already contains code to pre-load the data for you.
125
125
Make the Rhine level measurements your new vector $\mathbf{b}$.
126
-
Generate a matrix A with m=2 using the timestamps for the data set and compute
126
+
127
+
Generate a matrix A with n=2 using the timestamps for the data set and compute
127
128
128
129
$$\mathbf{A}^{\dagger}\mathbf{b}.$$
129
130
@@ -134,9 +135,7 @@ Plot the result. Compute the zero. When do the regression line and the x-axis in
134
135
Re-using the code you wrote for the proof of concept task, fit a polynomial of degree 20 to the data. Before plotting have a closer look at `datetime_stamps` and its values and scale the axis appropriately.
135
136
Plot the result.
136
137
137
-
138
138
#### Regularization:
139
-
Something happened around the year 2000. To investigate further, focus on the data from 2000 onward and
140
-
filter the singular values.
139
+
Focus on the data from the year 2000 onward and filter the singular values.
141
140
Matrix A is not square in this case. Consequently, a zero block must appear in your singular value matrix.
142
141
Plot filtered eigen-polynomials using epsilon equal to 0.1, 1e-3, 1e-9.
0 commit comments