Primary competition visual

GeoAI Challenge Estimating Soil Parameters from Hyperspectral Images by ITU

$1 000 USD
Challenge completed almost 2 years ago
Prediction
Earth Observation
217 joined
62 active
Starti
Sep 11, 23
Closei
Nov 12, 23
Reveali
Nov 12, 23
User avatar
ML_Wizzard
Nasarawa State University
summiting error
Help · 8 Oct 2023, 14:17 · 9
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")

Discussion 9 answers
User avatar
skaak
Ferra Solutions

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.

8 Oct 2023, 15:05
Upvotes 0
User avatar
ML_Wizzard
Nasarawa State University

@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.

User avatar
skaak
Ferra Solutions

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.

User avatar
skaak
Ferra Solutions

Here is my code fwiw

tall_sub = []
for i in [ "P", "K", "Mg", "pH" ] :
	tall_sub.append ( pd.DataFrame ( baseline_sub [ i ].values, index = baseline_sub.index.to_series ().apply ( lambda x : str ( x ) + "_" + i ) ) )
tall_sub = pd.concat ( tall_sub, axis = 0 )
tall_sub.to_csv ( "sub.csv", index_label = "sample_index" )

User avatar
ML_Wizzard
Nasarawa State University

Thanks @skaak it works

User avatar
skaak
Ferra Solutions

Thanks, I see you are making real good progress. All the best, you have a strong model from the start.

User avatar
ML_Wizzard
Nasarawa State University

thanks @skaak can i have ur email address

User avatar
skaak
Ferra Solutions

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?

User avatar
ML_Wizzard
Nasarawa State University

Alright check your inbox