Linear Regression codes getting error - Machine Learning

Viewed 13

lr = LinearRegression()

lr.fit(X_train, y_train)

running the code gives me error, where as copy pasting the code from a .pynb file does not give me error. Please help mee

I want to write codes and run without error. I have tried this like 4-5 times, writing code myself and it is not working.

1 Answers

Will need some more info about error and code to tell you the exact problem , but make sure you are writing all the functions correctly, importing proper module.

Also I noticed on this line of code lr.fit(X_train, y_train) X_train X is capital and in y_train y is small make sure you are writing names correctly maybe there is a error on this line

Related