DEMANDE (Density Matrix NEural Density Estimation) is a neural density estimation method based on density matrices and adaptive Fourier features. It provides a flexible machine-learning approach to estimate probability density functions from data, grounded in the mathematical formalism of density matrices commonly used in quantum mechanics. (Semantic Scholar)
Traditional density estimation methods like Kernel Density Estimation (KDE) scale poorly with dimensionality and dataset size. DEMANDE models densities using density matrices combined with adaptive Fourier feature maps, yielding a scalable, data-driven estimator that can be integrated with deep learning tools and evaluated efficiently. (Semantic Scholar)
- Density matrix representation of probability distributions
- Adaptive Fourier features to approximate kernels and embed data
- Python implementation with example notebooks
- Modular and extensible for research and experiments
- Includes tests and baseline usage examples
Install Miniconda from here and then run the following commands to create the learning_with_density_matrices environment:
conda env create -f environment.yml
conda activate learning-with-density-matricesNext, install the package:
pip install -e .or if you want development dependencies as well:
pip install -e .[dev]This repository rely on some gitsubmodules. To update them run:
git submodule update --init --recursiveAll the experiments will be saved on Ml-flow in the following path using sqlite: mlflow/
mkdir mlflow/After running your experiments, you can launch the ml-flow dashboard by running the following command:
mlflow ui --port 8080 --backend-store-uri sqlite:///mlflow/tracking.db📦 demande
├── src/ # Core implementation
├── notebooks/ # Python scripts to run demos
├── tests/ # Unit and integration tests
├── data/ # Example dataset
├── pyproject.toml
├── README.md
└── LICENSE
Run the test suite:
pytest tests/DEMANDE builds on the idea of density matrices as probability density estimators, with roots in kernel and random Fourier feature methods. (Semantic Scholar)
If you use this code in your research, please cite:
@article{gallego2023demande,
title={DEMANDE: Density Matrix Neural Density Estimation},
author={Gallego-Meji{\'a}, Joseph A. and Gonz{\'a}lez, Fabio A.},
journal={IEEE Access},
year={2023}
}
(This is a placeholder citation — adjust to the official published version and BibTeX entry.) (ResearchGate)
Contributions are welcome! Please open issues for bugs, feature requests, or improvements.
- Fork the repo
- Create a feature branch
- Add tests for new behavior
- Submit a pull request
This project is licensed under the MIT License.
If you want, I can also generate badges (e.g., build status, PyPI, citations) or add installation via pip/Conda and API reference sections to the README.