Primary competition visual

Xente Fraud Detection Challenge

Helping Uganda
$4 500 USD
Completed (over 6 years ago)
Classification
2031 joined
545 active
Starti
May 20, 19
Closei
Sep 22, 19
Reveali
Sep 23, 19
submission failure
Data ยท 18 Sep 2019, 19:01 ยท 5

m getting an error , whilst submitting, what could be the problem?

error: Missing entries for IDs TransactionId_50600, TransactionId_95109, TransactionId_28185, TransactionId_22140, TransactionId_134338 and more

Discussion 5 answers
User avatar
Mugisha_

Make sure your predictions are of the same size as in the submission file. I suppose you ommited some test set data and ran predictions on it resulting in fewer data than in the sample-submission file.

20 Sep 2019, 09:44
Upvotes 0

its the same size as the test data

21 Sep 2019, 09:28
Upvotes 0
User avatar
Tanzania automotive technology centre - tatc

I assume your submission file includes index column....file.tocsv(path, index=false)

21 Sep 2019, 12:02
Upvotes 0

hey, yes..this is how my code for saving is

test[['TransactionId','FraudResult']].to_csv(r'C:\Users\mntapu\Downloads\data science training materials\credit card fraud detection\xg.csv' , index=False)

User avatar
Mugisha_

please format your code to something like this:

predictions = model.predict(test)

submission = pd.DataFrame({'TransactionId': test_id, 'FraudResult': predictions})

submission.to_csv('submission.csv',index=False)

your code looks quite unreadable.