
I'm facing an issue where the submission system is indicating missing entries for certain IDs and their associated features, namely 0_P, 0_K, 0_Mg, 0_pH, and 3_P. However, my target values include four features for each entry. I attempted to submit the predictions using the following code
submission = pd.DataFrame(data=test_pred, columns=["P", "K", "Mg", "pH"])
submission.to_csv("submission.csv", index_label="sample_index")
Look at example on Info page - you have to submit in "tall" format, not "wide" format. Thus all columns "P", "K" etc must be in just one long column. Again, look at info page, that will make it clear.
@skaak thanks for the respond but iam steal getting this error while summitting
sample_index = gt_df['sample_index']
submission_df = pd.DataFrame(adjusted_test_preds, columns=['P', 'K', 'Mg', 'pH'])
submission_df['sample_index'] = sample_index
submission_tall = submission_df.melt(id_vars='sample_index',
value_vars=['P', 'K', 'Mg', 'pH'],
var_name='Parameter',
value_name='Target')
submission_tall['sample_index'] = submission_tall['sample_index'].astype(str)
submission_tall['sample_index'] = submission_tall['sample_index'] + '_' + submission_tall['Parameter']
submission_tall = submission_tall[['sample_index', 'Target']]
submission_tall.to_csv('submission_Tall.csv', index=False)
Any assistance in resolving this issue would be greatly appreciated.
Not sure - your code looks fine, but I did not run it.
I note my 'Target' is named '0', perhaps try to rename 'Target' to 0 and try again. I can't remember, but I think I must have gotten this from the starter notebook, but if it does not work, paste in the head of your submission here to inspect.
Here is my code fwiw
Thanks @skaak it works
Thanks, I see you are making real good progress. All the best, you have a strong model from the start.
thanks @skaak can i have ur email address
Ok - remember we can not discuss this competition in any significant detail offline, unless we are a team, as that is against the rules.
Just go to my website (ferrasolutions.com) and click on the logo (or the email printed below it) and I will receive the email and then reply from my personal address.
What do you have in mind?
Alright check your inbox