js-regression
js-regression copied to clipboard
The regression learns NaN weights with the example code.
However, if I try a simple model like y= mx+c, then it gives some weights but never gets the y-intercept right. It's always close to zero. I did try playing around with parameters/ increasing data but it still gives the same fit without y-intercept. Seems like there is some bug in the gradient descent method.
Here is the code I tried