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,170 points
751 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,060 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,170 points
6,147 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,060 points
6,440 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,060 points
925 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,060 points
1,041 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, 2020 in Python by Mahesh
• 140 points
1,576 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
1,926 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 1,292 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 76 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, 2020 in Machine Learning by MD
• 95,060 points
1,947 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,060 points
3,363 views