The formula is x_norm = 1 - (x - x_min) / (x_max - x_min)
For regression problems with MAE, x_min is zero. To determine x_max, they say the following: "Regression metrics behave differently because a value of zero represents a perfect score, and the upper bound can grow indefinitely. To keep these metrics comparable, Zindi sets the x_max value to the metric score of the starter notebook on the leaderboard."
There isn't a starter notebook for this challenge, so it's unclear how x_max was determined. However, we can reverse engineer it using the MAE scores for each variable and solving a system of linear equations. We can write the x_norm formula as ax = b:
x_norm = 1 - (x - x_min) / (x_max - x_min)
=> x_norm = 1 - x / x_max
=> x / x_max = 1 - x_norm
=> ax = b
I used the top 15 scores on the LB to construct a set of linear equations and used np.linalg.solve to solve. I get the following coefficients:
All the coefficients are very similar, so it looks like they maybe used the same x_max for all 15 variables. Anyway, the following function should give you the metric:
def compute_score(scores: dict):
B = np.array([0.00066607, 0.00066607, 0.00066607, 0.00066609, 0.00066608,
Hey @Koleshjr, agree it would be great to get the function. Your question made me wonder if I could reverse engineer the formula. Zindi describes the approach here: https://zindi.africa/learn/introducing-multi-metric-evaluation-or-one-metric-to-rule-them-all
The formula is x_norm = 1 - (x - x_min) / (x_max - x_min)
For regression problems with MAE, x_min is zero. To determine x_max, they say the following: "Regression metrics behave differently because a value of zero represents a perfect score, and the upper bound can grow indefinitely. To keep these metrics comparable, Zindi sets the x_max value to the metric score of the starter notebook on the leaderboard."
There isn't a starter notebook for this challenge, so it's unclear how x_max was determined. However, we can reverse engineer it using the MAE scores for each variable and solving a system of linear equations. We can write the x_norm formula as ax = b:
x_norm = 1 - (x - x_min) / (x_max - x_min)
=> x_norm = 1 - x / x_max
=> x / x_max = 1 - x_norm
=> ax = b
I used the top 15 scores on the LB to construct a set of linear equations and used np.linalg.solve to solve. I get the following coefficients:
array([0.00066607, 0.00066607, 0.00066607, 0.00066609, 0.00066608, 0.00066604, 0.00066607, 0.00067273, 0.00067607, 0.00066607, 0.00066607, 0.00066606, 0.00066607, 0.00066607, 0.00066606])
All the coefficients are very similar, so it looks like they maybe used the same x_max for all 15 variables. Anyway, the following function should give you the metric:
The input is a dict like this (using your current LB scores):
{'Red Count': 10.21086261,This gives 0.8073775044386595 which is accurate to 5 decimal places.
Now I'm done with my procrastination for the afternoon :)
thanks @stefan027
this is very helpfulll!!!!!