### 📈 Evaluation Metric: F-beta Score (F2)

The performance of all submitted models in this competition will be evaluated and ranked using the **F2 Score** (F-beta with beta=2). This metric is ideal for anomaly detection in critical infrastructure because it heavily prioritizes **recall** (detecting anomalies) over precision, ensuring that potential security threats are not missed.

Competitors will be ranked based on their F2 score on the Private Leaderboard, which uses a hidden portion of the test set to ensure the final models generalize well and have not been overfit to the public scores.

### What is F2 Score?

The F2 score is the weighted harmonic mean of precision and recall, where **recall is weighted 4x more than precision**.

**Formula**: F2 = 5 × (precision × recall) / (4 × precision + recall)

Where:
- **Precision** = True Positives / (True Positives + False Positives) - How many detected anomalies are real?
- **Recall** = True Positives / (True Positives + False Negatives) - How many real anomalies did we detect?

**Score Range**:
- **1.0** = Perfect score (all anomalies detected, no false positives)
- **0.0** = Worst score (no anomalies correctly identified)

**Why F2?**
With beta=2, the F2 score weighs recall 4x more than precision. This means:
- ✅ **Prioritizes catching all anomalies** (high recall) - critical for security
- ✅ **Less concerned about false alarms** (precision less important)
- ✅ **Optimal for scenarios where missing a cyber-attack is very costly**

Your goal is to maximize the F2 score, aiming as close to 1.0 as possible while ensuring you detect as many anomalies as possible.

### Submission Format and Scoring

The submission file requires you to output a prediction **probability** (a float between 0 and 1) for the positive class (Anomaly). Kaggle's platform will:

1. Convert your probabilities to binary predictions using a threshold (typically 0.5)
2. Calculate the F2 score based on those binary predictions

**Important**: Because F2 heavily favors recall, you may want to optimize your classification threshold below 0.5 to catch more anomalies, even at the cost of some false positives.

### Leaderboard Breakdown

The F2 score will be used to determine ranking on both leaderboards:

- **Public Leaderboard F2**: Calculated on a public subset of the test data (30%).
- **Private Leaderboard F2**: Calculated on the remaining private subset of the test data (70%). This score determines the final competition winners.
