Primary competition visual

GeoAI Challenge Estimating Soil Parameters from Hyperspectral Images by ITU

$1 000 USD
Completed (almost 3 years ago)
Prediction
Earth Observation
224 joined
62 active
Starti
11 Sep 23
Closei
12 Nov 23
Reveali
12 Nov 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

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.

Upvotes 0
User avatar
ML_Wizzard

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

Upvotes 1
User avatar
skaak

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.

Upvotes 0
User avatar
skaak

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" )

Upvotes 1
User avatar
ML_Wizzard

Thanks @skaak it works

Upvotes 0
User avatar
skaak

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

Upvotes 0
User avatar
ML_Wizzard

thanks @skaak can i have ur email address

Upvotes 0
User avatar
skaak

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?

Upvotes 0
User avatar
ML_Wizzard

Alright check your inbox

Upvotes 0