* **Interaction Detection** Automatically detect and rank pairwise or higher-order feature interactions.
* **Model Support** Works seamlessly with LightGBM, XGBoost, CatBoost, scikit-learn, and perpetual.
* **Performance Optimized** Fast even on deep and wide ensembles via Cython-backed internals.
* **Visualizations** Includes a plotting module for interaction maps, importance heatmaps, feature influence charts, and more.

**Installation**

pip install treemind

**One-Dimensional Feature Explanation**

Each row in the table shows how the model behaves within a specific range of the selected feature.
The `value` column represents the average prediction in that interval, making it easier to identify which value ranges influence the model most.

| worst_texture_lb | worst_texture_ub | value | std | count |
|——————|——————|———–|———-|———|
| -inf | 18.460 | 3.185128 | 8.479232 | 402.24 |
| 18.460 | 19.300 | 3.160656 | 8.519873 | 402.39 |
| 19.300 | 19.415 | 3.119814 | 8.489262 | 401.85 |
| 19.415 | 20.225 | 3.101601 | 8.490439 | 402.55 |
| 20.225 | 20.360 | 2.772929 | 8.711773 | 433.16 |

**Feature Plot**

https://preview.redd.it/cbmyl38y7oef1.png?width=1189&format=png&auto=webp&s=5c7657a74bdebf5c51332ddc856f5de3d5583de9

#

**Two Dimensional Interaction Plot**

The plot shows how the model’s prediction varies across value combinations of two features. It highlights regions where their joint influence is strongest, revealing important interactions.

https://preview.redd.it/2zb1ra5h8oef1.png?width=943&format=png&auto=webp&s=6b1149795ce202f50f47f0264013eb225e09de2c

# Learn More

* Documentation: [https://treemind.readthedocs.io](https://treemind.readthedocs.io)
* Github: [https://github.com/sametcopur/treemind/](https://github.com/sametcopur/treemind/)
* Algorithm Details: [How It Works](https://treemind.readthedocs.io/en/latest/algorithm.html)
* Benchmarks: [Performance Evaluation](https://treemind.readthedocs.io/en/latest/experiments/experiment_main.html)

Feedback and contributions are welcome. If you’re working on model interpretability, we’d love to hear your thoughts.

Posted in