# PN-expert: Parkinson's Exercise Classification

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

*Source: the 2023/24 task collection of the National Technology Olympiad (NTO), "Artificial Intelligence" profile, Stage 1, pp. 85–86: [original PDF](https://ntcontest.ru/upload/problembooks-2324/13_%D0%98%D1%81%D0%BA%D1%83%D1%81%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D0%B8%D0%BD%D1%82%D0%B5%D0%BB%D0%BB%D0%B5%D0%BA%D1%82.pdf#page=85).*

## Engineering tour

The task aims to test the participants' skills in working with classification algorithms in order to develop a model capable of automatically classifying the exercises performed by patients in video recordings. It tests the participants' competences in data processing and in applying machine learning algorithms, as well as their ability to immerse themselves in a subject domain and to apply formulas and classical algorithms when solving artificial intelligence problems. The task helps to assess participants on their knowledge and skills in programming, medicine, tabular data processing and mathematical statistics, and in applying technical solutions to real-world problems.

## Task II.3.1. PN-expert (100 points)

*Topics: programming, data exploration, machine learning, mathematics.*

### Problem statement

In the first qualifying stage, participants are asked to solve a simple task: determining the name of the exercise used to assess postural and kinetic tremor in patients diagnosed with Parkinson's disease.

Why does this matter?

Diagnosing and establishing Parkinson's disease (hereinafter PD) requires the physician to have sufficient experience and an understanding of the requirements of the clinical guidelines approved by the Russian Ministry of Health. The most widely used diagnostic instrument for PD is the unified rating scale MDS UPDRS: <https://sudact.ru/law/klinicheskie-rekomendatsii-bolezn-parkinsona-vtorichnyi-parkinsonizm-i/prilozhenie-g1-gn/prilozhenie-g1/>.

Consequently, establishing a clinically reliable diagnosis is influenced by a subjective factor that rests solely on the physician's perception of the patient's movements during the examination. In other words, this assessment is at present overwhelmingly subjective!

An objective assessment of motor disorders is a priority for the clinical follow-up of patients when establishing a diagnosis and when prescribing and adjusting treatment; it matters most when monitoring and controlling the patient's responses to changes in drug therapy (a change of dosage and/or of medication). Researchers developing PN-expert are working on such an objective instrument: <https://inscience.news/ru/article/nti/8982>.

This platform makes it possible to track the condition of patients by analysing video recordings in which people perform special exercises.

For the diagnostic instrument to work correctly, it is important that the algorithms not only measure tremor successfully but also automatically distinguish between the exercises that the patient performs in the video. In this task, we invite you to work with a large body of data from observations of patients testing PN-expert and to build a machine learning model that helps to classify the exercises.

Link to the original competition: <https://cups.online/ru/contests/first_round_nto_ai>.

### Data description

*Translator's note: the column headers in the data are in Russian; each is kept below as printed in the statement, followed by its English meaning in brackets.*

- **Имя файла данных** (data file name): the name of the file that holds the complete records of the test results of the given patient.
- **Folder Path**: our target variable. The class of the exercise that the given patient performed.
- **Пол** (sex): the sex of the given patient.
- **Полных лет** (age in full years): the age of the given patient in completed years.
- **Пациент off/on** (patient off/on): the operating state of the given patient's neurostimulator.
- **Определенный диагноз врачом (0–5)** (diagnosis assigned by the physician, 0–5): the physician's subjective assessment of the given patient's condition on the `MDS UPDRS` scale.

The archive with the complete records can be downloaded from this link: <https://disk.yandex.ru/d/3sQ-vEewhCh2aw/data.zip>.

*[Figure: diagram of the 21 hand landmarks, numbered 0–20 and joined by lines; see the [original statement](https://ntcontest.ru/upload/problembooks-2324/13_%D0%98%D1%81%D0%BA%D1%83%D1%81%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9%20%D0%B8%D0%BD%D1%82%D0%B5%D0%BB%D0%BB%D0%B5%D0%BA%D1%82.pdf#page=86), page 86. Its legend lists the landmarks as follows.]*

| No. | Landmark | No. | Landmark |
|---|---|---|---|
| 0 | WRIST | 11 | MIDDLE_FINGER_DIP |
| 1 | THUMB_CMC | 12 | MIDDLE_FINGER_TIP |
| 2 | THUMB_MCP | 13 | RING_FINGER_MCP |
| 3 | THUMB_IP | 14 | RING_FINGER_PIP |
| 4 | THUMB_TIP | 15 | RING_FINGER_DIP |
| 5 | INDEX_FINGER_MCP | 16 | RING_FINGER_TIP |
| 6 | INDEX_FINGER_PIP | 17 | PINKY_MCP |
| 7 | INDEX_FINGER_DIP | 18 | PINKY_PIP |
| 8 | INDEX_FINGER_TIP | 19 | PINKY_DIP |
| 9 | MIDDLE_FINGER_MCP | 20 | PINKY_TIP |
| 10 | MIDDLE_FINGER_PIP | | |

### Assessment criteria

Accuracy on the private part of the dataset.

Link to the description of the metric code: <https://disk.yandex.ru/d/3sQ-vEewhCh2aw/scoring.ipynb>.

### Solution

You are required to develop an algorithm that classifies the type of movement and to present its output as a `CSV` file with the columns `path` and `pred`.

**Answer:** the solution to the task is a file with predictions, which is uploaded to the competition platform to assess the quality of the solution. An example of a solution file for upload: <https://disk.yandex.ru/d/3sQ-vEewhCh2aw/sample_submit.csv>.

Link to the expert reference solution: <https://disk.yandex.ru/d/3sQ-vEewhCh2aw/reference_solution>.
