# A Beginner's Mistake

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

All-Russian School Olympiad in Informatics 2025–2026, Final Stage<br>
“Artificial Intelligence” profile, Tour 2, Moscow, 25 March 2026<br>
Task C

## Statement

Masha was invited to a summer internship at a research institute that studies animal habitats. As an example of an interesting assignment that Masha will be working on, the researchers shared observations of the habitats of a new species of sloth (*Bradypus procrastinator shkolnikus*). This species was only recently separated from a previously known one. Now the scientists want to discover other potential zones where it lives.

For Masha's convenience, the data were split into `train` and `test`. Since the researchers only have their own data on locations where sloths already live, they asked the statistical agency of South America to provide data on other locations as well, in order to extend the test dataset. Each row in the data describes a location and contains measured parameters characterising the climate, the weather, and the plant and animal life. The institute's staff complained that they simply could not build a good model for this task. Masha looked at the data and immediately noticed two typical beginner's mistakes made by the institute's staff.

Help Masha build a model that, from the available data, predicts whether a location belongs to a potential habitat zone of the new species of sloth.

## Input format

The following files are attached to the task:

- `map_C.json`: a file with the following structure:

  ```json
  {
      "coastline": [...]
  }
  ```

  `coastline` is an array of coastline coordinates used for visualisation.
- `train_C.csv`: the training set. Each object contains the location features and the target variable `target` (a binary label `0` or `1`);
- `test_C.csv`: the test set. Each object contains the identifier `id` and the location features;
- `baseline_C.ipynb`: a notebook with a baseline solution of the task;
- `submission_C.csv`: an example of the solution to be submitted to the testing system.

## Output format

For checking, you must upload the archive `solution_C.zip`.

The archive must contain:

1. The file `submission_C.csv` with two columns:
   - `ID`: the identifier of the object from the test set `test`;
   - `target`: the predicted binary class label (`0` or `1`).
2. The file `solution_C.ipynb`: a Jupyter Notebook with your solution.

You may add to the archive additional files needed for your solution to work. The archive must, however, contain exactly one file with the extension `.csv` and exactly one file with the extension `.ipynb`.

## Scoring

You can get up to 60 points for this task.

The data are split into a public and a private part. When you submit `submission_C.csv`, you are shown the result on the **public** part. After the end of the stage, the result will be recomputed on the **private** part. The public and private parts do not overlap.

After the end of the stage, your metric will be converted to a 60-point scale according to the following rule:

- the result of the **baseline solution**, with a value of F1 $\leq X$, is scored **0 points**;
- a result with a value of F1 $\geq Y$ is scored **60 points**;
- if the value of F1 lies between $X$ and $Y$, the number of points is computed by the linear interpolation formula:

$$\text{Score} = 60 \cdot \frac{\mathrm{F1} - X}{Y - X}.$$

The metric values $X$ and $Y$ will be available in the testing system.

The final score for the task is based on the **last** submission.

## Metric for evaluating the accuracy of the answer

This task uses the **F1-score** metric. The participant submits binary class labels (`0` or `1`).

Let us denote:

- `TP`: the number of true positive predictions;
- `FP`: the number of false positive predictions;
- `FN`: the number of false negative predictions.

Then

$$\text{Precision} = \frac{TP}{TP + FP},$$

$$\text{Recall} = \frac{TP}{TP + FN},$$

and

$$\mathrm{F1} = \frac{2 \cdot \text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}}.$$

The value of the **F1-score** lies in the range from 0 to 1. The higher the value, the better the quality of the classification.

Example of computing the **F1-score** metric in Python:

```python
from sklearn.metrics import f1_score

score = f1_score(y_true, y_pred)
print("F1-score =", score)
```
