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
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.
its the same size as the test data
I assume your submission file includes index column....file.tocsv(path, index=false)
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)
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.
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.
its the same size as the test data
I assume your submission file includes index column....file.tocsv(path, index=false)
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)
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.