Primary competition visual

DSN Pre-Bootcamp Hackathon: Expresso Churn Prediction Challenge by Data Science Nigeria

Helping Nigeria
Knowledge
Completed (over 5 years ago)
Classification
Prediction
671 joined
358 active
Starti
Aug 08, 20
Closei
Aug 22, 20
Reveali
Aug 22, 20
Submission Format
Data · 20 Aug 2020, 13:05 · 5

please am done with the prediciting of the train data. but i dont know how to export it and make submission with the format. please i need help over here... Thanks in anticipation guys

Discussion 5 answers

When you finish your predictions all you have to do is create a new CSV file with 2 columns. The first column is for the userID the second column is your official probability.

You can import the sample submission CSV that's part of the and just overwrite it's second column with your predicted values.

20 Aug 2020, 13:07
Upvotes 0

please can you help me out with the format please?

First you'll need the userIDs you can extract that from the test data set using

YourSubmission = pd.DataFrame(dftest["user_id"])

Then you'll need to assign your predicted probability to the second column called "CHURN". I did that using

YourSubmission["CHURN"] = prediction_proba[:,1]

where prediction_proba is my predicted probability and the index at the end extracts the second column.

Finally you need to save the "YourSubmission" dataframe to CSV. I did that using

YourSubmission.to_csv("YourSubmission.csv",sep=",",index=False)

Index= False ensures the CSV file doesn't save the index column.

waoooo .. thanks for the help

so after doing all this now cause have done it

is it the same notebook am submitting ?

No. You just submit the CSV file.