Skip to content

Output Structure

martanto edited this page Feb 23, 2026 · 12 revisions

Output Structure

All outputs are written under:

{output_dir}/{network}.{station}.{location}.{channel}/

For example, with network="VG", station="OJN", location="00", channel="EHZ":

output/VG.OJN.00.EHZ/

Full Directory Tree

output/
└── VG.OJN.00.EHZ/
    β”‚
    β”œβ”€β”€ tremor/
    β”‚   β”œβ”€β”€ daily/                            # Per-day CSV files (removed if cleanup_daily_dir=True)
    β”‚   β”œβ”€β”€ figures/                          # Daily tremor plots (created if plot_daily=True)
    β”‚   └── tremor_*.csv                      # Final merged tremor data
    β”‚
    β”œβ”€β”€ features/
    β”‚   β”œβ”€β”€ tremor_matrix_*.csv               # Aligned tremor matrix (all columns)
    β”‚   β”œβ”€β”€ tremor_matrix_per_method/         # Per-column tremor matrices (optional)
    β”‚   β”œβ”€β”€ all_extracted_features_*.csv      # tsfresh output per tremor column
    β”‚   └── label_features_*.csv             # Labels aligned with features
    β”‚
    β”œβ”€β”€ trainings/
    β”‚   β”‚
    β”‚   β”œβ”€β”€ model-with-evaluation/            # Output of train_and_evaluate()
    β”‚   β”‚   └── {classifier-slug}/            # e.g., random-forest-classifier
    β”‚   β”‚       └── {cv-slug}/                # e.g., stratified-shuffle-split
    β”‚   β”‚           β”œβ”€β”€ features/
    β”‚   β”‚           β”‚   β”œβ”€β”€ significant_features/     # Per-seed top-N features
    β”‚   β”‚           β”‚   β”‚   β”œβ”€β”€ 00000.csv
    β”‚   β”‚           β”‚   β”‚   └── ...
    β”‚   β”‚           β”‚   β”œβ”€β”€ all_features/             # All ranked features (optional)
    β”‚   β”‚           β”‚   β”‚   β”œβ”€β”€ 00000.csv
    β”‚   β”‚           β”‚   β”‚   └── ...
    β”‚   β”‚           β”‚   β”œβ”€β”€ figures/significant/      # Feature importance plots (optional)
    β”‚   β”‚           β”‚   β”‚   └── 00000.jpg
    β”‚   β”‚           β”‚   β”œβ”€β”€ tests/                    # Per-seed held-out test splits
    β”‚   β”‚           β”‚   β”‚   β”œβ”€β”€ 00000_X_test.csv
    β”‚   β”‚           β”‚   β”‚   β”œβ”€β”€ 00000_y_test.csv
    β”‚   β”‚           β”‚   β”‚   └── ...
    β”‚   β”‚           β”‚   β”œβ”€β”€ significant_features.csv  # Aggregated top features (all seeds)
    β”‚   β”‚           β”‚   └── top_{n}_significant_features.csv
    β”‚   β”‚           β”œβ”€β”€ models/
    β”‚   β”‚           β”‚   β”œβ”€β”€ 00000.pkl                 # Trained model β€” seed 0
    β”‚   β”‚           β”‚   β”œβ”€β”€ 00001.pkl
    β”‚   β”‚           β”‚   └── ...
    β”‚   β”‚           β”œβ”€β”€ metrics/
    β”‚   β”‚           β”‚   β”œβ”€β”€ 00000.json                # Per-seed metrics JSON
    β”‚   β”‚           β”‚   └── ...
    β”‚   β”‚           β”œβ”€β”€ figures/                      # Aggregate evaluation plots
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_roc_curve.png / .csv
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_pr_curve.png / .csv
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_calibration.png / .csv
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_prediction_distribution.png / .csv
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_confusion_matrix.png / .csv
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_threshold_analysis.png / .csv
    β”‚   β”‚           β”‚   β”œβ”€β”€ aggregate_feature_importance.png / .csv
    β”‚   β”‚           β”‚   └── aggregate_metrics.csv
    β”‚   β”‚           β”œβ”€β”€ trained_model_{suffix}.csv    # Registry of all trained models
    β”‚   β”‚           β”œβ”€β”€ all_metrics_{suffix}.csv      # All per-seed metrics
    β”‚   β”‚           └── metrics_summary_{suffix}.csv  # Mean Β± std summary
    β”‚   β”‚
    β”‚   └── model-only/                       # Output of train()
    β”‚       └── {classifier-slug}/
    β”‚           └── {cv-slug}/
    β”‚               β”œβ”€β”€ features/
    β”‚               β”‚   β”œβ”€β”€ significant_features/
    β”‚               β”‚   β”‚   β”œβ”€β”€ 00000.csv
    β”‚               β”‚   β”‚   └── ...
    β”‚               β”‚   β”œβ”€β”€ all_features/ (optional)
    β”‚               β”‚   β”œβ”€β”€ figures/significant/ (optional)
    β”‚               β”‚   β”œβ”€β”€ significant_features.csv
    β”‚               β”‚   └── top_{n}_significant_features.csv
    β”‚               β”œβ”€β”€ models/
    β”‚               β”‚   β”œβ”€β”€ 00000.pkl
    β”‚               β”‚   └── ...
    β”‚               └── trained_model_{suffix}.csv    # Registry used by ModelPredictor
    β”‚
    β”œβ”€β”€ forecast/
    β”‚   β”œβ”€β”€ predictions.csv                   # Forecast output (predict_proba)
    β”‚   └── figures/
    β”‚       └── eruption_forecast.png
    β”‚
    β”œβ”€β”€ config.yaml                           # Saved pipeline config (written by save_config())
    └── forecast_model.pkl                    # Serialised ForecastModel (written by save_model())

File Name Suffixes

Training output files follow this naming pattern:

{ClassifierName}-{CVName}_rs-{random_state}_ts-{total_seed}_top-{n}

Example:

XGBClassifier-StratifiedShuffleSplit_rs-0_ts-500_top-20

So the model registry is:

trained_model_XGBClassifier-StratifiedShuffleSplit_rs-0_ts-500_top-20.csv

Classifier and CV Slugs

Classifier key Folder slug
rf random-forest-classifier
xgb xgb-classifier
gb gradient-boosting-classifier
svm svm-classifier
lr logistic-regression-classifier
nn mlp-classifier
dt decision-tree-classifier
knn knn-classifier
nb gaussian-nb-classifier
voting voting-classifier
CV strategy key Folder slug
shuffle stratified-shuffle-split
stratified stratified-k-fold
timeseries time-series-split

ModelPredictor Output

Evaluation mode (predict() / predict_best())

{output_dir}/
β”œβ”€β”€ metrics/
β”‚   β”œβ”€β”€ all_metrics.csv
β”‚   └── metrics_summary.csv
└── seed_00000/                 # Only created when plot=True
    β”œβ”€β”€ seed_00000_confusion_matrix.png
    β”œβ”€β”€ seed_00000_roc_curve.png
    β”œβ”€β”€ seed_00000_pr_curve.png
    β”œβ”€β”€ seed_00000_threshold_analysis.png
    β”œβ”€β”€ seed_00000_feature_importance.png
    β”œβ”€β”€ seed_00000_calibration.png
    └── seed_00000_prediction_distribution.png

Forecast mode (predict_proba())

{output_dir}/
β”œβ”€β”€ predictions.csv             # eruption_probability, uncertainty, confidence, prediction
└── figures/
    └── eruption_forecast.png

Clone this wiki locally