Am I reversing my predictions right? (to get the actual class value)

Hey all, I am doing the IEEE-CIS Fraud Detection Kaggle Competition and I want to be sure that I am gathering and using my predictions correctly as my score stays at 50% no matter what. I believe I’m doing it right but I’d like a second set of eyes please :slight_smile:

predictions, *_ = learn.get_preds(ds_type=DatasetType.Test)
labels = np.argmax(predictions, 1).numpy()
test['isFraud'] = labels
test_df = test[['TransactionID', 'isFraud']]
test_df[['TransactionID', 'isFraud']] = test_df[['TransactionID', 'isFraud']].astype('int')

Let me know if that looks okay to everyone. Thanks again :slight_smile:

1 Like

It is :slight_smile: