Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LauraSilRu/exoplanet-profiler/llms.txt

Use this file to discover all available pages before exploring further.

Each ExoProfiler notebook exposes a small set of configuration constants at the top of the file. These control data paths, feature selection, preprocessing parameters, and clustering behavior. Modifying these values changes the pipeline’s behavior globally within a notebook run.

Notebook 03 — Preprocessing Parameters

The following constants govern how raw TESS data is transformed into the clean feature matrix consumed by PCA.
ParameterDefaultDescription
FEATURE_COLUMNSlist of 12Canonical feature order for all downstream artifacts
MIN_PRESENT_FEATURES8Minimum features observed per planet to be retained
LOG1P_FEATURESlist of 6Variables to transform with log1p
N_NEIGHBORS5KNNImputer neighbors
KNN_WEIGHTS'distance'KNNImputer weighting scheme
SCALER'robust'Scaler type (RobustScaler)
INPUT_PATHdata/raw/exoplanets.csvRaw input data path
OUTPUT_PATHdata/processed/exoplanets_preprocessed.csvPreprocessed output path
The FEATURE_COLUMNS list defines the canonical order that all downstream artifacts — the pipeline joblib, PCA scores, and cluster assignments — must respect:
FEATURE_COLUMNS = [
    'pl_orbper',
    'pl_orbsmax',
    'pl_rade',
    'pl_bmasse',
    'pl_orbeccen',
    'pl_insol',
    'pl_eqt',
    'st_teff',
    'st_rad',
    'st_mass',
    'st_met',
    'st_logg',
]
The LOG1P_FEATURES subset identifies the six positively skewed variables that receive a log1p(x) transformation before scaling:
LOG1P_FEATURES = [
    'pl_orbper',
    'pl_orbsmax',
    'pl_rade',
    'pl_bmasse',
    'pl_insol',
    'st_rad',
]
pl_orbeccen is excluded from log transformation because it is bounded between 0 and 1. st_logg is excluded because it already represents a logarithmic magnitude.

Notebook 04 — PCA Parameters

These constants control the PCA dimensionality reduction step. Most defaults should only be changed when intentionally exploring alternative pipeline configurations.
ParameterDefaultDescription
USE_DEMO_DATAFalseUse synthetic demo data instead of real preprocessed data
PROCESSED_DATA_PATHdata/processed/exoplanets_preprocessed.csvInput path
DATA_ALREADY_SCALEDTrueSkip re-scaling (data was already scaled in notebook 03)
VARIANCE_THRESHOLD0.85Minimum cumulative variance to retain
RANDOM_STATE42Reproducibility seed for PCA
USE_DEMO_DATA = False
PROCESSED_DATA_PATH = Path('data/processed/exoplanets_preprocessed.csv')
DATA_ALREADY_SCALED = True
VARIANCE_THRESHOLD = 0.85
Never set DATA_ALREADY_SCALED = False unless re-running from scratch without notebook 03’s output. Double-scaling will apply RobustScaler a second time to already-scaled data, distorting PCA loadings and making results incomparable to the published artifacts.

Notebook 05 — Clustering Parameters

These constants define the K-Means sweep range, the selected cluster count, and the paths used to read PCA scores and write the final labeled dataset.
ParameterDefaultDescription
K_RANGErange(2, 11)K values to evaluate in the sweep
SELECTED_K2Final K-Means cluster count
RANDOM_STATE42Primary random seed
STABILITY_SEEDS[10, 100, 2026, 9999]Seeds for stability validation
PCA_SCORES_PATHdata/processed/pca/pca_scores.csvInput: PCA component scores
OUTPUT_PATHdata/processed/clustered_exoplanets.csvFinal labeled output
SELECTED_K = 2 is the value that produced the highest Silhouette coefficient (0.4950) across the full sweep from K=2 to K=10. The stability validation confirmed 99.04%–100.00% assignment consistency across the four STABILITY_SEEDS.

Changing the Variance Threshold

If you lower VARIANCE_THRESHOLD to 0.75, the pipeline will select 3 components, which capture 83.62% of total variance. This will change the K-Means input matrix from shape (731, 4) to (731, 3) and may alter cluster assignments. After any threshold change, re-run notebooks 04 and 05 sequentially to regenerate consistent artifacts.
The relationship between threshold and component count for the current 731-planet dataset is:
ThresholdComponents SelectedCumulative Variance
0.75383.62%
0.85490.35% (default)
0.90490.35%
Note that both the 0.85 and 0.90 thresholds resolve to the same 4-component solution, because PC4 pushes cumulative variance to 90.35% in a single step past both thresholds.

Reproducibility

Setting random_state=42 throughout ensures deterministic results across all pipeline stages. The stability analysis in notebook 05 confirmed that K=2 assignments are 99%–100% consistent across four stability seeds (10, 100, 2026, 9999), so the choice of seed has negligible impact on cluster composition.

Build docs developers (and LLMs) love