A Hidden Variables Approach to Multilabel Logistic Regression