TensorFlow-Examples icon indicating copy to clipboard operation
TensorFlow-Examples copied to clipboard

bias(error) should not be in linear_regression fn

Open lwsinclair opened this issue 6 years ago • 0 comments

Having + b in the calculation biases the results. It give you a regression like y = Wx + W2b + e where e~N(0,1). You effectively add the error term into the regression. The result looks a bit like having a hidden constant term in the model. Using regular linear regression, the coefficient estimate (W) is 0.36, and removing +b, you get exactly the same results with this tf version.

lwsinclair avatar Feb 17 '20 02:02 lwsinclair