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 in Machine Learning by akhtar
• 33,410 points
141 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 by MD
• 79,270 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 in Machine Learning by akhtar
• 33,410 points
4,375 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 in Machine Learning by MD
• 79,270 points
5,176 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 in Machine Learning by MD
• 79,270 points
771 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 in Machine Learning by MD
• 79,270 points
870 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 13 in Python by Mahesh
• 140 points
1,202 views
0 votes
1 answer

How to compare expected and predicted values?

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

answered Jul 13, 2019 in Machine Learning by Tina
997 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 in Machine Learning by sairam
• 160 points

edited Aug 27 by MD 676 views
0 votes
1 answer

What are the options for deploying models in production with R?

Well, I could say that the answer ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,210 points
661 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 18 in Machine Learning by MD
• 79,270 points
1,704 views
0 votes
1 answer