Quantcast
Channel: LinearRegression model gives me keyError 0 - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Suraj Shourie for LinearRegression model gives me keyError 0

As the traceback mentions, the error originates from print("Actual value of the house: ", y_test[0]).y_test[0] will only work when randomly 20% of the data also has the 0th index in it after...

View Article


LinearRegression model gives me keyError 0

I have written some code for a linear regression model to predict house prices. I'm witting exactly the same as a tutorial video; when I write random_state=42 it works without any error, but when I...

View Article

Browsing all 2 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>