# QuaPy: A Python-Based Framework for Quantification

arXiv: https://arxiv.org/abs/2106.11057 · HTML: https://mlsanity.com/paper/2106.11057/

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- Builds on 9 of its 33 references that are in the map.
- First posted on arXiv 18 Jun 2021.

## Builds on (most cited first, 9 of 9)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Evaluation Measures for Quantification: An Axiomatic Approach](https://mlsanity.com/paper/1809.01991/) (2018)
- [A Comparative Evaluation of Quantification Methods](https://mlsanity.com/paper/2103.03223/) (2021)
- [A Recurrent Neural Network for Sentiment Quantification](https://mlsanity.com/paper/1809.00836/) (2018)
- [Re-Assessing the "Classify and Count" Quantification Method](https://mlsanity.com/paper/2011.02552/) (2020)
- [Tweet Sentiment Quantification: An Experimental Re-Evaluation](https://mlsanity.com/paper/2011.08091/) (2020)
- [Optimizing Text Quantifiers for Multivariate Loss Functions](https://mlsanity.com/paper/1502.05491/) (2015)
- [Quantification in-the-wild: data-sets and baselines](https://mlsanity.com/paper/1510.04811/) (2015)
- [Cross-Lingual Sentiment Quantification](https://mlsanity.com/paper/1904.07965/) (2019)

## Built on by (most cited first, 14 of 14)

- [Kernel Density Estimation for Multiclass Quantification](https://mlsanity.com/paper/2401.00490/) (2023)
- [Binary Quantification and Dataset Shift: An Experimental Investigation](https://mlsanity.com/paper/2310.04565/) (2023)
- [Minimising quantifier variance under prior probability shift](https://mlsanity.com/paper/2107.08209/) (2021)
- [Bayesian Quantification with Black-Box Estimators](https://mlsanity.com/paper/2302.09159/) (2023)
- [Quantification using Permutation-Invariant Networks based on Histograms](https://mlsanity.com/paper/2403.15123/) (2024)
- [LeQua@CLEF2022: Learning to Quantify](https://mlsanity.com/paper/2111.11249/) (2021)
- [On the Interconnections of Calibration, Quantification, and Classifier Accuracy Prediction under Dataset Shift](https://mlsanity.com/paper/2505.11380/) (2025)
- [Adjusted Count Quantification Learning on Graphs](https://mlsanity.com/paper/2503.09395/) (2025)
- [Estimating prevalence with precision and accuracy](https://mlsanity.com/paper/2507.06061/) (2025)
- [Distribution Matching for Graph Quantification Under Structural Covariate Shift](https://mlsanity.com/paper/2601.00864/) (2025)
- [Multi-Label Quantification](https://mlsanity.com/paper/2211.08063/) (2022)
- [Continuous Sweep for Binary Quantification Learning](https://mlsanity.com/paper/2308.08387/) (2023)
- [Quantifying Feature Importance for Online Content Moderation](https://mlsanity.com/paper/2510.19882/) (2025)
- [Geometry-Aware Bayesian Quantification via Compositional Data Analysis](https://mlsanity.com/paper/2607.04977/) (2026)

## Abstract (arXiv)

QuaPy is an open-source framework for performing quantification (a.k.a. supervised prevalence estimation), written in Python. Quantification is the task of training quantifiers via supervised learning, where a quantifier is a predictor that estimates the relative frequencies (a.k.a. prevalence values) of the classes of interest in a sample of unlabelled data. While quantification can be trivially performed by applying a standard classifier to each unlabelled data item and counting how many data items have been assigned to each class, it has been shown that this "classify and count" method is outperformed by methods specifically designed for quantification. QuaPy provides implementations of a number of baseline methods and advanced quantification methods, of routines for quantification-oriented model selection, of several broadly accepted evaluation measures, and of robust evaluation protocols routinely used in the field. QuaPy also makes available datasets commonly used for testing quantifiers, and offers visualization tools for facilitating the analysis and interpretation of the results. The software is open-source and publicly available under a BSD-3 licence via https://github.com/HLT-ISTI/QuaPy, and can be installed via pip (https://pypi.org/project/QuaPy/)
