Primary competition visual

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

Helping Nigeria
Knowledge
Completed (over 6 years ago)
Classification
Prediction
671 joined
358 active
Starti
08 Aug 20
Closei
22 Aug 20
Reveali
22 Aug 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
User avatar

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.

Upvotes 0
User avatar

please can you help me out with the format please?

Upvotes 0
User avatar

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.

Upvotes 1
User avatar

waoooo .. thanks for the help

so after doing all this now cause have done it

is it the same notebook am submitting ?

Upvotes 0
User avatar

No. You just submit the CSV file.

Upvotes 0