I suggest you ...

Errors in the data

= df[["horsepower","curb-weight","engine-size","highway-mpg"]]
lm.fit(Z,df["price"])
Yhat = lm.predict(Z)

There is an error as it shows Yhat = lm.predict(X) and this is incorrect. must be Z

2 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base