https://365datascience.com/dwqa-answer/answer-for-simple-linear-regression-with-sklearn-summary-table/ -
Hi liqian,
thanks for reaching out! Instead of the line:
reg.predict(1740)
try the following two lines:
new_data = np.array(1740).reshape(-1,1)
reg.predict(new_data)
This should fix the issue. Let me know how it goes!
Best,
Eli
#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy
No comments:
Post a Comment