Sustainable Development Goals (SDGs): Text Classification Challenge
$1,000 USD
5 September–12 November 2018 23:59
Classify text and documents by relevance to the 27 indicators of SDG #3 (Health and Well-Being)
Guidance request
published 2 Oct 2018, 13:24
edited 2 minutes later

hello guys

Sustainable Development Goals (SDGs): Text Classification Challenge

am having issues with generating the submission file using Python, for me instead of generating an array of 0 and 1s am getting something not likable some thing like a dictionary.and when i try to tabulate the result into a dataframe things just fill as it was from the dictionary. something like a column heading 3.b.1 than gets same data through the whole column down.

Any hit about it.

Hi star_MUK,

I was able to get the right kind of format, by using the column names from the submission fourm, then creating a new data frame from my predition output numpy array. So you can have some code like:

# some numpy array of predictions from model
Y = model.predict(X)
# columns names for output
cols = open('Devex_submission_format.csv').readline().replace('\n', '').split(',')  
# build output dataframe, Where index is the Unique ID col
output = pd.DataFrame(Y, index=X.index, columns=cols[1:])
# save for submission

I hope that helps