Your score for this submission is:0.0. Your Leaderboard score is: 0.0


can any any one help me with this? i am getting 0 score in leaderboard where my code seems to be fine.

is anything wrong with the submission format?

submission = pd.DataFrame({
“Loan_ID”: df_test[“Loan_ID”],
“Loan_Status”: pred
submission.to_csv(’/resources/data/Loan prediction/Sample_Submission.csv’,sep=’,’, index=False)


Hi @hawk9,

Please post the first five rows of your submission file


LP001015 Yes
LP001022 Yes
LP001031 Yes
LP001035 Yes
LP001051 Yes


You submission file should include columns names, and should be comma separated.

It should look like this


Also, the file should be of 368 lines


here is my submission code:

submission = pd.DataFrame({
“Loan_ID”: df_test[“Loan_ID”],
“Loan_Status”: pred
submission.to_csv(’/resources/data/Loan prediction/Sample_Submission.csv’,sep=’,’, index=False)

as you can see i have used the ‘sep’ parameter to separate the features using comma and i also have 368 lines, but still it seems i am getting the same problem.

when i run the below lines:

import csv
with open(’/resources/data/Loan prediction/Sample_Submission.csv’) as f:
reader = csv.reader(f)
your_list = list(reader)

print (your_list)

i get:

[[‘Loan_ID’, ‘Loan_Status’], [‘LP001015’, ‘Yes’], [‘LP001022’, ‘Yes’], [‘LP001031’, ‘Yes’], [‘LP001035’, ‘Yes’], [‘LP001051’, ‘Yes’], [‘LP001054’, ‘Yes’], [‘LP001055’, ‘Yes’], [‘LP001056’, ‘No’], [‘LP001059’, ‘Yes’], [‘LP001067’, ‘Yes’], [‘LP001078’, ‘Yes’], [‘LP001082’, ‘No’], [‘LP001083’, ‘Yes’], [‘LP001094’, ‘No’],…]


I should have been more clear.

Did you notice that in the correct format, the Loan_Status column should have values as “Y” and “N” and not “Yes” and “No”?



Ok, i think my code is not doing as expected.

x_train= df.drop([‘Loan_Status’,‘Loan_ID’], axis=1)

random_forest = RandomForestClassifier(n_estimators=100), y_train)
pred = random_forest.predict(x_test)
random_forest.score(x_train, y_train)

according to the code the ‘pred’ should return ‘Loan_Status’ but it seems it is returning something else (‘Married’/‘Self_Employed’). could you please check where am i going wrong?


Take a look at a sample solution and see if it helps


Ok so my score is 0.784722 now after somehow modifying the code. I have obtained the EMI and ratio(EMI/Total income). Could you advice how can i improve my score?


Although a generic advice, you should look at ensemble methods for modelling. Another thing would be creating more features as EMI that you have created.

I would recommend you to refer the discussions that have already happened and gain ideas from it


@jalFaizy how can we convert array of predictions of 0/1 into y/n for correct submission for the problem?


You can simply do it by making a one-to-one correspondence with these values.

For example,
you assign 0 to N, and 1 to Y.

But do make sure you stick to these assignments till the end and not deviate from it


Hi, just wondering where to check the scores. I just submitted my first file but did not see any messages for scores. Thanks.