SkillAgentSearch skills...

Trust Free

An interpretable regression model in Python with Random-Forest-level accuracy

Install / Use

npx skills add adc-trust-ai/trust-free

Installs into whichever agent you are using.

README

trust-free <a href="https://adc-trust-ai.github.io/trust"><img src="assets/TRUST_FREE_new_logo_500x500.png" align="right" height="256" alt="TRUST logo"/></a>

PyPI version Python Downloads License User Manual OS OS OS Kaggle Compatible Colab Compatible

Model. Explain. TRUST. All in one package.

trust-free is a Python package for fitting interpretable regression models using Transparent, Robust, and Ultra-Sparse Trees (TRUST™) — a new generation of Linear Model Trees (LMTs) with Random-Forest accuracy and intuitive explanations. It is based on my peer-reviewed paper [1], presented at the 22nd Pacific Rim International Conference on Artificial Intelligence (PRICAI 2025) and to appear in Springer Nature (Lecture Notes in Artificial Intelligence).

It includes a state-of-the-art explainability suite, providing comprehensive, automatically-generated explanation reports. To see it in action, here's a 30-second demo showcasing the explain() and compare() methods applied to the famous Medical Insurance Charges dataset from Kaggle:

<img src="https://raw.githubusercontent.com/adc-trust-ai/trust-free/main/assets/trust-free_explain_compare_wm.gif" alt="ExplainCompareGif" width="100%" style="display: block; margin: auto;" />

Streamlit App

Open In Colab

Proven Performance: Accuracy + Full Interpretability (60 Datasets)

| Model | Test R² ↑ | Interpretable? | |-------------------------|---------------|--------------------| | TRUST™ | 0.67 | ✅ Yes | | Random Forest (RF) | 0.62 | ❌ No | | Lasso | 0.57 | ✅ Yes | | CART | 0.49 | ✅ Yes | | Node Harvest (NH) | 0.47 | ✅ Yes | | M5' (Linear Model Tree) | 0.36 | ⚠️ Partially |

In the table above, TRUST™ is the only fully interpretable model statistically above 0.6 test R² across varied benchmark datasets — and 6× sparser than M5' (17 vs 109 coefficients on average).
Source: PRICAI 2025 (Springer LNAI)

Try it now: pip install trust-free. In Google Colab: %pip install trust-free. See full benchmarks in the PRICAI 2025 paper


The package currently supports standard regression and experimental time-series regression tasks. Future releases will also tackle other tasks such as classification.

Overview

TRUST™ [1] is a next-generation algorithm based on (sparse) Linear Model Trees (LMTs), which I developed as part of my Ph.D. in Statistics at the University of Wisconsin-Madison. trust-free is the official Python implementation of the algorithm.

LMTs combine the strengths of two popular interpretable machine learning models: Decision Trees (non-parametric) and Linear Models (parametric). Like a standard Decision Tree, they partition data based on simple decision rules. However, the key difference lies in how they evaluate these splits and model the data. Instead of using a simple constant (like the average) to evaluate the goodness of a split, LMTs fit a Linear Model to the data within each node.

This approach means that the final predictions in the leaves are made by a Linear Model rather than a simple constant approximation. This gives Linear Model Trees both the predictive and explicative power of a linear model, while also retaining the ability of a tree-based algorithm to handle complex, non-linear relationships in the data. This way, LMTs can approximate well any Lp function in Lp norm, i.e. can learn almost any function. Importantly, the resulting fitted model is usually compact, making it easier to interpret.

Compared to existing LMT algorithms such as M5 [2], TRUST™ offers unmatched interpretability while approaching the accuracy of black-box models like Random Forests [3] — a combination that is rare in machine learning.

References

[1] Dorador, A. (2025). TRUST: Transparent, Robust and Ultra-Sparse Trees. arXiv:2506.15791.

[2] Quinlan, J.R. (1992). Learning with Continuous Classes. Australian Joint Conference on AI, 343–348.

[3] Breiman, L. (2001). Random Forests. Machine Learning, 45(1), 5–32.

Recognition

Key Advantages: RF Accuracy ⟡ Tree Transparency ⟡ Linear Interpretability

  • Hybrid power: Trees to capture non-linearity & interactions + sparse linear models (Adaptive or Relaxed Elastic Net) in leaves
  • Superior accuracy: RF-level accuracy, proven on 60 benchmark datasets
  • Full transparency: Every prediction is auditable via tree path + leaf equation
  • Inclusive: Explanation reports written in natural language accessible to all audiences
  • Compliant by design: 100% Compliant with the EU AI Act and the OECD AI Principles — ideal for high-stakes domains like finance and healthcare

About this edition

  • ℹ️ Free-tier Dataset Limits: ≤ 5,000 rows and ≤ 20 columns (intended for proof-of-concept, R&D and teaching)
  • ✅ Full Functionality: All core features are fully functional within these bounds
  • ✅ Standalone Tools: Relaxed Net (Renet™), Adaptive Net (AdaEnet™), TurboSolve™ (fast OLS/ridge solver), Direct & Systemic Feature Importance
  • ⭐ No-Limit Utilities: TurboSolve™, Feature Importance methods, and our open-source Synthetic Dataset Generators (Toeplitz, Block-Correlated) can be used without restriction as standalone tools
  • 🚀 Need even more? We got you covered: Unlimited scale and additional features in the forthcoming trust-pro edition

Want early access to trust-pro?

  • Join the waitlist (completely anonymous & GDPR-compliant)
  • Star ⭐ this repo to stay updated!

Features in this edition

  • Solves classification and regression tasks (including a currently experimental 'time series mode')
  • Interpretable models with accuracy comparable to Random Forests
  • Visual tree structure and comprehensive, automatically-generated explanations on demand
  • Automatically-generated head-to-head comparisons of profiles of interest
  • Multiple variable importance methods (SOTA Permutation, Ghost Variables, ALE plots, SHAP values)
  • Automatic missing value handling that learns from missingness itself
  • Automatic detection of potential overfitting.
  • Ability to efficiently use continuous and categorical predictor variables
  • Prediction confidence intervals [planned]
  • Novel method to warn about risky predictions on the fly [planned]
  • Even faster training [planned]

What's new in this version?

TL;DR: AdaLogit is now fully scikit-learn compatible

Check CHANGELOG.md to see all past release notes.

All of our tools are grounded in science. Besides the core TRUST architecture (PRICAI 2025),

  • Renet™ (and our Adaptive Net implementation): https://arxiv.org/abs/2602.11107
  • Direct and Systemic Variable Importance: https://arxiv.org/abs/2512.13892
  • TurboSolve™: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5811842, https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5884203

More on TurboSolve™, a smart OLS solver that is always at least as fast as your favorite OLS solver but usually 2x to 10x faster: TurboSolve™ serves as the high-performance engine for the TRUST algorithm in trust-free. Additionally, it is available as a standalone, free utility for OLS problems of any scale, without any constraints on dataset size.

🚀 Performance Benchmarks: TurboSolve™ vs. Scikit-Learn

The following benchmarks compare TurboSolve™ against sklearn.linear_model.LinearRegression. Tests were conducted across 100 repetitions with a range of dataset geometries.

<div align="center"> <img src="https://raw.githubuserc

Related Skills

View on GitHub
GitHub Stars15
CategoryFinance
Updated15d ago
Forks0

Languages

Jupyter Notebook

Security Score

80/100

Audited on Jul 24, 2026

No findings