### Background

Traffic safety is a critical global challenge. According to the World Health Organization, road traffic crashes result in approximately 1.35 million deaths annually. Many of these accidents could be prevented with better real-time risk detection and driver assistance systems.

This competition uses data from the **POLIDriving** dataset, a public-access driving dataset designed for road traffic safety analysis. The data was collected from real-world driving sessions through high-traffic accident zones in urban environments.

### Data Collection

The dataset was collected from:

- **5 real drivers** with varying driving styles and experience levels
- **1 synthetic driver** for controlled scenario testing
- **3 vehicle types**: CUV (Crossover Utility Vehicle), Pickup, and Sedan
- **2 urban routes** through areas with documented high accident rates
- **Urban environment**: Quito, Ecuador

Data was captured using:
- **OBD-II scanner** for vehicle telemetry
- **GPS receiver** for location and routing
- **Wearable health monitor** for driver physiological data
- **Weather API** for environmental conditions
- **Traffic accident database** for historical risk data

### Dataset Features

#### Vehicle Telemetry (6 features)
Real-time data from the vehicle's onboard diagnostics system:
- `speed` - Current vehicle speed (km/h)
- `rpm` - Engine revolutions per minute
- `acceleration` - Acceleration or deceleration (m/s²)
- `throttle_position` - Throttle position (%)
- `engine_temperature` - Engine coolant temperature (°C)
- `engine_load_value` - Engine load (%)

#### Driver Health (1 feature)
Physiological monitoring of the driver:
- `heart_rate` - Driver's heart rate (bpm)

#### Environmental Data (4 features)
Weather and temporal conditions:
- `current_weather` - Weather condition code
- `visibility` - Visibility distance (km)
- `precipitation` - Precipitation amount (mm)
- `observation_hour` - Hour of day (0-23)

#### Road & Traffic (3 features)
Historical accident data and road characteristics:
- `accidents_onsite` - Historical fatal accidents at location
- `design_speed` - Road design speed (km/h)
- `accidents_time` - Fatal accidents during similar time periods

#### Metadata (1 feature)
- `label_source` - Whether label is `expert_verified` or `semi_supervised`

### Dataset Files

- **`kaggle_train.csv`** - 1,980 labeled observations (495 per class, balanced)
- **`kaggle_test.csv`** - 23,152 test observations (labels withheld)
- **`kaggle_sample_submission.csv`** - Example submission format
- **`kaggle_full_unlabeled_data.csv`** - 82,223 additional unlabeled observations (optional)

### Target Variable

The `risk_level` indicates the accident risk classification:
- **1** = Low risk (normal, safe driving)
- **2** = Medium risk (elevated risk, attention needed)
- **3** = High risk (dangerous, intervention recommended)
- **4** = Very high risk (critical, imminent danger)

### Time Series Nature

This is **time series data** from sequential driving sessions. While each row can be treated independently, the temporal relationships contain valuable information. Consider:

- Rolling statistics over time windows
- Rate of change in speed, acceleration, heart rate
- Sequence patterns and trends
- LSTM, GRU, or Transformer architectures

### Modeling Approaches to Consider

**Feature Engineering**
- Speed violations: `speed / design_speed`
- Driver stress indicators: heart rate deviations
- Aggressive driving: rapid acceleration + high throttle
- Environmental risk scores: weather × visibility × precipitation
- Time-of-day risk patterns

**Model Architectures**
- Gradient boosting (XGBoost, LightGBM, CatBoost)
- Neural networks with temporal features
- Sequence models (LSTM, GRU) if preserving time series structure
- Ensemble methods combining multiple approaches

**Semi-Supervised Learning**
Use the 82K unlabeled samples for:
- Pre-training autoencoders
- Pseudo-labeling
- Consistency regularization
- Self-training approaches

### External Data & Pre-trained Models

You may use external data and pre-trained models, subject to:
- Free and equal access for all participants
- Cost not exceeding $100 USD
- Disclosure in your final documentation
- No test set leakage

### Citation

This dataset is derived from research published in Applied Sciences. If you use this data in academic work, please cite:

```
Marcillo, P., Arciniegas-Ayala, C., Valdivieso Caraguay, Á.L.,
Sanchez-Gordon, S., & Hernández-Álvarez, M. (2024).
POLIDriving: A Public-Access Driving Dataset for Road Traffic Safety Analysis.
Applied Sciences, 14(14), 6300. MDPI.
```

### Get Started

1. Download the training and test data
2. Explore feature distributions and correlations
3. Build baseline models
4. Engineer features based on domain knowledge
5. Experiment with time series approaches
6. Make submissions (up to 5 per day)
7. Select your best 2 submissions for final scoring
