IMoTE: Interactive Model Tree Explorer
IMoTE is an interactive application to fit, visualise and explore linear model trees for regression on tabular data. It shows a fitted tree as an interactive graph, lets you look at the linear model and the data behind every node, and traces a single data point through the tree to explain its prediction.
Why IMoTE?
A linear model tree combines the rule based structure of a decision tree with linear models in its leaves. That usually makes it more accurate than a classic regression tree of the same depth. In practice, these trees are often hard to read from code or a text dump. IMoTE makes them easy to explore, explain and present.
Features
Fit or load a tree
- Fit PILOT [1], M5 [2] or decision trees on datasets you search and download from PMLB or the UCI repository, or on your own file (CSV, Excel, Parquet, ARFF, JSON, ...), for regression or classification.
- Save the tree you are looking as an SVG image or to load it again later.
- Load trees fitted with other tools through an adapter. An adapter for trees from the R package partykit is included as an example.
Edit and explore the tree
- Pan, zoom and click through the tree as an interactive graph.
- Collapse and expand branches, collapse the whole tree to a given level, show a single branch as a subtree, or prune the tree (PILOT only).
- Switch between normal, minimal and tiny nodes or color nodes by the feature they use.
- Show the data flow: edge width or node size scale with the number of training samples that pass through them.
Inspect nodes and predictions
- Click a node to see its type, split and metrics (number of samples, RSS, MAE, ...).
- See the plot of any node: the data and the fit of a split, or the prediction plot of a leaf that shows how each feature contributes to its predictions.
- Turn on Show all node plots to replace every node of the graph by its plot or only pin next to their node.
- Highlight the path of a data point through the tree, with its prediction.
Installation
IMoTE needs Python 3.10 or newer.
pip install imote
Start the application with:
imote
Then open the address shown in the terminal (by default http://127.0.0.1:8050). The app starts with an example PILOT tree. Click a node to inspect it, or open the New Tree card on the right to fit a tree on another dataset.
IMoTE stores saved trees, uploaded datasets, downloaded datasets and generated plots in ~/.imote. Set the
IMOTE_HOME environment variable to use another folder.
Documentation
The full documentation is at https://stan-uantwerp.github.io/IMoTE/, it includes:
- the User Guide, with a page for every part of the interface,
- the Gallery, with screenshots of what IMoTE can show,
- a guide on how to write your own adapter for another type of linear model tree,
- an API reference of the tree and node classes used for visualisation.
Development
git clone https://github.com/STAN-UAntwerp/IMoTE
cd IMoTE
pip install -e ".[dev]" # IMoTE in editable mode, plus pytest, build and twine
python -m imote.app # start the app in Dash debug mode, it reloads on code changes
To work on the documentation: pip install -e ".[docs]", then mkdocs serve.
Questions and ideas are welcome in Discussions, bugs can be reported as an issue.
References
[1] Raymaekers, J., Rousseeuw, P. J., Verdonck, T., & Yao, R. (2024). Fast linear model trees by PILOT. Machine Learning, 113(9), 6561-6610. https://doi.org/10.1007/s10994-024-06590-3 (implementation: fast-model-trees)
[2] Quinlan, J. R. (1992). Learning with continuous classes. In 5th Australian Joint Conference on Artificial Intelligence (Vol. 92, pp. 343-348). (implementation: m5py)
Metadata
Release files for IMoTE 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imote-0.4.1.tar.gz | 2.0 MB | Without provenance | Details for imote-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imote-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for imote-0.4.1-py3-none-any.whl |
Total release size: 4.0 MB
Release files / imote-0.4.1.tar.gz
| Download URL | imote-0.4.1.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10054a30fbaed701d734577061dcc0fae4aaee90fba20a0fc6ca761eff99ed19
|
|
BLAKE2b-256 checksum How to use checksums |
c58cd60402efccb442a05738ecfc518888177b96fd42835dd9d1c84ae2fb083d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / imote-0.4.1-py3-none-any.whl
| Download URL | imote-0.4.1-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfa8e2b98b8390a04582913b9681a57755acdceb372d4e37487ea7232f3bb04e
|
|
BLAKE2b-256 checksum How to use checksums |
193a3e4e3e9cc77796e2a173b5fadd384ffbe6ff46533a9b5f6c97f78e26f2b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for IMoTE 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.