Discrete latent factor models (DLFMs) are widely used in various domains such as machine learning, economics, neuroscience, psychology, etc.
A generic framework based on CVXPY is proposed to specify and solve the fitting problem of a wide range of DLFMs, including regression and classification models.
The framework allows for the integration of regularization terms and constraints on the DLFM parameters and latent factors, providing flexibility for customization.
An open-source Python implementation is introduced, and several examples illustrate the usage of the framework.