I am trying to create one Machine Learning model using sklearn. I installed this model but I am getting this below error.
from sklearn import LinearRegression
ImportError: cannot import name 'LinearRegression' from 'sklearn'
You got this error because LinearRegression is present in sklearn.model_selection module. To modify your code as follows.
from sklearn.linear_model import LinearRegression
Hope this will help.
Did you install sklearn module in your system? If yes, then try the below-given command.
open folder /.local/lib/python2.7/site-packages/sklearn/linear_model and open file coordinate_descent.py and delete from . import cd_fast after this import error will be removed
I think in your version, linear_model don't have train_test_split ...READ MORE
You need to install a GUI toolkit, ...READ MORE
You can also use the random library's ...READ MORE
colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
Try something like this:
array([[nan, 0.2, nan],
I think there may be problem in ...READ MORE
You may get this error, if you ...READ MORE
Already have an account? Sign in.