## **Evaluation Metric**

Submissions for this competition are evaluated using **multi-class logarithmic loss (log loss)**.

Each observation in the test set corresponds to a single patient and has exactly **one true outcome label**, represented by the variable `Status`. The possible outcome classes are:

* `Status_C`
* `Status_CL`
* `Status_D`

For every `id` in the test set, competitors must submit **predicted probabilities** for **each of the three outcome classes**.

The log loss metric penalizes confident but incorrect predictions more heavily than uncertain ones, making it especially suitable for probabilistic multi-class classification tasks.

The metric is defined as:

$$
\text{log loss} = -\frac{1}{N}\sum_{i=1}^{N}\sum_{j=1}^{M} y_{ij}\log(p_{ij})
$$

where:

* **N** is the number of rows in the test set
* **M** is the number of outcome classes (3)
* **log** denotes the natural logarithm
* **(y_{ij})** equals 1 if observation *i* belongs to class *j*, and 0 otherwise
* **(p_{ij})** is the predicted probability that observation *i* belongs to class *j*

### **Important Notes**

* The predicted probabilities for a given row **do not need to sum to 1**.
  Before scoring, probabilities for each row are automatically **rescaled so that their sum equals 1**.

To prevent numerical instability caused by extreme values, predicted probabilities are clipped to the range:

$$
\max(\min(p, 1 - 10^{-15}), 10^{-15})
$$

Lower log loss values indicate better model performance.

---

## **Submission Format**

For each `id` in the test set, you must submit predicted probabilities for the three outcome classes: `Status_C`, `Status_CL`, and `Status_D`.

The submission file must:

* Be in **CSV format**
* Contain a **header row**
* Include **one row per `id`**

### **File Structure**

```
id,Status_C,Status_CL,Status_D
7905,0.628084,0.034788,0.337128
7906,0.628084,0.034788,0.337128
7907,0.628084,0.034788,0.337128
...
```

Make sure all predicted probabilities are valid numeric values. Submissions with missing values or incorrect formatting may result in scoring errors.
