exoplanet_classifier
An ML model with proper web interface which can predict exoplanets with given transit data
1.3K
This project was originally crafted in GitHub. To check out the GitHub repo, click hereβ
Welcome to my enhanced fork of The Exoplanet Classifier. Originally developed with my teammates from Ontohin 4b for the NASA Space Apps Challenge 2025, this project now represents the upgraded and research-extended version of that submission.
The original repository remains archived under Ontohin 4b and licensed as such. This fork exists purely for further research, experimentation, and personal development to make the classifier far more powerful and accurate than the hackathon version.
A robust, data-driven Machine Learning tool that classifies whether a given set of transit data corresponds to a confirmed exoplanet, false positive, or candidate.
This version blends the strengths of ensemble learning with extensive preprocessing, imputation, and class balancing, resulting in a more stable and generalizable model.
NASAβs exoplanet survey missions (Kepler, K2, and others) have generated thousands of data points using the transit method β tracking dips in starlight caused by orbiting planets.
These datasets contain both confirmed exoplanets and false positives, and the aim of this project is to build an AI classifier capable of making preliminary predictions on new candidates.
The classifier runs inside a Flask-powered web interface, allowing anyone β from students to researchers β to enter transit parameters and instantly receive a prediction.
The goal is to provide a scientifically meaningful, intuitive, and educational experience for users interested in exoplanet research.
Landing Page
Input Fields
Input Fields when filled
Output
About Page

research.ipynb) to experiment with different model architectures, hyperparameters, and feature engineering before finalizing fit.py.git clone https://github.com/ByteBard58/Exoplanet_Classifier
cd "Exoplanet_Classifier"
pip install -r requirements.txt
python app.py
Open your browser and go to http://127.0.0.1:5000 to access the web interface.
If you want to close the server, press Ctrl + C in the terminal where you have run app.py from.
Press Get Started on the webpage.
Enter the candidate features in the input fields (values like Orbital Period, Transit Epoch, Transit Depth, etc.).
Click Predict to run the prediction.
For more detailed information about each input and other subjects, press LEARN MORE (located at the top).
EXOPLANET_CLASSIFIER/
βββ .github/ # Folder for GitHub actions
β
βββ data/
β βββ k2_data.csv
β βββ kepler_data.csv
β βββ source.txt
β
βββ models/
β βββ column_names.pkl # Not included in the repo
β βββ info.txt
β βββ pipe.pkl # Not included in the repo
β
βββ screenshots/
β
βββ static/
β βββ materials/
β βββ script.js
β
βββ templates/
β βββ about.html
β βββ index.html
β
βββ .gitignore
βββ app.py
βββ fit.py
βββ LICENSE
βββ README.md
βββ requirements.txt
βββ research.ipynb
The upgraded classifier uses a stacking ensemble combining multiple base models with a meta-classifier:
RandomForestClassifier
n_estimators=1000max_depth=Noneclass_weight="balanced"XGBClassifier
n_estimators=1000max_depth=Nonelearning_rate=0.5LogisticRegression
solver="saga"penalty="l2"C=0.1class_weight="balanced"max_iter=5000The stacking classifier uses 5-fold cross-validation internally and passes original features to the meta-classifier for better learning.
Before feeding data into the model, the following preprocessing steps are applied via a Pipeline:
SimpleImputer(strategy="mean") to handle missing values.StandardScaler to normalize features.SMOTE (Synthetic Minority Oversampling Technique) to address class imbalance.The model uses 13 transit and orbital-related features, including:
Targets are mapped as follows:
0 β FALSE POSITIVE or REFUTED1 β CANDIDATE2 β CONFIRMEDfit.py.models/pipe.pkl and column order as models/column_names.pkl.The model was evaluated on a held-out test set (1/3 of the data, stratified by class).
Here is the classification report:
| Class | Precision | Recall | F1-score | Support |
|---|---|---|---|---|
| 0 (FALSE POSITIVE / REFUTED) | 0.82 | 0.81 | 0.82 | 1718 |
| 1 (CANDIDATE) | 0.56 | 0.55 | 0.56 | 1118 |
| 2 (CONFIRMED) | 0.79 | 0.81 | 0.80 | 1687 |
Overall Metrics:
This demonstrates that the upgraded stacking classifier maintains strong performance on confirmed and false positive classes, with room for improvement on candidate predictions.
The model balances accuracy, generalization, and class fairness, making it reliable for preliminary exoplanet classification tasks.
NASA Kepler and K2 Mission for providing the training datasets
Scikit-learn, XGBoost, and Imbalanced-learn teams for exceptional libraries
Inspiration from data science projects exploring real-world astrophysics datasets
The scientists who are engaged with exoplanet research. Their problem inspired us to create this project from the ground up
Ontohin 4b team for the original NASA SAC 2025 version of this project
Thank you for checking out this upgraded version of The Exoplanet Classifier. This repository is a personal continuation of a NASA Space Apps Challenge project β rebuilt with the intent to learn, improve, and explore the depths of real-world astrophysics through Machine Learning.
Have a great day !
Content type
Image
Digest
sha256:c50de8713β¦
Size
1.2 GB
Last updated
3 months ago
docker pull bytebard101/exoplanet_classifier