|
|
@ -169,23 +169,24 @@ y_test: |
|
|
|
###### For question 4, is the mse on the **train set** `2888.326888` and the mse on the **test set** `2858.255153`? |
|
|
|
###### For question 4, is the mse on the **train set** `2888.326888` and the mse on the **test set** `2858.255153`? |
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
#### Exercise 5: Gradient Descent (Optional) |
|
|
|
#### Exercise 5: Gradient Descent (Optional) |
|
|
|
|
|
|
|
|
|
|
|
##### The exercise is validated if all questions of the exercise are validated. |
|
|
|
##### The exercise is validated if all questions of the exercise are validated. |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 1 is validated if the outputted plot looks like: |
|
|
|
###### +For question 1, does the outputted plot looks like? |
|
|
|
|
|
|
|
|
|
|
|
![alt text][ex5q1] |
|
|
|
![alt text][ex5q1] |
|
|
|
|
|
|
|
|
|
|
|
[ex5q1]: ../w2_day1_ex5_q1.png "Scatter plot " |
|
|
|
[ex5q1]: ../w2_day1_ex5_q1.png "Scatter plot " |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 2 is validated if the output is: `11808.867339751561` |
|
|
|
###### +For question 2, is the output `11808.867339751561`? |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 3 is validated if `grid.shape` is `(640000,2)`. |
|
|
|
###### +For question 3, is `grid.shape` equal to `(640000,2)`? |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 4 is validated if the 10 first values of losses are: |
|
|
|
###### +For question 4, are the 10 first values of losses the following? |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
array([158315.41493175, 158001.96852692, 157689.02212209, 157376.57571726, |
|
|
|
array([158315.41493175, 158001.96852692, 157689.02212209, 157376.57571726, |
|
|
@ -193,29 +194,30 @@ array([158315.41493175, 158001.96852692, 157689.02212209, 157376.57571726, |
|
|
|
155821.84369312, 155512.39728829]) |
|
|
|
155821.84369312, 155512.39728829]) |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 5 is validated if the outputted plot looks like |
|
|
|
###### +For question 5, does the outputted plot look like the following? |
|
|
|
|
|
|
|
|
|
|
|
![alt text][ex5q5] |
|
|
|
![alt text][ex5q5] |
|
|
|
|
|
|
|
|
|
|
|
[ex5q5]: ../w2_day1_ex5_q5.png "MSE" |
|
|
|
[ex5q5]: ../w2_day1_ex5_q5.png "MSE" |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 6 is validated if the point returned is: |
|
|
|
###### +For question 6, is the point returned the following? |
|
|
|
|
|
|
|
|
|
|
|
`array([42.5, 99. ])`. It means that `a= 42.5` and `b=99`. |
|
|
|
`array([42.5, 99. ])`. It means that `a= 42.5` and `b=99`. |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 7 is validated if the coefficients returned are: |
|
|
|
###### +For question 7, are the coefficients returned the following? |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
Coefficients (a): 42.61943031121358 |
|
|
|
Coefficients (a): 42.61943031121358 |
|
|
|
Intercept (b): 99.18581814447936 |
|
|
|
Intercept (b): 99.18581814447936 |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 8 is validated if the outputted plot is: |
|
|
|
###### +For question 8, is the outputted plot the following? |
|
|
|
|
|
|
|
|
|
|
|
![alt text][ex5q8] |
|
|
|
![alt text][ex5q8] |
|
|
|
|
|
|
|
|
|
|
|
[ex5q8]: ../w2_day1_ex5_q8.png "MSE + Gradient descent" |
|
|
|
[ex5q8]: ../w2_day1_ex5_q8.png "MSE + Gradient descent" |
|
|
|
|
|
|
|
|
|
|
|
###### +The question 9 is validated if the coefficients and intercept returned are: |
|
|
|
###### +For question 9, are the coefficients and intercept returned the following? |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
Coefficients: [42.61943029] |
|
|
|
Coefficients: [42.61943029] |
|
|
|