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
Help · 19 Aug 2020, 13:35 · 5

Good day Data Luminaries.

Please can anyone give the right format for submitting?

Like the way my CSV file should be structured?

I tried the conventional way but I keep getting errors

Thanks in anticipation !

Discussion 5 answers

The submission format is in the rules and there's a sample submission file to check. Basically it should be 2 columns. The first is the id of the user you are trying to predict and the second is the probability that they'll churn.

19 Aug 2020, 13:41
Upvotes 0
User avatar
University of benin

Your submission format should be the same as you sample submission

Pass your prediction on the test dataset into a variable

i.e

test_pred = model.predict_proba(test)[:-1]

Read you sample submission csv

sample = pd.read_csv('samplesubmission.cs')

sample['CHURN'] = test_pred

sample.to_csv('submission_file.csv', index=False)

OK Emmanuel, thanks for this

but why are we leaving out the last column

hello @imomEmmanuel am yet to submit mine

but i dont seems to understand how to go about the submission

this is the format i got

pd.DataFrame({"user_id": test["user_id"], "CHURN": pred}).to_csv("starter-submission.csv", index = False)

what should i change from this format above? thanks

@kingdafidi this is how you should go about it (thanks to @imomEmmanuel):

Pass your prediction on the test dataset into a variable

i.e

test_pred = model.predict_proba(test)

Read you sample submission csv(from zindi)

sample = pd.read_csv('samplesubmission.csv')

the submission sample has two columns, the user_id and CHURN

next up, replace your values in the CHURN column with the your predicted values:

sample['CHURN'] = test_pred

then you save:

sample.to_csv('submission_file.csv', index=False)