DOI: 10.5281/zenodo.15894594
title: A Machine-Learning Approach for Identifying CME-Associated Stellar Flares in TESS Observations

description: This repository contains datasets, trained models, and code for the analysis and prediction of solar and stellar flare events, with a particular emphasis on coronal mass ejection (CME) prediction for main-sequence stars of spectral types F, G, K, and M.

The materials are provided in three compressed archives:

1. solar.zip — Solar flare

dataset/ — Contains two subdirectories: train/ and test/.Each subdirectory includes five CSV files corresponding to five independent random splits of the same dataset, generated using different random seeds. These files serve as the training and testing sets for model development (feature definitions are provided in our paper).

model/ — Five trained Random Forest sub-models, each corresponding to one random split of the dataset.

train_results/ — Evaluation results for six models (five machine-learning models plus one baseline), each trained and tested on the five random splits.

catalog.csv — GOES 1–8 Å soft X-ray solar flare sample containing 1,776 events.Columns:





No. — Event serial number.




Start_Time(UT), Peak_Time(UT), End_Time(UT) — Event start, peak, and end times in UTC.




Class_Type — GOES flare class.




CME_Association — 1 = eruptive flare (associated with CME), 0 = confined flare (no CME).



2. stellar.zip — Stellar flare

flare_split/ — Four CSV files listing flare events by stellar spectral type (F, G, K, M), including flare energy, predicted CME association, and related parameters.

catalog.csv —After quality selection, the final TESS 2-minute cadence white-light stellar flare sample contains 41,405 events.Columns:





No. — Eventserial number.




Star_Name — Host star identifier.




Start_Time, End_Time — Flare start and end times (BJD_TDB − 2,457,000; days).




ED — Equivalent duration (s).




Amplitude — Maximum relative flux increase.




Duration(Day) — Flare duration (days).




Energy — Bolometric energy (erg).




CME_Association — 1 = with CME, 0 = without CME.



features.csv — Machine-learning features extracted using the same methodology as for solar flares.

flares_energy.csv — Bolometric energy calculations for individual flares.Columns:





tic — TESS Input Catalog ID.




sector — TESS observation sector.




index — Flare index within the sector.




Energy — Bolometric energy (erg).



stellar_params_with_type.csv — Stellar parameters from Gaia and other catalogs.Columns:





tic — TESS Input Catalog ID.




Tmag — TESS magnitude.




ra, dec — Right ascension and declination (deg).




pmRA — Proper motion in RA (mas/yr).




e_pmRA — Uncertainty in pmRA (mas/yr).




plx — Parallax (mas).




e_plx — Uncertainty in plx (mas).




Teff — Effective temperature (K).




e_Teff — Uncertainty in Teff (K).




rad — Stellar radius (solar radii).




e_rad — Uncertainty in rad (solar radii).




logg — Surface gravity (log10 cm/s²).




e_logg — Uncertainty in logg.




d — Distance (pc).




e_d — Uncertainty in d (pc).




e_gaiabp, e_gaiarp — Uncertainties in Gaia BP and RP magnitudes.




gaiarp, gaiabp — Gaia RP and BP magnitudes.




e_GAIAmag — Uncertainty in Gaia G magnitude.




GAIAmag — Gaia G magnitude.




color — Gaia BP–RP color index (mag).




abs_mag — Absolute magnitude.




spec_type — Stellar spectral type.



3. code.zip — Prediction script

predict.py — Loads the five trained sub-models and applies both soft-voting and hard-voting ensemble methods to the stellar flare prediction dataset.Note: Update file paths in the script before execution.