Can somebody explain to me, the math behind the #Print cost every at intervals 10 times or as many iterations if < 10;
Why is for example f"Iteration {i:4}: Cost {J_history[-1]:0.2e what does the 4 and the 0.2 e mean? f"dj_dw: {dj_dw: 0.3e}, dj_db: {dj_db: 0.3e} → same here, from where do the numbers come from and what do they mean?
And again: print(f"(w,b) found by gradient descent: ({w_final:8.4f},{b_final:8.4f})") → What does the 8.4 mean.
I hope you got my question and Thank you already in Advance for the Help. Its really appreciated.
Hi @MHae , this is the way to format the output. To have a good idea how it works, you can just detele the values after the : and run the cell to see what happens. Then you will understand why the instructor uses string formatting to display the values.
Keep learning!