Primary competition visual

Xente Fraud Detection Challenge

Helping Uganda
$4 500 USD
Completed (~7 years ago)
Classification
2091 joined
545 active
Starti
20 May 19
Closei
22 Sep 19
Reveali
23 Sep 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.

Upvotes 0
User avatar

its the same size as the test data

Upvotes 0
User avatar

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

Upvotes 0
User avatar

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)

Upvotes 0
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.

Upvotes 0