How can i make sample submission file

i have created the model with accuracy 94. how can i test the result and make sample submission file for that.

Hi @raj77,

  1. Read the submission file

  2. Set the loan ID and predictions
    submission['Loan_Status']=pred_test submission['Loan_ID']=test_original['Loan_ID']

  3. Remember we need predictions in Y and N. So convert 1 and 0 to Y and N.
    submission['Loan_Status'].replace(0, 'N',inplace=True)
    submission['Loan_Status'].replace(1, 'Y',inplace=True)

  4. Convert the submission to .csv format and make submission to check the accuracy on the leaderboard.
    pd.DataFrame(submission, columns=['Loan_ID','Loan_Status']).to_csv('logistic.csv')

Reference: Free Course: Loan Prediction Practice Problem

Hi, i get an error when creating submission csv,on the below line of code
submission[‘Loan_ID’]=test_original[‘Loan_ID’], i get “test_original” not defined

© Copyright 2013-2019 Analytics Vidhya