Astrophage

Astrophage Exoplanet Classification Engine

Astrophage is a wildly fast exoplanet classification engine I wrote in Rust. It leans heavily on Polars and a custom Two-Stage Random Forest setup to categorize Kepler Objects of Interest (KOIs) as either Confirmed, Candidate, or False Positive.

Check out the project on GitHub | Read the documentation

Why “Two-Stage”?

NASA doesn’t just dump all their data into a single bucket to guess exoplanet statuses, so our model shouldn’t either. Instead of forcing one massive Random Forest to learn three separate classes at once, I broke the architecture down into two clean binary decisions:

  1. Stage 1: Is it CONFIRMED or NOT CONFIRMED?
  2. Stage 2: If it’s not confirmed, is it a CANDIDATE or a FALSE POSITIVE?

This might sound like extra work, but it actually boosts overall accuracy by about 3-4%. The model learns much cleaner decision boundaries when it only has to pick between two things at a time. The end result? We hit 94.81% accuracy.

The Hard Numbers

MetricScore
Accuracy94.81%
Macro F192.64%
Weighted F194.51%

Under the Hood

I wanted this thing to scream, so I built it on a heavily optimized stack:

  • Rust: Because I wanted memory safety without the GC overhead, plus SIMD optimizations essentially for free.
  • Polars: The absolute king of dataframes right now. It chews through CSV I/O and columnar operations instantly.
  • NDArray: My go-to for vectorized math and handling the N-Dimensional arrays.
  • Tokio: Running the async runtime to keep everything non-blocking.