Examples

Copy-pasteable snippets using the ExoBengal package.

Predict with pretrained RandomForest

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))

Train and save kNN

from exobengal.exobengal import DetectExoplanet

detector = DetectExoplanet()
detector.train_knn(data_path="data/cumulative_2025.09.20_12.15.37.csv")

Compute ESI

from exobengal.exobengal import DetectExoplanet

detector = DetectExoplanet()
print(detector.calculate_esi(1.05, 290))
Interstellar
Background Music
30%