Abstract: Website generator with HTML summaries for predictive models. This package uses 'DALEX' explainers to describe global model behavior. We can see how well models behave (tabs: Model Performance, Auditor), how much each variable contributes to predictions (tabs: Variable Response) and which variables are the most important for a given model (tabs: Variable Importance). We can also compare Concept Drift for pairs of models (tabs: Drifter). Additionally, data available on the website can be easily recreated in current R session. Work on this package was financially supported by the NCN Opus grant 2017/27/B/ST6/01307 at Warsaw University of Technology, Faculty of Mathematics and Information Science.
Introduction
modelDown is an R package that automates the creation of comprehensive, shareable HTML websites to document and explain predictive models. By leveraging the DALEX framework, it transforms complex model diagnostics into a clean, tabbed interface, making model transparency and auditing accessible to both technical teams and stakeholders.
As machine learning models become more complex, they often turn into "black boxes" where the logic behind a prediction is hidden. While the R ecosystem has excellent tools for Explainable AI (XAI)—most notably the DALEX package—communicating these insights is often a manual, fragmented process. Researchers and data scientists usually have to generate individual plots, save them, and manually compile them into reports. modelDown addresses this by providing an automated "one-click" solution to generate a standardized, static website that houses all relevant model explanations in one place.
The modelDown Framework
The package functions as an orchestrator that sits on top of the DALEX ecosystem. It takes "explainer" objects—a standardized format for models in R—and processes them through several specialized modules. The generation process is highly configurable, allowing users to define output locations and specific diagnostic modules.
Specialized Modules
- Model Performance & Auditor: These modules provide standard metrics (like RMSE or AUC) and deep-dives into residuals to identify where the model is failing.
- Variable Importance: Uses permutation-based methods to rank which features the model relies on most.
- Variable Response: Generates Partial Dependence Plots (PDP) and Accumulated Local Effects (ALE) to visualize how specific variables influence the predicted outcome.
- Drifter: A specialized module for detecting "Concept Drift" by comparing model behavior across two different datasets (e.g., training data vs. new production data).
Key Insights and Reproducibility
One of the most insightful features is the inclusion of the drifter module. In real-world machine learning, models often degrade over time as the underlying data changes. modelDown makes it trivial to visualize this "drift" by comparing two explainers side-by-side.
Furthermore, the package integrates with the archivist library. This means the data used to generate the plots on the website can be easily recreated in a live R session, bridging the gap between a static report and active research. Because it relies on DALEX explainers, modelDown is model-agnostic, supporting everything from Random Forests to simple GLMs.
Conclusion
The primary achievement of modelDown is the simplification of the XAI workflow. Instead of writing hundreds of lines of code to generate a full suite of diagnostics, a user can call a single function to generate a professional-grade website containing interactive tables and high-quality visualizations. While the static nature of the site means it cannot handle real-time user input, its ease of hosting and sharing makes it an invaluable tool for model auditing and stakeholder communication.
Summary updated