Hello,
Thank you very much for your response. After opening it the second time and running it works!
Not sure what your name is, but thank you again,
Kind regards,
Anna
Hello,
Thank you very much for your response. After opening it the second time and running it works!
Not sure what your name is, but thank you again,
Kind regards,
Anna
Yes. You have to all the preceding cells before running any intermediate cell because the information read such as arrays in the preceding cells are used in the current cell.
ExactlyâŚ
BTW, my name is Saif.
I made sure to run the command to install the sklearn package as suggested here:C1_W2_Lab03_Feature_Scaling_and_Learning_Rate (Multi Variable) - #12 by Mujassim_Jamal, after that I restarted the jupyter notebook in vscode but I am still seeing the error ModuleNotFoundError: No module named âsklearnâ when I run the first cell of the Optional Lab: Linear Regression using Scikit-Learn.
Can someone help please?
TKS
I exercised to calculate the w and b value of each iteration based on the data of previous iteration. For example I calculate w0. I use formula w0 = w0 - alpha*djdw0. For iteration 0, w0=5.5e-01, alpha =9.9e-7, djdw0=-5.5e+05, then for iteration 1, w0= 5.5e-01 - 9.9e-7 * (-5.5e+05) = 1.09e00 which is different from the Lab result -8.8e-02. Why? Thanks.
Hello, @qihua-william,
Because w0 is not the iterationâs weight before-updated, instead, it is after-updated. We need to verify them this way:
Cheers,
Raymond
PS: This reason could be found by inspecting the run_gradient_descent()
's source code which is available on Cousera. Let us know if you need the steps to open the source code.
Thank you Raymond. Do you mean we can verify them in the way like your drawing w0 = w0 -alpha * djdw0 ? And can you help explain âw0 is not the iterationâs weight before-updated, instead, it is after-updatedâ. I do not understand this sentence. Thanks a lot.
Why donât you just try it?
The w0 shown in the line for iteration 1 is the w0 that has been updated in iteration 1.
Thank you Raymond. I suppose djdw0 should be the data at second line then I calculate the updated w0. updated w0 = 5.5e-01 - 9.90e-07 * 6.4e+05 = -8.36e-02 which is not 8.8e-02 from the lab. Why does it happen? I am happy with your tutoring.
But 8.36e-02 and 8.8e-02 are close.
You donât get the exact same number because your inputs (5.5e-01 and 6.4e+05) do not have all the precisions.
For example, 6.4e-05 may have been 0.0000635 or 0.000644 because both can be rounded to 6.4e-05. It is the same situation for 5.5e-01.
The program had full precision, but you do not, and this is why your results are not the same.
You may verify a few more w0âs. Although you canât expect to get the exact same values, you can get something very close.
Cheers,
Raymond
Btw, @qihua-william, next time, I suggest you to open a new topic for your own question.
Hi, Raymond, I appreciate your great tutoring. I will learn how to start a new question post next time. Thanks again for the great support of the community. I am happy.
Sure! If there are problems with starting new topics, let us know.
Cheers,
Raymond
HiâŚ! While running this optional lab of C_1_W2_Lab_03_Feature _Scaling, I am having multiple error messages in code cells after running it. For example,
Sir, I have run all the cells sequentially, however from the very beginning I was getting error messages while running the code i.e.
Iâm cordially grateful to you, Sir. But I didnât change anything, I just hit Shift+Enter while running the code. Iâm really. I donât get it ,how come the whole line of code changes ? (from _multi import norm_plolab_utilst, plt_equal_scale, plot_cost_i_w
I know of no reason why the code in that cell would change by itself.
Please check your personal messages for instructions.