when i run the code 'from sklearn import LinearRegression
after running the code' from sklearn import LinearRegression', I get this error message. I have also installed Sklearn on my anaconda, so now i have both scikit learn and sklearn which are basically the same thing I guess.
cannot import name 'LinearRegression' from 'sklearn' (C:\Users\DELL\anaconda3\lib\site-packages\sklearn\__init__.py)
1 answers ( 0 marked as helpful)
Hey,
Thank you for your comment and commitment to the Machine Learning in Python course!
As shown in the 'Simple Linear Regression' lesson, the LinearRegression
class should be imported from the sklearn.linear_model
module.
Hope this helps!
Kind regards,
365 Hristina