abjer / isds2020

Introduction to Social Data Science 2020 - a summer school course abjer.github.io/isds2020
58 stars 92 forks source link

Problem with 11.2.2 #41

Open ninibertelsen opened 4 years ago

ninibertelsen commented 4 years ago

We have a problem with exercise 11.2.2, we are not sure why we get the error message that we get. Below is our code, output and error messages. We have also tried where we do not store the result in a dataframe, we get the same error message.

Skærmbillede 2020-08-19 kl  14 54 36 Skærmbillede 2020-08-19 kl  14 54 56 Skærmbillede 2020-08-19 kl  14 54 52 Skærmbillede 2020-08-19 kl  14 55 04

Thanks in advance!

jsr-p commented 4 years ago

hi @ninibertelsen ,

from the assignment text:

For each iteration store the given $\lambda$ and the calculated RMSEs for the rescaled train and test data in a list named output.

The assert statement therefore expects the variable output to be a list of lists, where each list is of the form: [RMSE_train_i, RMSE_test_i, lambda_i] (where the suffix _i is to denote the values for iteration i) :)

ninibertelsen commented 4 years ago

Thank you @jsr-p! Makes a lot of sense now :) Do you know why we get the orange messages? We didn't get them while we answered the exercises earlier.

jsr-p commented 4 years ago

@ninibertelsen np :) The Warnings get raised because the estimator does not converge. Try increasing the number of iterations as image. In the context of this exercise it does not matter. See the documentation for more: https://scikit-learn.org/stable/modules/generated/sklearn.exceptions.ConvergenceWarning.html