Library for minimax risk classifiers
Project description
MRCpy: A Library for Minimax Risk Classifiers
MRCpy implements recently proposed supervised classification techniques called minimax risk classifiers (MRCs). MRCs are based on robust risk minimization and can utilize 0-1 loss, in contrast to existing libraries using techniques based on empirical risk minimization and surrogate losses. Such techniques give rise to a manifold of classification methods that can provide tight bounds on the expected loss, enable efficient learning in high dimensions, and adapt to distribution shifts. MRCpy provides a unified interface for different variants of MRCs and follows the standards of popular Python libraries. This library also provides implementation for popular techniques that can be seen as MRCs such as L1-regularized logistic regression, zero-one adversarial, and maximum entropy machines.
Algorithms
- Minimax risk classifiers
- Adaptive minimax risk classifiers for classification under concept drift
- MRCs for covariate shift adaptation
- MRCs for classification in high dimensions
Installation
The latest built version of MRCpy
can be installed using pip
as
pip install MRCpy
Alternatively, the development version (GitHub) of MRCpy
can be installed as follows
git clone https://github.com/MachineLearningBCAM/MRCpy.git
cd MRCpy
python3 setup.py install
NOTE: The solver based on CVXpy in the library uses GUROBI optimizer which requires a license. You can get a free academic license from here.
Dependencies
Python
>= 3.8numpy
>= 1.19,scipy
>= 1.4.1,scikit-learn
>= 0.22,cvxpy
>= 1.1,gurobipy
Usage
See the MRCpy documentation page for full documentation about installation, API, usage, and examples.
Citations
This repository is the official implementation of Minimax Risk Classifiers proposed in the following papers. If you use MRCpy in a scientific publication, we would appreciate citations to:
-
[1] [Mazuelas, S., Zanoni, A., & Pérez, A. (2020). Minimax Classification with 0-1 Loss and Performance Guarantees. Advances in Neural Information Processing Systems, 33, 302-312.] (https://arxiv.org/abs/2010.07964)
@article{mazuelas2020minimax, title={Minimax Classification with 0-1 Loss and Performance Guarantees}, author={Mazuelas, Santiago and Zanoni, Andrea and P{\'e}rez, Aritz}, journal={Advances in Neural Information Processing Systems}, volume={33}, pages={302--312}, year={2020} }
-
@article{mazuelas2020generalized, title={Generalized Maximum Entropy for Supervised Classification}, author={Mazuelas, Santiago and Shen, Yuan and P{\'e}rez, Aritz}, journal={arXiv preprint arXiv:2007.05447}, year={2020} }
-
@article{bondugula2021mrcpy, title={MRCpy: A Library for Minimax Risk Classifiers}, author={Bondugula, Kartheek, and Alvarez, Veronica and Segovia-Mart{\'i}n J. I. and Mazuelas, Santiago and P{\'e}rez, Aritz}, journal={arXiv preprint arXiv:2108.01952}, year={2021} }
Updates and Discussion
You can subscribe to the MRCpy's mailing list for updates and discussion
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file MRCpy-2.3.0.tar.gz
.
File metadata
- Download URL: MRCpy-2.3.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb3113416db2e1a65622aed26c3f80eb184316fa3711dce739c13bc2f7e4445 |
|
MD5 | 5d9f1a8c87c2e33f3a2bfaae1b6e65f4 |
|
BLAKE2b-256 | f89285d1650a1cd870840d34c280ebe262ff5d98f3ef7563be33d489a7edebcb |
File details
Details for the file MRCpy-2.3.0-py3-none-any.whl
.
File metadata
- Download URL: MRCpy-2.3.0-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e0115634bd067c03ba60f6b6fe508ed83044ae1af0cc7bbb992a2d6577ce18f |
|
MD5 | 3a0a8162bb5243c9f53fa883fe4fedf3 |
|
BLAKE2b-256 | ea380f509dd89becdf59960bffbb485397ee37cb69f691e8edd8fe127b9ff474 |