Metadata-Version: 2.4
Name: IMoTE
Version: 0.0.0
Summary: IMoTE: Interactive MOdel Tree Explorer, an interactive app to visualise and explore linear model trees
Author-email: Flor Debois <flor.debois@uantwerpen.be>, Thomas Servotte <thomas.servotte@uantwerpen.be>, Jakob Raymaekers <jakob.raymaekers@uantwerpen.be>, Tim Verdonck <tim.verdonck@uantwerpen.be>
License-Expression: MIT
Project-URL: Homepage, https://github.com/STAN-UAntwerp/IMoTE
Project-URL: Documentation, https://stan-uantwerp.github.io/IMoTE/
Project-URL: Repository, https://github.com/STAN-UAntwerp/IMoTE
Project-URL: Issues, https://github.com/STAN-UAntwerp/IMoTE/issues
Keywords: linear model trees,visualization,interpretability,machine learning,decision trees,regression
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Framework :: Dash
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dash>=4.2
Requires-Dist: dash-bootstrap-components>=1.6
Requires-Dist: dash-cytoscape>=1.0
Requires-Dist: flask>=3.0
Requires-Dist: numpy>=1.21
Requires-Dist: pandas>=1.3
Requires-Dist: matplotlib>=3.6
Requires-Dist: seaborn>=0.13
Requires-Dist: pmlb>=1.0
Requires-Dist: fast-model-trees>=0.0.5
Requires-Dist: m5py>=0.3.3
Requires-Dist: scikit-learn<1.9,>=1.3
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.26; extra == "docs"
Dynamic: license-file

# IMoTE: Interactive MOdel Tree Explorer

**IMoTE** is an interactive app to fit, visualise and explore **linear model trees** for regression.
Inspect the tree as an interactive graph, see the linear model and data behind every node, and trace a single
data point through the tree to understand its prediction.

![IMoTE: the tree graph with the interaction cards on the right](https://raw.githubusercontent.com/STAN-UAntwerp/IMoTE/main/docs/assets/screenshots/app-overview.png)

## Overview

IMoTE supports two linear model tree algorithms out of the box:

- **PILOT** (*PIecewise Linear Organic Tree*): a fast linear model tree algorithm, using the
  [fast-model-trees](https://github.com/STAN-UAntwerp/fast-model-trees) implementation.
- **M5**: the classic model tree algorithm, using [m5py](https://pypi.org/project/m5py/).

Trees fitted with other tools can be loaded by writing an **adapter**. A partykit (R) adapter is included as an example.

## Installation

```bash
pip install imote
```

IMoTE needs Python 3.10 or newer.

## Quick start

### Start the app

```bash
imote
```

Then open the address shown in the terminal (by default <http://127.0.0.1:8050>). From the **New Tree** card you can
fit PILOT or M5 on a built-in dataset or on your own CSV file.

IMoTE stores saved trees, uploaded datasets and generated plots in `~/.imote`. Set the `IMOTE_HOME` environment
variable to use another folder.

## Documentation

The full documentation, with a guide to every part of the interface and how to write your own adapter, is at
<https://stan-uantwerp.github.io/IMoTE/>.

## Papers

- **PILOT**: 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>
- **M5**: Quinlan, J. R. (1992). Learning with continuous classes. In *5th Australian Joint Conference on Artificial
  Intelligence* (Vol. 92, pp. 343-348).

## Development

```bash
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`.

## License

MIT, see [LICENSE](https://github.com/STAN-UAntwerp/IMoTE/blob/main/LICENSE).
