A python package to train Machine Learning models on Kepler Datasets with customizable hyperparameters to detect exoplanet
Project description
ExoBengal
Standardized tools for ML-based exoplanet candidate classification on NASA data, plus a companion docs website.
This repo contains:
- Python package
exobengal:DetectExoplanetfor training/inference (RandomForest, CNN, kNN)ExoParamsconvenience container for feature inputs
- Pretrained model artifacts in
models/ - Example dataset(s) in
data/ - Next.js docs site in
website/
Full documentation is in docs/:
- Installation and requirements:
docs/installation.md - API reference:
docs/api.md - Data reference and preprocessing:
docs/data.md - Models and artifacts:
docs/models.md - Notebook walkthrough:
docs/notebook.md
Quick Start
Install the package from PyPI (or your local environment):
pip install exobengal
Make a prediction with the bundled RandomForest model:
from exobengal.exobengal import DetectExoplanet
detector = DetectExoplanet()
sample = [365.0, 1.0, 288.0, 1.0, 4.44, 5778, 0.1, 5.0, 100.0]
print(detector.random_forest(sample))
Project Structure
exobengal/ # Python package
exobengal.py # DetectExoplanet class and helpers
models/ # Trained models (.pkl, .h5, scaler)
data/ # Dataset CSVs
website/ # Next.js static website + docs
Python API (quick view)
Constructor:
DetectExoplanet(
rf_model_path="models/random_forest_classifier.pkl",
cnn_model_path="models/cnn_model.h5",
knn_model_path="models/knn_model.pkl",
scaler_path="models/scaler.pkl",
imputer_path="models/imputer.pkl",
)
Training:
detector.train_random_forest(data_path="data/cumulative_2025.09.20_12.15.37.csv")
detector.train_cnn(data_path="data/cumulative_2025.09.20_12.15.37.csv")
detector.train_knn(data_path="data/cumulative_2025.09.20_12.15.37.csv")
Inference (all return the same schema):
from exobengal.exobengal import ExoParams
sample = [koi_period, koi_prad, koi_teq, koi_srad, koi_slogg, koi_steff, koi_impact, koi_duration, koi_depth]
detector.random_forest(sample)
detector.cnn(sample)
detector.knn(sample)
# Or use ExoParams for clarity
params = ExoParams(period=365.0, prad=1.0, teq=288.0, srad=1.0, slog_g=4.44, steff=5778, impact=0.1, duration=5.0, depth=100.0)
detector.random_forest(params)
Utility:
detector.calculate_esi(koi_prad=1.05, koi_teq=290)
For full API and feature details, see docs/api.md.
Models
Artifacts live in models/. See docs/models.md for details and retraining notes.
Requirements
Python 3.8+. See docs/installation.md or requirements.txt.
Website
The Next.js site (in website/) includes a docs experience. See its README.md for running locally.
Development
Website (Node 20):
cd website
npm ci
npm run dev
Static export is enabled via output: 'export' and deployed to GitHub Pages with Actions.
License
MIT License – see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exobengal-1.1.1.tar.gz.
File metadata
- Download URL: exobengal-1.1.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46c03f27191a4ff84915463ff6e8eda0809cfd6aebfbba667830bc5f05ca00e2
|
|
| MD5 |
4833bbdfa8d1a640712cf89599717110
|
|
| BLAKE2b-256 |
f091588ceb5c1cdac0e7caa99f53a5948fb35b53e86886babdda61c035ca085a
|
File details
Details for the file exobengal-1.1.1-py3-none-any.whl.
File metadata
- Download URL: exobengal-1.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
618a31f4db6a55640508dcf21ae5c123b8acda86f0881fb60fc8973d8259b005
|
|
| MD5 |
a8c7d9da9f4ae107b2c481cadedd09bf
|
|
| BLAKE2b-256 |
1763c3e733738940807016b07d7a3ce7912b36eac41bdcf554b4b077c835f75b
|