BCAM’s Machine Learning research line group releases the Python library MRCpy

  • The library implements the minimax risk classifiers (MRCs) recently developed at BCAM


BCAM’s Machine Learning research line group have released the Python library MRCpy. Such library implements the Minimax Risk Classifiers (MRCs) that have been developed by the research line group at BCAM during the last several years. The project has been carried out by researchers at BCAM including PhD Student Kartheek Bondugula, Research Technician Claudia Guerrero, Posdoctoral Fellow Aritz Pérez and Prof. Santiago Mazuelas (BCAM Researcher – Ramón y Cajal 2018).

MRCpy implements supervised classification techniques that learn from training samples using minimax methods. Such Artificial Intelligence (AI) methods can be used in general applications that exploit supervised learning. The methods implemented can be especially suitable in situations where robust classification is needed. Such situations are common in scenarios where the training samples do not comply with usual assumption. The techniques developed can handle such situations since MRCs minimize the worst-case error probability. In addition, MRCs provide tight performance bounds at learning that can be utilized to assess the classification accuracy without testing.

MRCpy provides a unified interface for multiple variants of MRCs and follows the standards of popular Python libraries. The presented 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. In addition, MRCpy implements recent feature mappings such as Fourier, ReLU, and threshold features.

The library is available under MIT license and its complete API together with multiple guided examples of usage. MRCpy will continue to be developed by BCAM’s Machine Learning research line group and it will soon include extensions for lifelong learning, domain adaptation, and weak supervision.