Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to use .predict() method
Post: RE: How to use .predict() method

I found the solution. The object to be passed to .predict() is not the model object, but the fitobject. In this way it works: test_preds=results_test.predict(X_test)
Jack90_ Data Science 4 808 Nov-03-2023, 12:33 PM
    Thread: How to use .predict() method
Post: RE: How to use .predict() method

(Nov-02-2023, 12:12 PM)Larz60+ Wrote: Is this related?I think no. That question uses the Iris dataframe as an example like I did, but it's not on .predict() method.
Jack90_ Data Science 4 808 Nov-02-2023, 05:16 PM
    Thread: How to use .predict() method
Post: How to use .predict() method

I am trying to apply a forecasted model with OLS regression to a test dataset, but when I use the .predict() method, I have this error: ValueError: shapes (2938,4) and (1583,5) not aligned: 4 (dim 1)...
Jack90_ Data Science 4 808 Nov-02-2023, 09:30 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020