Skip to main content

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:
    • DetectExoplanet for training/inference (RandomForest, CNN, kNN)
    • ExoParams convenience 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

exobengal-1.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exobengal-1.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file exobengal-1.1.2.tar.gz.

File metadata

  • Download URL: exobengal-1.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for exobengal-1.1.2.tar.gz
Algorithm Hash digest
SHA256 4b1bf639fab0419e46fbb1c454c0a55291a846fba798e3fd29bb8615f964d8bd
MD5 47022a936ba029576906d6005aa02002
BLAKE2b-256 4d69ce696bb561724d8b34188c17d1f1b981ec2fc77506fb85d3a16c8ee2ffdd

See more details on using hashes here.

File details

Details for the file exobengal-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: exobengal-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for exobengal-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 166c883d1f83014dfc06a6766eefa1646578ce4aa35380b81cbaf20ee13ba43d
MD5 d9a262569c57f94665bf72ced6643612
BLAKE2b-256 ff0dbc7e753d9a5dc7a340cbd8f0f14af2e70e2701acf1fe6f7a511e93bf274f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page