AI-Powered Exoplanet Detection and Classification Platform
LunariSpectraPortal is an artificial intelligence–based system developed to detect and classify exoplanets using open NASA mission data from Kepler, K2, and TESS.
The project automates the identification of exoplanetary candidates through a machine learning pipeline that combines astrophysical feature engineering, model calibration, and a web-based interface for interactive predictions.
This repository includes the full workflow: data processing, model training, prediction, and deployment.
-
Data Preparation
The harmonized dataset (harmonized_exoplanets_clean.csv) is located under thedata/directory and merges Kepler, K2, and TESS catalogs with consistent formatting. -
Model Training
Run the training pipeline located at: "src/nasa_main.py"
When executed, it:
- Generates feature-engineered datasets
- Trains and calibrates LightGBM, XGBoost, or RandomForest models
- Saves all outputs into the following:
artifacts/ ├── feature_importance.csv ├── train_config.json ├── label_encoder.pkl ├── metrics_raw.txt ├── metrics_calibrated.txt - Stores the trained model (
exoplanet_lightgbm_calibrated.pkl) inside:models/
- Backend Deployment
Once training is complete, start the Flask backend: "python back.py"
The backend loads the .pkl model and exposes a REST API (/predict) for real-time classification.
It automatically applies the same feature engineering used during training for full consistency.
- Frontend Interface
The web interface underfrontend/communicates with the Flask API.
Users can input parameters such as:
missionperiod_daysduration_hrsdepth_ppmradius_rearthst_radimpacttefflogg
After clicking “Predict,” the system returns:
- Predicted class (Confirmed / Candidate / False Positive)
- Confidence level (% probability)
The ML model uses a combination of astrophysical transformations and advanced algorithms to improve detection accuracy.
- Feature engineering:
depth_norm = depth_ppm / st_rad²depth_norm_x_logg = depth_norm × logg- Logarithmic and ratio-based transformations
- Outlier clipping and gravity filtering (
logg ≥ 3.8) - Model ensemble with LightGBM, XGBoost, and RandomForest
- Calibration using sigmoid scaling
- F1-based threshold tuning for CONFIRMED class
Languages & Frameworks
- Python 3.10
- LightGBM, XGBoost, Scikit-learn, Pandas, NumPy
- Flask (backend REST API), Flask-CORS
- HTML, CSS, JavaScript (frontend UI)
Open the frontend/model.html file in your browser to interact with the model through the API.
- Integrate time-series light curve data for temporal pattern detection
- Add Explainable AI visualization for astrophysical interpretation
- Deploy public version via Hugging Face Spaces or AWS Lambda
- Continuous retraining for newly published exoplanet data
Developed by Muhammed Eren Kendir, Yasin Boran Ekşi, Berke Gürbüz, Berat Kırış, Furkan Kılıç as part of the NASA Space Apps Challenge 2025.
LunariSpectraPortal demonstrates how artificial intelligence can accelerate the discovery of exoplanets and make astrophysical data more accessible.
This project is distributed under the MIT License.
You are free to use, modify, and share it with attribution.