How danielbgoncalves/percolation_based_rp_for_xai works
This repository implements a histopathology classification and interpretability pipeline: images yield fractal percolation descriptors and recurrence-plot representations, which are classified by CNN branches and examined through XAI. The graph distinguishes documented stages and the sampled runtime calls. CSV descriptors and experiment-result directories are described in the README but absent from the supplied tree, so they are represented only as documented external data/results. Several analysis modules are included because they are major documented capabilities; unsampled wiring is not asserted.
Main entry points: run_analise_completa.py XAI orchestration · ScriptPercLACDF3Distances.py Feature scripts · loader.py Branch loader · train.py K-fold training
Components 29
Fractal features
- Percolation metrics
extract_fractal_features/clustperc.py - Distance variants
extract_fractal_features/clustpercEucl.py - PMR distances
extract_fractal_features/pmr.py - Lacunarity
extract_fractal_features/lacunaridade.py - Feature scripts
extract_fractal_features/ScriptPercLACDF3Distances.py - Descriptor CSVs
RP representations
- RP generation
representations/create_representations.py - RP encoding
representations/RP.py - Recurrence plots
CNN classification
- Image datasets
model/dataset.py - Input transforms
model/utils.py - CNN architectures
model/model.py - K-fold training
model/train.py - Model runner
model/run.py - Evaluation metrics
model/metrics.py - Model weights
- Predictions
XAI analysis
- XAI orchestration
xai/run_analise_completa.py - Branch loader
xai/loader.py - Attribution maps
xai/attributions.py - Case selection
xai/case_selection.py - Descriptor mapping
xai/recplot_mapping.py - Sanity checks
xai/sanity_check.py - Seed aggregation
xai/seed_aggregation.py - Threshold analysis
xai/threshold_analysis.py - Experiment comparisons
xai/comparacao_datasets.py - XAI metrics
xai/xai_metrics.py - XAI results
Other components
- Medical images
Connections 37
- Medical images → Feature scripts: analyzes images
README.md - Feature scripts → Percolation metrics: calls metrics
extract_fractal_features/ScriptPercLACDF3Distances.py - Feature scripts → Distance variants: calls variants
extract_fractal_features/ScriptPercLACDF3Distances.py - Feature scripts → PMR distances: calls metrics
extract_fractal_features/ScriptPercLACDF3Distances.py - Feature scripts → Lacunarity: calls calculation
extract_fractal_features/ScriptPercLACDF3Distances.py - Feature scripts → Descriptor CSVs: writes descriptors
- Descriptor CSVs → RP generation: supplies vectors
README.md - RP generation → RP encoding: uses encoding
representations/create_representations.py - RP generation → Recurrence plots: generates plots
README.md - Recurrence plots → Image datasets: loads images
- Image datasets → Input transforms: applies transforms
- Model runner → K-fold training: runs training
model/run.py - Model runner → Image datasets: loads samples
model/run.py - K-fold training → Image datasets: builds batches
model/train.py - K-fold training → CNN architectures: creates model
model/train.py - K-fold training → Model weights: saves weights
- Model runner → Evaluation metrics: computes metrics
model/run.py - Evaluation metrics → Predictions: records predictions
- XAI orchestration → Branch loader: loads branches
xai/run_analise_completa.py - Branch loader → CNN architectures: loads architecture
xai/loader.py - Branch loader → Model weights: loads weights
xai/loader.py - XAI orchestration → Case selection: selects cases
xai/run_analise_completa.py - XAI orchestration → Threshold analysis: analyzes thresholds
xai/run_analise_completa.py - XAI orchestration → Seed aggregation: aggregates seeds
xai/run_analise_completa.py - XAI orchestration → Experiment comparisons: compares datasets
xai/run_analise_completa.py - XAI orchestration → Sanity checks: runs checks
xai/run_analise_completa.py - XAI orchestration → XAI metrics: exports metrics
xai/run_analise_completa.py - Threshold analysis → Case selection: selects examples
xai/threshold_analysis.py - Threshold analysis → Branch loader: loads models
xai/threshold_analysis.py - Threshold analysis → Attribution maps: generates maps
xai/threshold_analysis.py - Seed aggregation → Branch loader: loads models
xai/seed_aggregation.py - Seed aggregation → Attribution maps: generates maps
xai/seed_aggregation.py - Sanity checks → Branch loader: loads models
xai/sanity_check.py - Sanity checks → Attribution maps: tests maps
xai/sanity_check.py - Experiment comparisons → Descriptor mapping: uses mapping
xai/comparacao_datasets.py - Experiment comparisons → Seed aggregation: aggregates seeds
xai/comparacao_datasets.py - XAI orchestration → XAI results: writes analyses
README.md