Getting 0.0 score on file submission

machine_learning

#1

I’m getting 0.0 score on file submission and already have checked file format for submission also cross validation score that I’m getting is 81% on my model, please suggest something


#2

Hi,

Did you change the target encoding? To be precise - the submission for Loan Status column should be “Y” or “N”


#3

i have the same question,do you know how to solve?


#4

@kariss Please print the first five lines of your submission file and paste it here


#5

thank you,i know how to do.


#6

Hi @kariss, the purpose of asking you this was to understand what the issue you are facing - and so that the community might help you solve the issue.


#7

Kindly help me I am getting below depreciation error when trying to do inverse tranform

/usr/local/lib/python2.7/dist-packages/sklearn/preprocessing/label.py:151:
DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but
in future this will result in an error.
Use array.size > 0 to check that an array is not empty.


#8

kindly help me it is not transforming to Y and N.
Initially it is showing depreciation error, so I have installed numpy version 1.13.3
After that it is showing as below
Error_3


#9

Hi Rajesh,

Try this code…!

prediction = LogReg.predict(x_test).astype(int)

submission = pd.DataFrame({   
"Loan_ID": test["Loan_ID"],      
"Loan_Status": prediction
    })

submission["Loan_Status"] =
np.where(submission.Loan_Status ==1,"Y","N")
submission.to_csv(“submission.csv', index=False)

Hope it will work…!


#10

Hello rock,

Thank you for your help!!! It is working fine. :slight_smile:

I would like to know the reason why inverse_transform by default is taking Education Values.


#11

Hi Rajesh,
Once check the values after slicing and dicing of your data set. I think you may have selected Education field instead of Loan_ID.


#13

it didn’t work. Can you help me out
here is my code


#14

Hi sai_aashrith,
In your code,you are storing your output in the variable name “predict”.
So, you should change to “Loan_Status”:predict instead of " “Loan_Status”:prediction".

Here is the modified code:

predict = rfcmodel.predict(test1).astype(int)

submission = pd.DataFrame({
“Loan_ID”: test[“Loan_ID”],
“Loan_Status”: predict
})

submission[“Loan_Status”] =
np.where(submission.Loan_Status ==1,“Y”,“N”)
submission.to_csv(“submission.csv’,
index=False)

Hope it will work!!


#15

I am not able to upload the submission, getting the message "Invalid file type. Only .CSV types allowed, but here i am uploading the sample_submission.csv and the code file .py but still getting the above error… Any suggestions.

Thanks


#16

Hi @jiju,

Please make sure that the file you are trying to submit has the same format as the sample submission.


#17

Hi @AishwaryaSingh

yes i tried all possible stuff the file name is (Sample_Submission_ZAuTl8O_FK3zQHh) with Loan_ID & Loan_Status but still i am not able to upload


#18

Hi @jiju,

Can you please share the csv file that you are trying to upload?


#19

sure, let me share it now, Provide an email id so that i can share the .csv file


#20

|Loan_ID|Loan_Status|
|LP001015|Y|
|LP001022|Y|
|LP001031|Y|
|LP001035|Y|
|LP001051|Y|
|LP001054|Y|
|LP001055|Y|


#21

This the columns and the values