6. Fitting a linear regression NN in Representing Neural Networks module

Hi, I have a question on the answer for the 6. Fitting a linear regression NN in Representing Neural Networks module.

Since bias column is already in the features data frame, I believe lr should be constructed with fit_intercept = False option.

Here’s the code from the answer:
def train(features, labels):
lr = SGDRegressor()
lr.fit(features, labels)
weights = lr.coef_
return weights

if the intercept in lr is printed, it can be checked that the intercept is a non-zero term, which is not desirable

Hi @onceshb:

Do you mind providing a question link as per these guidelines so that we can know the particular mission that you are referring to and format your code with 3 backticks [`] : below the Esc key on a US keyboard.