-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't predict using test data #24
Comments
I'm having the exact same issue/confusion. I added a target column and filled it with np.nan before running the predictions, but then a ValueError was thrown. |
Hmmm…I was a bit puzzled when I didn’t see a predict command for The Titanic dataset. Not sure where the csv file in the example came from.
Regards, Kevin
…Sent from my iPhone
On Apr 11, 2019, at 17:50, Brunarspunar ***@***.***> wrote:
I'm having the exact same issue/confusion.
I tried adding an empty target column, filling it with np.nan, but then a ValueError: was thrown.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
so I got around the problem using this link. I modified my code as follows:
When I run the command to generate predictions, I get a predictions.csv but the results it contains are not what I would expect for a logistic regression. It contains probabilities, not 1 or 0, which are the values in the training data and what I would expect. Why is that??? |
I had the same problem |
Hello - I have successfully trained my model using my training dataset. Now, when I go to predict, using this command:
python model.py -d ../testing_imputed.csv -m predict
I get this error:
ValueError: Usecols do not match columns, columns expected but not found: ['accepted']
but this is the column I'm trying to predict! Am I supposed to create the target/prediction column in the test data and it will be populated with the predictions? This is a logistic regression problem, where I am trying to predict whether or not a loan will be approved. If I need to add a column, is it:
test_data'['accepted'] = ""
Or do I zero it out and the prediction will update the value with what the model should predict?
Thanks in advance to all who respond.
The text was updated successfully, but these errors were encountered: