cm-tpm (Continuous Mixtures of Tractable Probabilistic Models) is a Python package designed for efficient and scalable data imputation using prbabilistic circuits. The package provides a flexible and user-friendly API, making it easy to integrate into data preprocessing pipelines. cm-tpm is distributed under the MIT licence.

The project was started in 2025 by Hakim Agni under the supervision of Thomas Krak at Eindhoven University of Technology. It implements the data imputation method described in the paper [Continuous Mixtures of Tractable Probabilistic Models](https://arxiv.org/abs/2209.10584), by Alvaro Correia, Gennaro Gala, Erik Quaeghebeur, Cassio de Campos and Robert Peharz.

Installation
------------

### Dependencies

cm-tpm requires:

- Python (>= 3.8)


### User installation

The easiest way to install cm-tpm is using ``pip``:
```
pip install cm-tpm
```
<!-- or using ``conda``:
```
conda install cm-tpm
``` -->


Development
-----------
### Source code
You can check the latest source code with the command:
```
git clone https://github.com/Hakim-Agni/cm-tpm.git
```

If you want to run the code locally without installing, make sure you install the requirements for this package. To do this, run the following command in the project root:
```
pip install -r 'requirements.txt'
```

### Testing
After installation, you can launch the test suite from outside the source directory (this requires ``pytest`` to be installed):
```
pytest tests
```


Help and Support
----------------
### Documentation
The full documentation of this package will be published soon.

### Communication
If you have any questions regarding this package, feel free to reach out via on of the following platforms:

- **GitHub Discussions**: Support added soon.

