How selfexplainml/piml-toolbox works
Main Components
• Experiment Controller/Orchestrator – the part that initializes experiments, loads data, directs the flow from data preprocessing to modeling, explanation, diagnosis, and comparison.
• Data Management Layer – includes data loader, data summary, data preparation, data quality assessment, feature selection, and exploratory data analysis (EDA). This is usually invoked as a sequence within an “exp.data_loader()”, “exp.data_prepare()”, etc.
• Model Explanation and Interpretation Components – incorporate global and local interpretability tools (PFI, PDP, ALE, LIME, SHAP) to elucidate model behavior.
• Model Diagnostics & Comparison Module – includes mechanisms to measure accuracy, assess fairness, detect overfitting, and evaluate robustness, reliability, and resilience of the models.
• User Interface Layer – leveraging notebooks and a low-code interface coupled with a high-code API, plus an interactive dashboard for dynamic visualizations (evidenced by the variety of example notebooks and plot images in the docs).
Relationships and Data Flow
• The Data Management Layer passes clean, preprocessed data to the Model Training Module.
• Post training, the results flow into the Model Explanation/Interpretation and then into the Diagnostics/Comparison modules.
• The outputs of each stage (such as plots, summaries, diagnostic reports) are displayed in the user interface (often via notebooks or interactive visualizations), thereby completing the pipeline.
Architectural Patterns and Design Principles
• Pipeline Architecture: This project follows a pipeline structure where each stage (data handling, model training, interpretation, diagnosis) feeds into the next.
• Modular Design: Each major function (data handling, training, explanation, diagnostics) is separated into dedicated modules making the system extensible and scalable.
• Dual API Paradigm: With both low-code and high-code operating models, the design strategy supports different user levels.
Relevant Technologies and Artifacts
• Python as the core language.
• Jupyter Notebooks serving as both use case examples and interactive demonstration environments.
• Sphinx and related documentation generation (visible in the many docs/_build/ directories).
• Pip for installation and package management.
• Visualization packages (as indicated by the variety of plot images and interactive visualizations).
Elements
• Annotations that reference integration points with external libraries and documentation assets (e.g., “Sphinx Docs”, “Jupyter Notebooks”, “Colab” links).