Inconsistent Error

The error list graph that I am making is incorrect.
please help me

hey @Shubhankit-Tiwari-1738649599558824,
Please save your code at IDE and share the link here.

https://ide.codingblocks.com/s/174521 this is my code please help me

There’s just only one single mistake with the code, In line number 17, it should be
grad=np.dot(X.T,(y_-y))

I hope you know that the formula is
theta_j’ = theta_j - lr * sigma((hypothesis(Xi) - yi)*X_i_j)/m

So it should be y_-y and not y-y_

Hope this cleared your doubt.
:blush:

https://ide.codingblocks.com/s/177841 actually the problem still persist , I was able to work with it and even submmited the solution to air quality prediction with 96% accuracy but after a while the code stared working like it use to work before and started giving runtime error,plotting wrong graph

I ran your code it ran completely fine, the code would give runtime error if you are working with wrong matrices having wrong shapes, graph may be wrong because of high learning rate.

If still error persists, you are requested to share link of your ipynb file, after saving it on google drive.
Also it seems quite illogical that code running fine, starts misbehaving without any change, This doesn’t seem feasible. But anyways lets have a look on it.

https://drive.google.com/open?id=14FKCqb4--yB-jaNOSp98DZnW-cU5v3sQ

I have shared my notebook please help me figure out my mistake code: https://drive.google.com/open?id=14FKCqb4--yB-jaNOSp98DZnW-cU5v3sQ

You didn’t removed the target column from the X numpy array.
Here is the code
https://drive.google.com/file/d/1x1tR6Z4L0kQcGnlSkDR84A1dqajnpOBH/view?usp=sharing