AttributeError module sklearn has no attribute LinearRegresion

0 votes

Hi Team,

I am new to Machine Learning. I am trying to create a model using Sklearn. But it is showing me the below error.

sklearn.LinearRegresion

AttributeError                            Traceback (most recent call last)
<ipython-input-16-573594113f31> in <module>
----> 1 sklearn.LinearRegresion
AttributeError: module 'sklearn' has no attribute 'LinearRegresion'
Oct 15, 2020 in Machine Learning by akhtar
• 38,230 points
10,268 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to import the LinearRegression module from the linear_model package as shown below.

from sklearn.linear_model import LinearRegression
mind = LinearRegression()
answered Oct 15, 2020 by MD
• 95,440 points

Related Questions In Machine Learning

0 votes
1 answer

AttributeError: module 'cv2.cv2' has no attribute 'face_LBPHFaceRecognizer'

Hi@MD, LBPHFaceRecognizer module comes from a package named ...READ MORE

answered Apr 20, 2020 in Machine Learning by akhtar
• 38,230 points
15,524 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'constant'

Hi@akhtar, There may be problem in the versions. ...READ MORE

answered Apr 21, 2020 in Machine Learning by MD
• 95,440 points
11,031 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution'

Hi@akhtar, Tensorflow 2.0 has eager_execution enabled by default and ...READ MORE

answered Apr 21, 2020 in Machine Learning by MD
• 95,440 points
2,664 views
0 votes
1 answer

AttributeError: module 'tensorflow' has no attribute 'estimator'.

Hi@akhtar, There was an environment issue, tensorflow was ...READ MORE

answered Apr 23, 2020 in Machine Learning by MD
• 95,440 points
3,558 views
0 votes
1 answer

Purpose of fit method in sklearn module in python?

it basically trains your model using the ...READ MORE

answered May 14, 2020 in Python by Mahesh
• 140 points
3,155 views
0 votes
1 answer

How to compare expected and predicted values?

The predict() function returns a plain numpy ...READ MORE

answered Jul 14, 2019 in Machine Learning by Tina
12,524 views
0 votes
0 answers

ValueError: Found input variables with inconsistent numbers of samples: [11, 3988]

After reshaping also I am getting the ...READ MORE

Aug 27, 2020 in Machine Learning by sairam
• 160 points

edited Aug 27, 2020 by MD 5,043 views
0 votes
0 answers

Why I'm Getting ValueError?

Here is my code: import pandas as p import ...READ MORE

Nov 28, 2020 in Python by Rohan
• 200 points

edited Nov 30, 2020 by Niroj 455 views
0 votes
1 answer

AttributeError: module 'tensorflow.compat' has no attribute 'v1'

Hi@Usman, It seems you are using an older ...READ MORE

answered Jul 19, 2020 in Machine Learning by MD
• 95,440 points
3,513 views
0 votes
1 answer

AttributeError: module 'matplotlib' has no attribute 'scatter'

Hi@akhtar, To avoid this error, make sure you ...READ MORE

answered Apr 16, 2020 in Machine Learning by MD
• 95,440 points
10,175 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP