Machine learning model for aviation accident risk prediction using ACAS and air traffic complexity data. Includes ONNX model export for deployment.
This project presents a machine learning-based aviation safety system designed to estimate air crash probability using Air Traffic Control (ATC) public datasets from EASA.
The system analyzes flight path fluctuations, airspeed variations, and geographic movement patterns to identify high-risk conditions. The trained predictive models are exported using ONNX (Open Neural Network Exchange) to enable platform-independent deployment and real-time inference capability.
This work demonstrates an end-to-end pipeline from raw aviation data ingestion to deployment-ready predictive modeling.
Replace
YOUR_USERNAMEwith your GitHub username.
- Analyze aviation flight path fluctuations
- Engineer predictive safety features
- Train accident probability classification models
- Export models to ONNX for cross-platform compatibility
- Identify geographic high-risk zones
- Explore automated โMaydayโ alert triggers
Source: EASA Air Traffic Control Public Data
Features include:
- Latitude
- Longitude
- Airspeed
- Flight path deviation metrics
- Traffic complexity indicators
The dataset aggregates information from multiple ATC sources.
- Missing value handling
- Feature normalization
- Removal of irrelevant variables
- Merging ACAS + Traffic Complexity datasets
- Distribution analysis
- Geographic trend visualization
- Correlation analysis
- Outlier detection
- Path instability metrics
- Speed fluctuation indicators
- Spatial risk mapping
- Supervised classification approach
- Train-test split
- Model validation
- Export trained model to ONNX
- Enable inference outside Python ecosystem
To assess predictive performance, the following metrics are evaluated:
Overall correctness of the model.
Measures how many predicted high-risk cases were actually high-risk.
Measures how many actual high-risk cases were correctly identified.
Harmonic mean of Precision and Recall.
Evaluates the model's ability to distinguish between safe and high-risk flights across different classification thresholds.
The confusion matrix provides detailed classification breakdown:
| Predicted Safe | Predicted Risk | |
|---|---|---|
| Actual Safe | True Negative | False Positive |
| Actual Risk | False Negative | True Positive |
- False Positives: False alarm situations
- False Negatives: Dangerous undetected cases (critical in aviation safety)
In safety-critical systems, minimizing False Negatives is especially important.
The ROC curve plots:
- True Positive Rate (Recall)
- False Positive Rate
A model with strong predictive power will show:
- Curve close to top-left corner
- AUC score close to 1.0
This ensures reliable discrimination between safe and high-risk flight conditions.
python -m venv venvWindows:
venv\Scripts\activateMac/Linux:
source venv/bin/activatepip install -r requirements.txtATC.ipynbโ EDA & preprocessingonnx_1.ipynbโ Model trainingONNX_2.ipynbโ Advanced risk analysis
The use of ONNX enables:
- Cross-language inference (C++, Java, etc.)
- Cloud deployment
- Edge deployment
- Real-time aviation monitoring systems
- Real-time streaming integration using Apache Kafka
- Distributed processing using Apache Spark Streaming
- Live risk monitoring dashboards
- Automated alert system for aviation authorities
- Integration into ATC decision support systems
``` Raw ATC Data โ Data Cleaning โ EDA & Feature Engineering โ ML Classification Model โ ONNX Conversion โ Risk Prediction & Alert Simulation ```
This package contains Iteration 2 of the Air Traffic Control (ATC) Risk Prediction model, featuring MAML (Model-Agnostic Meta-Learning) and SHAP (SHapley Additive exPlanations) for decision transparency.
- MAML Meta-Learning: A model designed for rapid adaptation to new aviation sectors and traffic conditions.
- SHAP Explainability: Deep insights into why the model classifies a flight as "High Risk".
- ONNX Weights: Pre-trained model in an interoperable format for high-performance inference.
train_v2.py: The core MAML training architecture.calculate_shap_v2.py: The explainability engine that generates feature importance and sensitivity plots.accident_prediction_v2.onnx: Optimized pre-trained model weights.X_test_v2.npy: Representative sample data for SHAP analysis.model_metrics.json: Model performance metadata and feature labels.assets/: Folder containing generated SHAP bar and summary plots.requirements.txt: Python dependencies.
pip install -r requirements.txtTo re-generate the SHAP values and visualizations:
python calculate_shap_v2.pyThis will update the plots in the assets/ folder.
Developed for the ADAI Project - Air Traffic Control Risk Classification CC ABHISHEK HIRVE.
ADAI_Proj/
โ
โโโ ATC.ipynb
โโโ onnx_1.ipynb
โโโ ONNX_2.ipynb
โโโ data/
โโโ models/
โโโ requirements.txt
โโโ README.md
Iteration_2_MAML_Engine/
โโโ data/ # Processed datasets for meta-learning
โ โโโ final_acas_data.csv
โ โโโ final_dataframe_trfcomplexity.csv
โ โโโ ... (auxiliary ONNX data)
โโโ .gitignore # Keeps repo clean from cache/temp files
โโโ .ipynb_checkpoints/
โโโ ONNX_2.ipynb # Main Analysis & Workflow Notebook
โโโ README.md # Technical Guide for Iteration 2
โโโ accident_prediction_v2.onnx # Final Trained MAML Model
โโโ build_dashboard_data_v2.py # Dashboard Metric Generator
โโโ calculate_metrics.py # Precision/Recall/F1 Calculator
โโโ extract_geo.py # Geo-spatial Feature Extractor
โโโ generate_dashboard_data.py # Main Dashboard Plotting Engine
โโโ inject_geo_data.py # Landing Page Data Integration
โโโ model_metrics.json # Performance Benchmarks
โโโ requirements.txt # Dependencies (torch, onnx, etc.)
โโโ set_complexity.py # Complexity Configuration Utility
โโโ train_v2.py # Core MAML Meta-Learning Engine
This project demonstrates:
- Applied AI in safety-critical systems
- End-to-end ML engineering pipeline
- Aviation risk modeling
- Model portability and deployment design
- Practical ONNX implementation
Abhishek Hirve
Artificial Intelligence & Machine Learning
Focused on aviation safety and applied AI systems.
This project is intended for educational and research purposes.






