[QUESTION][2nd Chapter] LinearRegression() - Value Error
- Dominant language
- Jupyter Notebook
- Stars
- 30k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi sir, I have recently started reading your book and I'm in 2nd chapter now. till transformation pipeline I have got good knowledge and have implemented each line of code and practiced it as well.
But, coming to "Training and Evaluating on the Training Set" part, when I tried using linear regression an error is showing up by stating that "**ValueError: Found input variables with inconsistent numbers of samples: [16512, 4128]**"
```python
from sklearn.linear_model import LinearRegression
lin_reg = LinearRegression()
lin_reg.fit(housing_prepared, housing_labels)
```
I'm not getting this issue
and I'm stuck here, hope to hear back from you soon sir, Thank you
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.