Skip to main content

Convolutional Neural Network (CNN)

The CNN finds patterns in a star’s brightness over time (the light curve) to decide if there’s likely a planet or not.

What it does​

  • Looks for small, repeated dips in brightness that could be a planet passing in front of a star
  • Outputs one of two labels: CANDIDATE or FALSE POSITIVE, with a confidence score

When to use it​

  • You have time-series light curve data (one brightness value per time step)
  • You want a fast, end-to-end model that learns directly from the signal

Data needed​

  • CSV per star with a pdcsap_flux (preferred) or flux column
  • Each series is standardized to length 3000 (we pad or trim)

Preprocessing steps (automatic):

  1. Remove missing values
  2. Remove outliers (3-sigma rule)
  3. Normalize to zero mean, unit variance
  4. Reshape to (3000, 1)

How the model works (simple)​

  1. A small 1D convolution scans the light curve to detect transit-like shapes
  2. Max pooling reduces noise and focuses on important parts
  3. Dense layers combine the detected features to make a final decision

Model architecture (at a glance)​

  • Conv1D (10 filters, small kernel) → MaxPool → Dropout (20%)
  • Dense(32, ReLU) → Dropout (40%)
  • Dense(18, ReLU)
  • Output: 1 neuron with Sigmoid (probability of candidate)

Training setup:

  • Optimizer: Adam | Loss: Binary cross-entropy | Batch: 64 | Epochs: ~30
  • Early stopping + learning-rate decay to avoid overfitting

Imbalance handling (SMOTE):

  • We oversample the rare class (CANDIDATE) and lightly undersample the common class to balance training

What you’ll see (example outputs)​

CNN confusion matrix

Training history

ROC curves

Sample light curves

Model metadata

Classification report

Try it (concept)​

  • Predict one star: python lightkurve_predictor.py 10904857
  • List test IDs: python lightkurve_predictor.py 0 --list-ids
  • Point to custom files: use --model / --data-path / --metadata flags

Tips & limitations​

  • Keep the series length at 3000 for best results
  • Predictions are fast (less than 1s) on modern machines
  • Works best when light curves are clean; heavy noise may require extra filtering