## Scoring

The model performance is evaluated using a **globally weighted coefficient of determination (R²)** computed over all (image, target) pairs together.  
Each row is weighted according to its target type using the following weights:

- `Dry_Green_g`: 0.1  
- `Dry_Dead_g`: 0.1  
- `Dry_Clover_g`: 0.1  
- `GDM_g`: 0.2  
- `Dry_Total_g`: 0.5  

This means that instead of calculating R² separately for each target and then averaging, a single weighted R² is computed using all rows combined, with the above per-row weights applied.

---

## R² Calculation

The weighted coefficient of determination \\(R^2_w\\) is calculated as:

$$
R^2_w = 1 - \frac{\sum_j w_j (y_j - \hat{y}_j)^2}{\sum_j w_j (y_j - \bar{y}_w)^2}
$$

where \\(\bar{y}_w = \frac{\sum_j w_j y_j}{\sum_j w_j}\\).

**Residual Sum of Squares \\(SS_{\text{res}}\\)**  
Measures the total error of the model’s predictions:
$$
SS_{\text{res}} = \sum_{j} w_j (y_j - \hat{y}_j)^2
$$

**Total Sum of Squares \\(SS_{\text{tot}}\\)**  
Measures the total weighted variance in the data:
$$
SS_{\text{tot}} = \sum_{j} w_j (y_j - \bar{y}_w)^2
$$

**Terms**

- \\(y_j\\): ground-truth value for data point \\(j\\)  
- \\(\hat{y}_j\\): model prediction for data point \\(j\\)  
- \\(w_j\\): per-row weight based on target type  
- \\(\bar{y}_w\\): global weighted mean of all ground-truth values  

---


## Submission File

Submit a CSV in **long format** with exactly two columns:

- `sample_id` : ID constructed from image ID and target_name pair.
- `target`: Your predicted biomass value (grams) for that sample_id (float).

The valid `target` names are:
`Dry_Green_g`, `Dry_Dead_g`, `Dry_Clover_g`, `GDM_g`, `Dry_Total_g`.

Your file **must contain one row per (image, target) pair**, i.e., 5 rows for each image in the test set.

**Header and example:**

```csv
sample_id,target
ID1001187975__Dry_Green_g,0.0
ID1001187975__Dry_Dead_g,0.0
ID1001187975__Dry_Clover_g,0.0
ID1001187975__GDM_g,0.0
ID1001187975__Dry_Total_g,0.0
ID1001187976__Dry_Green_g,0.0
ID1001187976__Dry_Dead_g,0.0
ID1001187976__Dry_Clover_g,0.0
ID1001187976__GDM_g,0.0
ID1001187976__Dry_Total_g,0.0
```

