scieee AI-readable full text Open interactive document viewer

Multi-Label Quantification

Moreo Fernández, Alejandro,Aparicio, Manuel Francisco,Sebastiani, Fabrizio

Abstract

The work of A. Moreo and F. Sebastiani has been supported by the SoBigData++ project, funded by the European Commission (Grant 871042) under the H2020 Programme INFRAIA-2019-1, by the AI4Media project, funded by the European Commission (Grant 951911) under the H2020 Programme ICT-48-2020, and by the SoBigData.it and FAIR projects funded by the Italian Ministry of University and Research under the NextGenerationEU program; the authors’ opinions do not necessarily reflect those of the funding agencies. The work of M. Francisco has been supported by the FPI 2017 predoctoral programme, from the Spanish Ministry of Economy and Competitiveness (MINECO), grant BES-2017-081202.

Full text

1 Multi-Label Quantification ALEJANDRO MOREO,Istituto di Scienza e Tecnologie dell’Informazione, Consiglio Nazionale delle Ricerche, Italy MANUEL FRANCISCO,Department of Computer Science and Artificial Intelligence, University of Granada, Spain FABRIZIO SEBASTIANI,Istituto di Scienza e Tecnologie dell’Informazione, Consiglio Nazionale delle Ricerche, Italy Quantification, variously called supervised prevalence estimation or learning to quantify, is the supervised learning task of generating predictors of the relative frequencies (a.k.a. prevalence values) of the classes of interest in unlabelled data samples. While many quantification methods have been proposed in the past for binary problems and, to a lesser extent, single-label multiclass problems, the multi-label setting (i.e., the scenario in which the classes of interest are not mutually exclusive) remains by and large unexplored. A straightforward solution to the multi-label quantification problem could simply consist of recasting the problem as a set of independent binary quantification problems. Such a solution is simple but naïve, since the independence assumption upon which it rests is, in most cases, not satisfied. In these cases, knowing the relative frequency of one class could be of help in determining the prevalence of other related classes. We propose the first truly multi-label quantification methods, i.e., methods for inferring estimators of class prevalence values that strive to leverage the stochastic dependencies among the classes of interest in order to predict their relative frequencies more accurately. We show empirical evidence that natively multi-label solutions outperform the naïve approaches by a large margin. The code to reproduce all our experiments is available online. CCS Concepts: •Computing methodologies →Supervised learning. Additional Key Words and Phrases: Quantification, Learning to Quantify, Supervised Prevalence Estimation, Class Prior Estimation, Multi-Label Quantification, Multi-Label Learning ACM Reference Format: Alejandro Moreo, Manuel Francisco, and Fabrizio Sebastiani. 2023. Multi-Label Quantification. ACM Trans. Knowl. Discov. Data. 1, 1, Article 1 (June 2023), 37 pages. https://doi.org/XXXXXXX.XXXXXXX 1 INTRODUCTION Many fields such as the social sciences, political science, market research, or epidemiology (to name a few), are inherently interested in aggregate data, i.e., in how populations of individuals are distributed according to one or more indicators of interest. Researchers who operate in these Authors’ addresses: Alejandro Moreo, alejandro[email protected].it, Istituto di Scienza e Tecnologie dell’Informazione, Consiglio Nazionale delle Ricerche, Via Giuseppe Moruzzi 1, Pisa, Italy, 56124; Manuel Francisco, [email protected].es, Department of Computer Science and Artificial Intelligence, University of Granada, C Periodista Daniel Saucedo Aranda s/n, Granada, Spain, 18071; Fabrizio Sebastiani, [email protected].it, Istituto di Scienza e Tecnologie dell’Informazione, Consiglio Nazionale delle Ricerche, Via Giuseppe Moruzzi 1, Pisa, Italy, 56124. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. ©2023 Association for Computing Machinery. 1556-4681/2023/6-ART1 $15.00 https://doi.org/XXXXXXX.XXXXXXX ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:2 Moreo et al. specialty areas are instead little interested in the individuals per se, since in these fields the individuals are relevant only inasmuch as they are members of the population of interest; in other words, disciplines such as the above are interested “not in the needle, but in the haystack” [29]. Sometimes, researchers active in these fields use supervised learning to obtain the data they need. For instance, epidemiologists interested in the distribution of the causes of death across different geographical regions may sometimes need to infer the cause of death of each person by classifying, via a machine-learned text classifier, a verbal description of the symptoms that affected a deceased person [ 32 ]. However, these researchers are not specifically interested in the class (representing a given cause of death) to which an individual belongs; rather, their final goal is estimating the prevalence (i.e., relative frequency, or prior probability) of each class in the unlabelled data. At a first glance, estimating these prevalence values via supervised learning looks like a direct application of classification, since one could simply (i) train a classifier on labelled data, (ii) use this classifier to issue label predictions for each unlabelled datapoint (i.e., individual) in the population of interest, (iii) count how many datapoints have been attributed to each of the classes of interest, and (iv) normalize the counts by the total number of labelled datapoints, thus obtaining the estimated relative frequencies of the classes. However, there is by now abundant evidence [ 5 , 13 , 20 , 23 , 43 , 53 ] that such an approach, known in the literature as the “Classify and Count” (CC) method, yields poor class prevalence estimates when the distribution of the unlabelled datapoints across the classes differs substantially from the analogous distribution observed during training. This latter condition is typically known as prior probability shift [ 40 , 57 ]; in the aforementioned disciplines this condition is ubiquitous since, quite obviously, there is interest in inferring a distribution only when we assume this unknown distribution to be possibly different from the known distribution that characterizes the training data. The main reason why CC tends to fail in the presence of prior probability shift is that, in this case, the IID assumption on which most classifiers based on supervised learning rest upon, does not hold. Quantification (variously called learning to quantify,supervised prevalence estimation, or class prior estimation) is the research field concerned with obtaining accurate estimators of class prevalence values via machine learning [ 13 , 23 ]. Given its obvious relationship with classification, quantification has been extensively studied in the two main settings typical of classification, i.e., the binary setting (binary quantification – BQ), in which the codeframe (i.e., the set of classes of interest) contains only two classes [ 2 , 6 , 16 , 20 , 26 ], and the single-label multiclass setting (single-label quantification – SLQ), which involves three or more mutually exclusive classes [ 3 , 18 , 22 , 43 , 53 ]. Quantification has also been studied in other (less popular) settings, such as the ordinal case (ordinal quantification – OQ), in which there is a total ordering among the classes (see, e.g., [ 5 , 7 , 10 ]). A graphical comparison of the different types of quantification problems is given in Figure 1. One important setting which remains to a large extent unexplored in the quantification literature is multi-label quantification (MLQ), the scenario in which every datapoint may belong to zero, one, or several classes at the same time. Multi-label data arise naturally in many applicative contexts, including the medical domain [ 31 ], the legal domain [ 9 ], industry [ 61 ], or cybersecurity [ 44 ], among many others, and has been thoroughly studied under the lens of classification in past literature [ 12 , 38 , 69 ], especially in the field of text classification [ 21 , 37 , 49 , 71 ]; see [ 27 , 62 ] for an overview of this topic. Despite the ubiquity of multi-label data, we are aware of only one previous attempt to cope with the MLQ problem [ 33 ]; in this paper we set out to analyze MLQ systematically. We start by noting that, since quantification systems are expected to be robust to prior probability shift, we need to test them against datasets exhibiting substantial amounts of shift. Our first contribution is the first experimental protocol specifically designed for multi-label quantification, a protocol that guarantees that the data MLQ systems are tested against do comply with the above desideratum. ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:3 Binary positive negative sentiment polarity Single-label merchandise categories DVDsbooks toys games phones Ordinal sentiment polarity Multi-label yes no yes no yes no yes no yes no nauseaheadache fatiguecough fever Fig. 1. Different types of quantification problems. From left to right: binary quantification (e.g., estimating the prevalence values of positive reviews and negatives reviews in a set of product reviews), single-label quantification (e.g., estimating the prevalence values of different merchandise classes in a set of product reviews), ordinal quantification (e.g., estimating how a set of reviews of a certain product distributes across different “star” ratings), and multi-label quantification (e.g., estimating the prevalence values of different, non mutually exclusive symptoms in a set of patients). We carry on by noting that a trivial solution for MLQ could simply consist of training one independent binary quantifier for each of the classes in the codeframe. However, such a solution is arguably a “naïve” one, as it assumes the classes to be independent of each other, and thus does not attempt to leverage the class-class correlations, i.e., the stochastic dependencies that may exist among different classes. We show empirical evidence that multi-label quantifiers constructed according to this naïve intuition yield suboptimal performance, and that this happens independently of the method used for training the binary quantifiers. We then move on to studying different possible strategies for tackling MLQ, and subdivide these strategies in four groups, based on their way of addressing (if at all) the multi-label nature of the problem. While the first two groups can be instantiated by using already available techniques, the other two cannot, since this would require “aggregation” techniques (see Section 5) that leverage the stochastic relations between classes, and no such method has been proposed before. We indeed propose two such methods, called RQ and LPQ. By means of extensive experiments that we have carried out using 15 publicly available datasets, we show that, when working in combination with a classifier that itself leverages the above-mentioned stochastic relations, LPQ and (especially) RQ outperform all other MLQ techniques. The rest of this article is structured as follows. After devoting Section 2to notation and preliminaries, in Section 3we survey related work on quantification and on coping with multi-label data. In Section 4we move on to propose an evaluation protocol specifically devised for MLQ. In Section 5we characterize the four groups of MLQ systems according to the stages in which the multi-label nature of the problem is tackled, and propose the first methods (Section 5.2) that allow doing this also at the “aggregation” stage. In Section 6we present the experiments we have carried out and discuss the results, while Section 7wraps up. The code to reproduce all our experiments is available at https://github.com/manuel-francisco/quapy-ml/ . 2 NOTATION AND DEFINITIONS In this paper we use the following notation. By xwe indicate a datapoint drawn from a domain X of datapoints, while by 𝑦 we indicate a class drawn from a finite, predefined set of classes (also known as a codeframe) Y={𝑦1, ...,𝑦𝑛} , with 𝑛 the number of classes of interest. Symbol 𝜎 denotes a sample, ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:4 Moreo et al. i.e., a non-empty set of (labelled or unlabelled) datapoints drawn from X . By 𝑝𝜎(𝑦) we indicate the true prevalence of class 𝑦 in sample 𝜎 , by ˆ 𝑝𝜎(𝑦) we indicate an estimate of this prevalence, and by ˆ 𝑝𝑞 𝜎(𝑦) we indicate the estimate of this prevalence obtained by means of quantification method 𝑞 . We will denote by p =(𝑝1, . . . , 𝑝𝑛) a real-valued vector. When pis a vector of class prevalence values, then 𝑝𝑖is short for 𝑝𝜎(𝑦𝑖). We first formalize the SLQ problem (Section 2.1) and then propose a definition of the MLQ problem (Section 2.2). 2.1 Single-Label Codeframes In single-label problems, each datapoint xbelongs to one and only one class in Y . We denote a datapoint with its true class label as a pair ( x ,𝑦) , indicating that 𝑦∈ Y is the true label of x ∈ X . We represent a set of 𝑘 datapoints as {( x (𝑖),𝑦(𝑖))𝑘 𝑖=1 :x (𝑖)∈ X,𝑦(𝑖)∈ Y} . By 𝐿 we denote a collection of l abelled datapoints, that we typically use as a training set, while by 𝑈 we denote a collection of unlabelled datapoints, that we typically use for testing purposes. We define a single-label hard classifier as a function ℎ:X → Y i.e., a predictor of the class attributed to a datapoint. We will instead take a single-label soft classifier to be a function 𝑠:X → Δ𝑛−1 with Δ𝑛−1the unit (𝑛-1)-simplex (aka probability simplex or standard simplex) defined as Δ𝑛−1={(𝑝1, . . . , 𝑝𝑛) | 𝑝𝑖∈ [0,1], 𝑛 ∑︁ 𝑖=1 𝑝𝑖=1} i.e., as the domain of all vectors representing probability distributions over Y . We define a singlelabel quantifier as a function 𝑞: 2X→Δ𝑛−1 i.e., a function mapping samples drawn from Xinto probability distributions over Y. Note that, despite the fact that the codomains of soft classifiers and quantifiers are the same, in the former case the 𝑖 -th component of 𝑠( x ) denotes the posterior probability Pr(𝑦𝑖| x ) , i.e., the probability that xbelongs to class 𝑦𝑖 as estimated by 𝑠 , while in the latter case it denotes the class prevalence value 𝑝𝜎(𝑦𝑖)as estimated by 𝑞. By 𝑑( p ,ˆ p) we denote an evaluation measure for SLQ; these measures are typically divergences, i.e., functions that measure the amount of discrepancy between two probability distributions. Everything we say for single-label problems applies to the binary case as well, since the latter is the special case of the former in which 𝑛= 2, with one class typically acting as the “positive class”, and the other as the “negative class”. 2.2 Multi-Label Codeframes In multi-label problems each datapoint xcan belong to zero, one, or more than one class in Y ; as a result, the sum Í𝑛 𝑖=1𝑝𝑖 may be different from 1. We denote a datapoint with its true labels as a pair ( x ,𝑌 ) , in which 𝑌⊆ Y is the set of true labels assigned to x ∈ X . A multi-label collection with 𝑘 datapoints is represented as {( x (𝑖),𝑌 (𝑖))𝑘 𝑖=1 :x (𝑖)∈ X, 𝑌 (𝑖)⊆ Y} . We define a multi-label hard classifier as a function ℎ:X → 2Y ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:5 i.e., as a classifier that can assign zero, one, or more than one label to each datapoint, while we define a multi-label soft classifier as a function 𝑠:X → [0,1]𝑛 Note that, unlike in the single-label case, the codomain of function 𝑠 is not a probability simplex, since the sum Í𝑛 𝑖=1𝑝𝑖 may be different from 1, but the set of all real-valued vectors (𝑝1, . . . , 𝑝𝑛) such that 𝑝𝑖∈ [0,1]. We define a multi-label quantifier as a function 𝑞: 2X→ [0,1]𝑛 i.e., a function mapping samples from X into vectors of 𝑛 class prevalence values, where, differently from the single-label multiclass case, the class prevalence values in a vector do not need to sum up to 1. 3 RELATED WORK 3.1 Multi-Label Quantification The task of quantification was first proposed by Forman in 2005 [ 19 ], and emerges from the observation that in some applications of classification the real goal is the estimation of class prevalence values, and the prediction of individual class labels is nothing but an intermediate step to achieve it. Forman [ 19 ] observed that the so-called “classify and count” method (discussed in the introduction) tends to deliver biased estimators of class prevalence when confronted with situations characterized by prior probability shift. Since then, many contributions to this field have been published (see [ 13 , 23 ] for overviews). However, most of this work has focused on the binary [ 14 , 16 , 19 , 20 , 36 ], single-label multiclass [ 3 , 18 , 22 , 43 ], or ordinal [ 5 , 7 , 10 , 51 ] versions of the problem, with essentially no attention devoted to the multi-label case. To the best of our knowledge, the only previously proposed method dealing with multi-label (text) quantification is [ 33 ]. The method, dubbed PCC-PAV, mainly consists of performing a refined calibration of the posterior probabilities returned by a set of binary classifiers, each trained to issue soft predictions for a specific class in the codeframe, followed by the application of the (binary version of the) “probabilistic classify and count” (PCC) quantification method (explained in Section 5.1). The refinement amounts to constraining the calibration algorithm (Pair Adjacent Violators – PAV [ 68 ]) to generate posterior probabilities that have an expected value equal to the class prevalence values observed in the training set. PCC-PAV involves a complex quadratic programming problem that the authors try to alleviate by imposing a “document unification” heuristics (thus giving rise to the variant PCC-EPAV). However, aside from its substantial computational cost, the method presents two important limitations. The first limitation is that the calibration process encourages the quantifier to stick to the class prevalence values encountered in the training set (hereafter: the training prevalence), and thus makes it inadequate to tackle prior probability shift. Indeed, in [ 33 ] the authors test this method by means of an experimental protocol that offers no guarantee that the system is confronted with substantial amounts of prior probability shift; this is witnessed by the fact that the trivial baseline (one that simply returns the training prevalence for every test sample) achieves reasonably high scores. A second limitation is that the method uses independently trained binary classifiers; to put it another way, the method does not in any way address the multi-label nature of the problem, and is billed “multi-label” only since it is tested on multi-label datasets. This method thus squarely falls within the class of “naïve methods” that we have discussed in the introduction, and that we will more formally define as the simplest group of MLQ methods in the scheme that we propose in Section 5.2. ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:6 Moreo et al. 3.2 Multi-Label Classification Apart from PCC-PAV and PCC-EPAV, no other published method explicitly addresses MLQ. However, the field of quantification is closely related to the field of classification, and many of the concepts and principles adopted in quantification have been borrowed from the classification literature. We will thus devote most of this section to review existing approaches for multi-label classification, since some among the methods we propose in Section 5.2 for MLQ are inspired by them. In their survey [ 62 ], Tsoumakas and Katakis group the approaches to MLC in two main families: “problem transformation” approaches (Section 3.2.1) and “algorithm adaptation techniques” (Section 3.2.2). Later on, a third family of MLC approaches based on “ensemble methods” (Section 3.2.3) was introduced by Madjarov et al. [35]. 3.2.1 Problem Transformation Approaches. The “problem transformation” approach consists of recasting the original multi-label classification problem as a single-label one, so that existing techniques for the single-label case can be applied directly. The simplest approach relying on this principle is the so-called “binary relevance” (BR) approach [ 34 , 38 ]. BR consists of treating each label independently, thus tackling the multi-label problem as a set of 𝑛 binary classification problems. BR is a simplistic approach, since the stochastic dependencies among the classes are not taken into account. Despite its simplicity, BR has proven to work well in previous studies [ 35 ], and has always been, by far, the most frequently adopted approach for tackling multi-label classification problems. The “label powerset” (LP) approach consists instead of transforming each unique assignment of labels, as found in the training datapoints, in a new label. For example, if a training datapoint xhas labels 𝑌={𝑦1,𝑦5,𝑦6} , with 𝑦1,𝑦5,𝑦6∈ Y , then the datapoint is relabelled as 𝑌′=𝑦1:5:6 , with 𝑦1:5:6 a new “synthetic” class belonging to a single-label codeframe Y′⊇ Y . Once this relabelling has been performed for all unique label assignments, the problem is treated as a single-label problem using Y′ as the codeframe. Although this approach models label dependencies [ 56 ], the number of possible classes in the new codeframe Y′ is exponential in the number of classes in the original codeframe, since there are actually 2 𝑛 possible assignments of a datapoint to classes in Y (hence the name of the approach). Even if not all label combinations occur in practice in a single dataset, the total number of different assignments that could be found when large multi-label codeframes are used could easily make the problem intractable. Some heuristics based on ensembles (discussed in Section 3.2.3) have been proposed to make the problem tractable. A further limitation of this approach is its low statistical robustness, since, once a training datapoint xwith labels 𝑌={𝑦1,𝑦5,𝑦6} is given the synthetic label 𝑦1:5:6 ∈ Y′ , it “loses” the individual labels 𝑦1 , 𝑦5 , 𝑦6 , which means that these latter classes end up having fewer training examples than in the standard BR approach. In other words, having more classes means having, on average, fewer training examples per class, which may bring about lower accuracy for the individual (non-synthetic) classes. Yet another problem of the LP approach is the fact that combinations of labels never found in the training set cannot be predicted at all. The “classifier chains” (CChain) approach [ 11 , 49 ] consists instead of training a sequence of 𝑛 binary classifiers, one for each class in 𝑛 , chained so that each classifier receives, as additional inputs, the predictions made by the previous classifiers in the chain. That is, the first classifier ℎ1 in the chain is trained to predict label 𝑦1 using the original vector xas input, while the 𝑖 -th classifier in the chain is trained to predict label 𝑦𝑖 using as inputs the original vector xconcatenated with a vector of predictions (ℎ1( x ), . . . , ℎ𝑖−1( x )) for labels 𝑦1, . . . ,𝑦𝑖−1 , respectively. While this has turned out to be one of the best-performing MLC methods [ 35 ], CChain presents a number of limitations. The first has to do with the fact that CChain is sensitive to the order of the classes; in other words, Y is treated as an ordered sequence (rather than a set) of classes, and reshuffling the sequence would ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:7 bring about different results, which is undesirable. Some approaches to counter this limitation consist of training an ensemble of CChains using different label orderings in each of them, and then implementing some aggregation policy such as majority voting [ 49 ]. Yet another limitation of CChain is that the classification phase is (unlike for the simpler BR strategy) not amenable to parallelization, since the application of classifier ℎ𝑖 to unlabelled data must occur strictly after the application of classifiers ℎ1, ..., ℎ𝑖−1. 3.2.2 Algorithm Adaptation Approaches. “Algorithm adaptation” approaches consist of adapting single-label classifiers to return multi-label predictions. Schapire and Singer proposed a multi-label adaptation of AdaBoost, called AdaBoost.MH [ 52 ], which is based on choosing, for a given iteration of the boosting process, a unique “pivot term” around which all the binary classifiers for the individual classes hinge. ML-knn [ 69 ] is an adaptation of the well-known (lazy) KNN algorithm, which treats each class independently, and relies on the maximum a posteriori (MAP) principle to return multi-label predictions, where the prior and posterior probabilities needed to compute the MAP rule are estimated on the training set. Other classical methods that have been used within algorithm adaptation approaches include decision trees (DT – see, e.g., [ 65 ]) and random forests (RF – see, e.g., [35]). 3.2.3 Ensemble-Based Approaches. Ensemble-based approaches to MLC aim at improving model performance by combining different base classifiers. Some ensembles have been proposed as a response to specific problems encountered in other MLC systems. A first class of such ensembles are based on a divide-and-conquer approach, according to which the set of classes is first partitioned (using any clustering method), and the smaller, cluster-specific multilabel problems are then solved independently of each other. Different instances implementing this principle exist in the literature. For example, the authors of [ 63 ] create a tree in which the internal nodes are associated with sets of classes (called meta-classes) and their children are associated with subsets of the classes of the parent node. The root represents the set of all classes, while the leaves represent single classes. For each node, a multi-label classifier is trained to predict (zero, one, or more) meta-classes, each associated with one of the children nodes. The final set of labels returned is the union of all labels in the leaf nodes reached. HOMER implements the partitioning as balanced clustering, while HOMER-R relies instead on 𝑘 -means; in both cases the smaller multilabel problems are tackled via the binary relevance approach discussed in Section 3.2.1.RakEL [ 64 ] instead relies on random clustering (with the number of clusters a hyperparameter of the model) for partitioning the classes, and then runs an instance of the label powerset technique (LP – discussed in Section 3.2.1) for each cluster. Since the number of classes in each cluster is smaller than the total number of classes, the combinatorial problem affecting the LP approach is mitigated. In a similar vein, Label Space Clustering (LSC) [ 60 ] uses 𝑘 -means for clustering, followed by an instance of ML-knn local to each cluster. Other methods rely instead on label embeddings, i.e., on representing each class by means of a low-dimensional dense vector in a continuous space, so that similar classes (i.e., classes that tend to co-occur with each other) tend to be close to each other in the embedding space. The Cost-Sensitive Label Embedding with Multidimensional Scaling (CLEMS) method [ 30 ] is one such example, and one that has proven to be among the best performers in the label embedding arena (see e.g., [ 58 ]). Stacked Generalization (SG) [ 67 ] has often been employed to carry out multi-label classification. The idea is to train an ensemble of binary classifiers, each for a different class (somehow similarly to the BR approach) and use the classification predictions as additional features to train a metaclassifier. An advantage of SG with respect to CChain is that the former can be easily parallelized, since it is not dependent on the order of presentation of the classes. ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:8 Moreo et al. 3.2.4 Extreme multi-label classification. While not related to the three families of approaches mentioned in [ 62 ] and [ 35 ], we should also hint at a fourth strand of MLC literature, i.e., that concerned with large-scale (a.k.a. extreme) MLC, which can be defined as MLC using codeframes containing a very large number 𝑛 of labels (even more than a million – see e.g., [ 1 , 45 , 66 ]). In these contexts, even the simple BR approach discussed in Section 3.2.1 may be infeasible, since invoking a million binary classifiers for classifying a single instance is computationally hard. The task is computationally simpler if the codeframe is hierarchical (since in this case only 𝑂(log𝑛) classifiers need to be invoked), but in many applications of extreme MLC (say, assigning a given datapoint to all the Wikipedia categories relevant to it [ 45 ]) the codeframe is not hierarchical; many works in extreme MLC thus concentrate in ways to generate a hierarchy out of a very large codeframe in such a way as to make the training phase and the classification phase computationally feasible. We will not deal with extreme MLC in the rest of this paper since this literature (a) mostly targets computational efficiency (while it is increasing accuracy with respect to the basic BR approach that we are after), and (b) does not deal with leveraging the stochastic correlations between the classes, which is instead our goal. 4 AN EVALUATION PROTOCOL FOR TESTING MULTI-LABEL QUANTIFIERS For the evaluation of quantifiers, researchers often use the same datasets that are elsewhere used for testing classifiers. On one hand this looks natural, because both classification and quantification deal with datapoints that belong to classes in a given codeframe. On the other hand this looks problematic, since classification deals with estimating class labels for individual datapoints while quantification deals with estimating class prevalence values for samples (sets) of such datapoints. Simply estimating the accuracy of a quantifier on the entire test set of a dataset used for classification purposes (hereafter: a “classification dataset”) would not be enough, since this would be a single prediction only, which would be akin to testing a classifier on a single datapoint only. As a result, it is customary to generate a dataset to be used for quantification purposes (a “quantification dataset”) from a classification dataset by extracting from the test set of the latter a number of samples than will form the test set of the quantification dataset. Exactly how these samples are extracted is specified by an evaluation protocol. Different evaluation protocols for the binary case [ 16 , 19 ], for the single-label multiclass case [ 15 ], and for the ordinal case [ 5 ], have been proposed in the quantification literature. For the binary case, the most widely adopted protocol is the so-called artificial prevalence protocol (APP) [ 19 ]. The APP consists of extracting, from a set of test datapoints, many samples at controlled prevalence values. The APP takes four parameters as input: the unlabelled collection 𝑈 , the sample size 𝑘 , the number of samples 𝑚 to draw for each predefined vector of prevalence values, and a grid of prevalence values g(e.g., g =( 0 . 0 , 0 . 1 , . . . , 0 . 9 , 1 . 0 ) ). We then generate all the vectors p =(𝑝(⊕), 𝑝(⊖)) of 𝑛= 2prevalence values consisting of combinations of values from the grid gthat represent valid distributions (i.e., such that the elements in psum up to 1). For each such prevalence vector, we then draw 𝑚 different samples of 𝑘 elements each, which become the elements of our test set. The APP thus confronts the quantifier with samples characterized by class prevalence values very different from the ones seen during training, and can thus test the robustness of the quantifiers to the presence of prior probability shift. This protocol is, by far, the most popular one in the quantification literature (see, e.g., [6,14,17,19,36,39,43,46,47,53]). For the single-label multiclass case (which is the closest to our concerns) the APP needs to take a slightly different form, since the number of vectors p =(𝑝(𝑦1), ..., 𝑝(𝑦𝑛)) representing valid distributions for arbitrary 𝑛 is combinatorially high, for any reasonable grid of class prevalence values. As a solution, one can generate a number of random points on the probability simplex, ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:9 without constraining the individual class prevalence values to lie on a predetermined grid; when this number is high enough, it probabilistically covers the entire spectrum of valid combinations. However, even this form of the APP is not directly applicable to the multi-label scenario, because in this latter the class prevalence values in a valid vector do not necessarily sum up to 1. One could attempt to simply treat the multi-label problem as a set of independent binary problems, and then apply the APP independently to each of the classes. Unfortunately, such a solution is impractical, for at least three reasons: • The first reason is that the number of samples thus generated is exponential in 𝑛 , since there are 𝑚| g |𝑛 such combinations. Note that 𝑛 (the number of classes in the codeframe) cannot be set at will since it is fixed, and thus, in order to keep the number of combinations tractable in cases in which 𝑛 is large (in our experiments we use datasets with up to 𝑛= 983 classes), one would be compelled to set 𝑚= 1and choose a very coarse grid gof values (this would anyway prove insufficient when dealing with large codeframes). • The second and perhaps most problematic reason is that, in any case, many of the combinations are not even realisable. That is, there may be prevalence vectors for which no sample could be drawn at all. To see why, assume that, among others, we have classes 𝑦1 , 𝑦2 , 𝑦3 in our codeframe, and assume that in our test set 𝑈 , every time a datapoint is labelled with 𝑦1 it is also labelled with either 𝑦2 or 𝑦3 but not both. This means that all samples 𝜎 for which prevalence values 𝑝𝜎(𝑦1)≠(𝑝𝜎(𝑦2) + 𝑝𝜎(𝑦3)) are requested, cannot be generated. • Yet another reason why applying the APP would be, in any case, undesirable, is that the classes in most multi-label datasets typically follow a power-law distribution, i.e., there are few very popular classes and a long tail of many rare, or extremely rare, classes. The APP will sometimes impose high prevalence values for classes that in reality are very rare, which means that the sampling must be carried out with replacement; this would generate samples consisting of many replicas of the same few datapoints, which is clearly undesirable. For all these reasons we have designed a brand new protocol for MLQ, that we call ML-APP, since it is an adaptation of the APP to multi-label datasets. The protocol amounts to performing multiple rounds of the APP, each targeting a specific class, but with the range of prevalence values explored for each class being limited by the amount of available positive examples. This allows all samples to be drawn without replacement. In each round, a class 𝑦𝑖 is actively sampled at controlled prevalence values while the prevalence values for the remaining classes are not predetermined. Pseudocode describing the ML-APP is shown as Algorithm 1. The ML-APP covers the entire spectrum of class prevalence values, by drawing without replacement, for every single class. This means that, for large enough classes, there will be samples for which the prevalence of the class exhibits a large prior probability shift with respect to the training prevalence, while for rare classes the amount of shift will be limited by the availability of positive examples. Note that, when actively sampling a class 𝑦𝑖 , any other class 𝑦𝑗 will co-occur with it with a probability that depends on the correlation between 𝑦𝑖 and 𝑦𝑗 . For cases in which the class 𝑦𝑖 being sampled is completely independent of the class 𝑦𝑗 , the samples generated will display a class prevalence for 𝑦𝑗 that is approximately similar to the prevalence of 𝑦𝑗 in 𝑈 . In other words, samples generated via the ML-APP have a desirable property, i.e., they preserve the stochastic correlations between the classes while also exhibiting widely varying degrees of prior probability shift. Finally, note that the total number of samples that can be generated via the ML-APP can vary from dataset to dataset (even if they have the same number of classes), and depends on the actual number of positive instances for each class that are contained in the dataset. In any case, the maximum number of samples that can be generated via the ML-APP is bounded by 𝑚𝑛|g|. ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:16 Moreo et al. Fig. 3. An example considering a cluster made of three classes only (left), and the computations carried out for reconstructing the prevalence values for the original multi-label codeframe (right). Y 𝑐Y′ 𝑐ˆ p𝑞 𝜎 𝑦1𝑦2𝑦3 A: 000 𝑦′ ∅ˆ 𝑝𝑞 𝜎(𝑦′ ∅)=0.15 100 𝑦′ 1ˆ 𝑝𝑞 𝜎(𝑦′ 1)=0.10 010 𝑦′ 2ˆ 𝑝𝑞 𝜎(𝑦′ 2)=0.26 110 𝑦′ 1:2 ˆ 𝑝𝑞 𝜎(𝑦′ 1:2)=0.19 001 𝑦′ 3ˆ 𝑝𝑞 𝜎(𝑦′ 3)=0.05 101 𝑦′ 1:3 ˆ 𝑝𝑞 𝜎(𝑦′ 1:3)=0.13 011 𝑦′ 2:3 ˆ 𝑝𝑞 𝜎(𝑦′ 2:3)=0.11 111 𝑦′ 1:2:3 ˆ 𝑝𝑞 𝜎(𝑦′ 1:2:3)=0.01 (ˆ 𝑝𝑞 𝜎(𝑦1),ˆ 𝑝𝑞 𝜎(𝑦2),ˆ 𝑝𝑞 𝜎(𝑦3)) =(ˆ p𝑞 𝜎)⊤A ˆ 𝑝𝑞 𝜎(𝑦1)=ˆ 𝑝𝑞 𝜎(𝑦′ 1) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:2) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:3) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:2:3) =0.30 ˆ 𝑝𝑞 𝜎(𝑦2)=ˆ 𝑝𝑞 𝜎(𝑦′ 2) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:2) + ˆ 𝑝𝑞 𝜎(𝑦′ 2:3) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:2:3) =0.57 ˆ 𝑝𝑞 𝜎(𝑦3)=ˆ 𝑝𝑞 𝜎(𝑦′ 3) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:3) + ˆ 𝑝𝑞 𝜎(𝑦′ 2:3) + ˆ 𝑝𝑞 𝜎(𝑦′ 1:2:3) =0.43 correlations between classes that belong to different clusters will be more than compensated by the reduction in the number of combinations that one needs to take into account. In the experiments of Section 6.5 we explore different configurations of this approach, in which we combine different clustering strategies. 6 EXPERIMENTS In this section we turn to describing the experiments we have carried out in order to evaluate the performance of the different methods for MLQ that we have presented in the previous sections. In Section 6.1 we discuss the evaluation measure we adopt, while in Section 6.2 we describe the datasets on which we perform our experiments. In Section 6.3 we report experiments aiming at comparing the four groups of methods discussed in Section 5.2 and illustrated in Figure 2. In Section 6.4 and 6.5 we then move on to exploring further instances of methods belonging to those four groups. 6.1 Evaluation Measures Any evaluation measure for binary quantification can be easily turned into an evaluation measure for multi-label quantification, since evaluating a multi-label quantifier can be done by evaluating how well the prevalence value 𝑝(𝑦𝑖) of each class 𝑦𝑖∈ |Y| is approximated by the prediction ˆ 𝑝(𝑦𝑖) . As a result, it is natural to take a standard measure 𝑑( p ,ˆ p) for the evaluation of binary quantification, and turn it into a measure D(p,ˆ p)=1 𝑛 𝑛 ∑︁ 𝑖=1 𝑑((𝑝𝑖,(1−𝑝𝑖)),(ˆ 𝑝𝑖,(1−ˆ 𝑝𝑖))) (7) for the evaluation of multi-label quantification. (This is exactly what we do in multi-label classification, in which we take 𝐹1 , a standard measure for the evaluation of binary classification, and turn it into macroaveraged 𝐹1 , which is the standard measure for the evaluation of multi-label classification.) The study of evaluation measures for binary (and single-label multiclass) quantification performed in [54] concludes that the most satisfactory such measures are absolute error and relative absolute error; these are the two measures that we are going to use in this paper. In the binary case, absolute ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:17 error is defined as ae(p,ˆ p)=|𝑝1−ˆ 𝑝1|+|𝑝2−ˆ 𝑝2| 2 =|𝑝1−ˆ 𝑝1| + |(1−𝑝1)−(1−ˆ 𝑝1)| 2 =|𝑝1−ˆ 𝑝1| (8) which yields the multi-label version AE(p,ˆ p)=1 𝑛 𝑛 ∑︁ 𝑖=1 |𝑝𝑖−ˆ 𝑝𝑖|(9) In the binary case, relative absolute error is instead defined as rae(p,ˆ p)=1 2|𝑝1−ˆ 𝑝1| 𝑝1 +|𝑝2−ˆ 𝑝2| 𝑝2 =1 2|𝑝1−ˆ 𝑝1| 𝑝1 +|(1−𝑝1)−(1−ˆ 𝑝1)| (1−𝑝1)(10) which yields the multi-label version RAE(p,ˆ p)=1 2𝑛 𝑛 ∑︁ 𝑖=1|𝑝𝑖−ˆ 𝑝𝑖| 𝑝𝑖 +|(1−𝑝𝑖)−(1−ˆ 𝑝𝑖)| (1−𝑝𝑖)(11) Since RAE is undefined when 𝑝𝑖= 0or 𝑝𝑖= 1, we smooth the probability distributions pand ˆ p via additive smoothing; in the binary case, this maps a distribution p=(𝑝𝑖,(1−𝑝𝑖)) into s(p)=𝜖+𝑝𝑖 2𝜖+1,𝜖+ (1−𝑝𝑖) 2𝜖+1(12) with 𝜖the smoothing factor, that we set, following [20], to 𝜖=(2|𝜎|)−1. Note that we do not use, as a measure, concordance ratio, i.e., CR(p,ˆ p)=1 𝑛 𝑛 ∑︁ 𝑦=1 min{𝑝𝑖,ˆ 𝑝𝑖} max{𝑝𝑖,ˆ 𝑝𝑖}(13) despite the fact that it is the measure used in [ 33 ], the only paper in the literature that addresses multi-label quantification. The reason why we do not use it is the fact that, as later shown in [ 54 ], the mathematical properties of CR do not make it (similarly to other measures used in the quantification literature in the past, such as the Kullback-Leibler Divergence) a satisfactory measure for quantification; see [54, pp. 272–273] for details. In the experiments we describe in Section 6, the trends we observe and the conclusions we draw for AE hold for RAE as well. In Section 6we will thus report our results in terms of AE only, deferring the results in terms of RAE to Appendix A. 6.2 Datasets For our experiments we use 15 popular MLC datasets, including 3 datasets specific to text classification (Reuters-21578, 4 Ohsumed [ 28 ], and RCV1-v2 5 ), plus all the datasets linked from the scikit-multilearn package [58] with the exception of the RCV1-v2 subsets (we omit them since 4http://www.daviddlewis.com/resources/testcollections/reuters21578/ 5http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/lyrl2004_rcv1v2_{R}EADME.htm ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:18 Moreo et al. we already include the much larger collection from which they were extracted). We refer to the original sources for detailed descriptions of these datasets.6 For the three textual datasets, we pre-process the text by applying lowercasing, stop word removal, and punctuation removal, as implemented in scikit-learn, 7 and by masking numbers with a special token. We retain all terms appearing at least 5 times in the training set, and convert the resulting set of words into (sparse) tfidf-weighted vectors using scikit-learn’s default vectorizer. 8 For all datasets, we remove very rare classes (i.e., those with fewer than 5 training examples) from consideration, since they pose a problem when it comes to generating validation (i.e., held-out data) sets. Indeed, since we optimize the hyperparameters for all the methods we use (as explained below), we need validation sets, and it is sometimes impossible to have positive examples for these classes in both the training and validation sets (let us remember that pure stratification in multi-label datasets is not always achievable, as argued in [ 55 , 59 ]). Note that all this only concerns the training set, and has nothing to do with the test set, which can include (and indeed includes, for most datasets) extremely rare classes, since removing classes that are rare in the test set would lead to an unrealistic experimentation. Note also that removing classes that are rare in the training set is “fair”, i.e., equally affects all methods that we experimentally compare, since all of them involve hyperparameter optimization. Finally, note that, whenever a method requires generating additional (and maybe nested) validation sets, it is inevitably exposed to the problems mentioned above, and can thus be at a disadvantage with respect to other methods that do not require additional validation data. Table 1shows a complete description of the datasets we use (after deleting rare classes), along with some useful statistics proposed in [ 48 , 70 ], while Figure 4shows the distribution of prevalence values for each dataset. Note that, in most datasets, this distribution obeys a power law. We set the parameters of the ML-APP for generating test samples (see Section 4) as follows. We fix the sample size to 𝑘= 100 in all cases. We set the grid of prevalence values to g = { 0 . 00 , 0 . 01 , . . . , 0 . 99 , 1 . 00 } in all cases but for dataset Delicious , since in this latter the number of combinations thus generated would be intractable, given that this is dataset with no fewer than 983 classes; for Delicious we use the coarser-grained grid g ={ 0 . 00 , 0 . 05 , . . . , 0 . 95 , 1 . 00 } . We set 𝑚 (the number of samples to be drawn for each prevalence value) independently for each dataset, to the smallest number that yields more than 10,000 test samples ( 𝑚 ranges from 1 in Delicious to 40 in Birds). We break down the results into three groups, each corresponding to a different amount of shift. The rationale behind this choice is to allow for a more meaningful analysis of the quantifiers’ performance, since the APP (and, by extension, the ML-APP) has often been the subject of criticism for generating samples exhibiting degrees of shift that are judged unrealistic and unlikely to occur in real cases [ 16 , 25 ]. We instead believe that general-purpose quantification methods should be tested in widely varying situations, from low-shift to high-shift ones, and we thus prefer to test all such scenarios, but split the corresponding results into groups characterized by of more or less homogeneous amounts of shift. More specifically, for each test sample generated via the ML-APP, we compute its prior probability shift with respect to the training set in terms of AE between the vectors of training and test class prevalence values. We then bring together all the resulting shift values and split the range of such values in three equally-sized intervals (that we dub low shift,mid shift, and high shift). The accuracy values we report are thus not averages across the same number of experiments, since the ML-APP often tends to generate more samples in the low-shift region than samples in the mid-shift region 6See also http://mlkd.csd.auth.gr/multilabel.html#Datasets and http://mulan.sourceforge.net/datasets-mlc.html 7https://scikit-learn.org/stable/index.html 8https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:19 Table 1. Description of the datasets. Columns #Classes, #Train, and #Test indicate the number of classes, training datapoints, and test datapoints, respectively. Label cardinality (Card) reports the mean number of labels per datapoint. Label density (Dens) is the result of dividing the label cardinality by the total number of labels. Label diversity (Div) is the number of unique labelsets that are present in the dataset. Normalised label diversity (NormDiv) reports the ratio between label diversity and the total number of labels. The proportion of unique label combinations (PUniq) is the total number of labelsets that are unique in the dataset, divided by the number of examples. PMax reports the ratio of datapoints with the most frequent labelset divided by the total number of datapoints. Dataset #Classes #Train #Test #Features Card Dens Div NormDiv PUniq PMax Emotions 6 391 202 72 1.868 0.311 27 4.500 0.010 0.207 Scene 6 1211 1196 294 1.074 0.179 15 2.500 0.002 0.334 Yeast 14 1500 917 103 4.237 0.303 198 14.143 0.051 0.158 Birds 17 322 323 260 0.991 0.058 124 7.294 0.205 0.932 Genbase 18 463 199 1186 1.219 0.068 23 1.278 0.006 0.369 Medical 18 333 645 1449 1.135 0.063 50 2.778 0.033 0.495 Tmc2007_500 22 21519 7077 500 2.220 0.101 1172 53.273 0.019 0.115 Ohsumed 23 24061 10328 18238 1.657 0.072 1901 82.652 0.041 0.120 Enron 45 1123 579 1001 3.357 0.075 734 16.311 0.491 0.147 Reuters21578 72 9603 3299 8250 1.029 0.014 447 6.208 0.028 0.409 RCV1-v2 98 23149 781265 24816 3.199 0.033 14820 151.224 0.345 2.323 Mediamill 100 30993 12914 120 4.374 0.044 6548 65.480 0.132 0.076 Bibtex 159 4880 2515 1836 2.402 0.015 2856 17.962 0.451 0.097 Corel5k 292 4500 500 499 3.480 0.012 3113 10.661 0.543 0.012 Delicious 983 12920 3185 500 19.020 0.019 15806 16.079 1.211 0.001 0 0.2 0.4 0 0.5 0 0.05 0.1 0 0.1 0.2 0 0.2 0.4 0 0.2 0 0.5 0 0.1 0.2 0 0.2 0.4 0 0.2 0 0.2 0.4 0 0.1 0.2 0 0.5 0 0.1 0.2 0 0.1 0.2 RCV1-v2 Mediamill Bibtex Corel5k Delicious Medical tmc2007_500 Ohsumed Enron Reuters-21578 Emotions Scene Yeast Birds Genbase class prevalence values Fig. 4. Histograms of class prevalence values, one per dataset, sorted from highly populated datasets to lowly populated ones; values on the 𝑥 axis indicate intervals [𝛼𝑘, 𝛽𝑘] of class prevalence values, while values on the 𝑦axis indicate the fraction of classes in the dataset that have prevalence values in the [𝛼𝑘, 𝛽𝑘]interval. and (above all) in the high-shift region. The number of samples, as well as the distribution of shift values, depends on each dataset. Figure 5shows the distributions of shift values that the ML-APP generates (blue) along with the distributions of shift values that we would obtain via uniform sampling (red). Note that the ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:20 Moreo et al. ML-APP succeeds in generating larger amounts of shift, and that most of the samples generated via uniform sampling would fall within what we call the “low shift” region. protocol app npp RCV1-v2 Mediamill Bibtex Corel5k Delicious Medical tmc2007_500 Ohsumed Enron Reuters-21578 Emotions Scene Yeast Birds Genbase .091 .104 .081 .023 .020 .034 .054 .039 .026 .020 .031 .031 .016 .008 .014 .170 .201 .152 .036 .033 .061 .097 .067 .042 .036 .055 .054 .025 .010 .021 Fig. 5. Shifts generated via the proposed ML-APP (blue) and via uniform sampling (red), as computed in terms of AE between the training set and the test samples. 6.3 Testing Instances of the Four Types of Multi-Label Quantification Methods The goal of this section is to provide an answer to the question: “Which among the four groups of multi-label quantification methods tends to perform best?” To this aim, we choose one representative instance from each group, and carry out the experiments using all the datasets. We perform this choice by combining the following components: • As the binary classification method, we choose logistic regression (LR), and use the implementation of it available from scikit-learn. 9 We consider LR a good choice, given that it is a probabilistic classifier that already provides fairly well calibrated posterior probabilities (which is of fundamental importance in PCC, PACC, and SLD), and given that, as indicated by previously reported results [ 41 ], it tends to perform well. A set of LR classifiers are used when testing the binary relevance (BR) method described in Section 3.2.2. • As the multi-label classification method, we adopt stacked generalization [ 67 ] (SG – see Section 3.2.3). We use our own implementation (since the implementation of stacked generalization available from scikit-learn only caters for the single-label case) 10 , that relies on 5-fold cross-validation to generate the intermediate representations (in the form of posterior probabilities) given as input to the meta-learner, concatenated with the original input features. The base members of the ensemble consist of binary logistic regression classifiers as implemented in scikit-learn. • As the binary aggregation method Q, we experiment with all the methods covered in Section 5.1, i.e., CC, PCC, ACC, PACC, SLD. For all these methods we use the implementations made available in the QuaPy open-source library [41].11 • As the multi-label aggregation method, we use the regressor-based strategy for quantification (that we dub RQ) described in Section 5.2.1. We implement this method as part of the QuaPy framework. For training the base quantifier 𝑞 we experiment again with all the 9https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html 10https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.StackingClassifier.html 11https://github.com/HLT-ISTI/QuaPy ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:21 methods covered in Section 5.1, i.e., CC, PCC, ACC, PACC, SLD, while as the internal regressor which receives its input from the base quantifier 𝑞 we use linear support vector regression (SVR), for which we use the scikit-learn implementation. 12 As the held-out validation set 𝐿𝑅 needed for training the regressor we use a set consisting of 40% of the training datapoints, chosen via iterative stratification [ 55 , 59 ] as implemented in scikit-multilearn. 13 We call this aggregation method SVR-RQ. The methods we use in this experiment thus amount to the combinations illustrated in Table 2. Table 2. Methods we use as instances of the four types of methods illustrated in Figure 2. Type Classification Aggregation BC+BA LR Q∈{CC,PCC,ACC,PACC,SLD} MLC+BA SG Q∈{CC,PCC,ACC,PACC,SLD} BC+MLA LR Q∈{CC,PCC,ACC,PACC,SLD} + SVR-RQ MLC+MLA SG Q∈{CC,PCC,ACC,PACC,SLD} + SVR-RQ Following [ 42 ], we perform model selection by using, as the loss function to minimize, a quantification-oriented error measure (and not a classification-oriented one), and by adopting the same protocol used for the evaluation of our quantifiers. That is, model selection is carried out by first splitting the training set 𝐿 into two disjoint sets, i.e., (a) a proper training set 𝐿tr and (b) a held-out validation set 𝐿va consisting of 40% of the labelled datapoints. For splitting the training set, we again rely on the iterative stratification routine of scikit-multilearn (see Footnote 1). We use 𝐿tr to train the quantifiers with different combinations of hyperparameters, while from 𝐿va we extract, via the ML-APP, validation samples on which we assess, via AE (the same measure we use in the evaluation phase), the quality of the hyperparameter combinations. We explore the hyperparameters via grid-search optimization, and use the best configuration to retrain the quantifier on the entire training set 𝐿 after model selection. During the model selection phase, for the ML-APP we use the same parameters 𝑘 and gthat we use in the test phase, but we reduce the number of repetitions 𝑚 to 5 in the datasets with fewer than 90 classes, and to 1 in the other datasets, in order to keep the computational burden under reasonable bounds. The hyperparameters we explore for LR include 𝐶 , the inverse of the regularization strength, in the range { 10 −1, 10 0, 10 1, 10 2, 10 3} , and ClassWeight, which takes values in Balanced (which reweights the importance of the examples so as to equate the overall contribution of each class) or None (which gives the same weight to all datapoints, irrespectively of the prevalence of the class they belong to). In cases in which the class-specific classifiers are independent of each other (i.e., for methods belonging to the BC+BA and BC+MLA types) we optimize the hyperparameters independently for each class. For SG, we only optimize the hyperparameters of the meta-classifier, leaving the hyperparameters of the base members to their default values. In particular, we explore the parameters 𝐶 and ClassWeight as before, plus the hyperparameter Normalize, which takes values in True (which has the effect of standardizing the inputs of the meta-classifier so that every dimension has zero mean and unit variance) and False (which does not standardize the inputs). For RQ we only explore the regularization hyperparameter 𝐶 in the range { 10 −1, 10 0, 10 1, 10 2, 10 3} . Note that the base quantifiers (i.e., CC, PCC, ACC, PACC, SLD) have no specific internal hyperparameters to be tuned. 12https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVR.html 13http://scikit.ml/stratification.html ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:22 Moreo et al. The results we have obtained for the different choices of the base quantifier are reported in Table 3for CC, Table 4for PCC, Table 5for ACC, Table 6for PACC, and Table 7for SLD. The results clearly show (see especially the last two rows of each table) that there is an ordering BC+BA ≺ MLC+BA ≺ BC+MLA ≺ MLC+MLA, in which ≺ means “performs worse than”, which holds, independently of the base quantifier of choice, in almost all cases. The same experiments also indicate that there is a substantial improvement in performance that derives from simply replacing the binary classifiers with one multi-label classifier (moving from BC+BA to MLC+BA or from BC+MLA to MLC+MLA), i.e., from bringing to bear the class-class correlations at the classification stage, and that there is an equally substantial improvement when binary aggregation is replaced by multi-label aggregation (switching from BC+BA to BC+MLA or from MLC+BA to MLC+MLA), i.e., when the class-class correlations are exploited at the aggregation stage. What also emerges from these results is that, consistently with the above observations, the best-performing group of methods is MLC+MLA, i.e., methods that explicitly take class dependencies into account both at the classification stage and at the aggregation stage. Note that methods that learn from the stochastic correlations among the classes perform much better than methods that do not, even in the low shift regime. Overall, the best-performing method on average is MLC+MLA when equipped with PCC as the base quantifier. The reader might wonder why we do not use as a baseline the system presented in the only paper in the literature that tackles multi-label quantification, i.e., [ 33 ]. There are several reasons for this: (a) the authors do not make the code available; (b) the method is, as already discussed in Section 3.1, computationally expensive, and as a result the authors test it on a single dataset whose codeframe consists of 16 classes only; using this method on our 15 datasets, whose codeframes count up to 983 classes, and 125 classes on average, would be prohibitive; (c) the method is essentially a calibration strategy for binary classification, which means that it falls in the group of “naive” BC+BA methods since it does not tackle at all, as already mentioned in Section 3.1, the multi-label nature of the MLQ problem. As a final remark, something that jumps to the eye is that “long-tailed datasets” (i.e., datasets whose label distribution presents a long and thin tail), such as Delicious , Corel5K , and Bibtex (see Figure 4), tend to give rise to lower error values than “short-tailed” ones (i.e., datasets whose label distribution presents a short and thick tail), like Emotions and Scene ; see, e.g., Table 4. This might seem unexpected, since we know from multi-label classification that rare classes are harder and thus tend to penalize the overall accuracy results, especially when these latter are computed by averaging accuracy scores across the classes (as in “macroaveraged 𝐹1 ” – this is different from “microaveraged 𝐹1”, which is obtained by averaging across all the classification decisions). However, the lower error figures we observe for long-tailed datasets can instead be explained by the fact that samples generated from these datasets are, on average, simpler to tackle for quantification algorithms. The reason is that rare classes limit the amount of drift that the ML-APP can generate out of them (recall that we avoid producing samples containing duplicate instances – see Section 4). Obviously, small variations in prevalence values between training set and test sample imply easier prediction problems, hence lower absolute error on average. However, this behavior is not due to a flaw of the ML-APP since, as shown in Figure 5, the ML-APP succeeds in generating interesting amounts of drift. Actually, the seeming simplicity of rare classes is only true under the lens of AE. Other evaluation measures tell a different story; see, for example, how the error figures displayed in terms of RAE (Tables 12-16 in the appendix) are by and large comparable for all these datasets. In the following sections, we turn to explore other instances of methods of the four groups in Figure 2beyond the ones we choose in Table 2. ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:23 Table 3. Values of AE obtained in our experiments for different amounts of shift using CC as the base quantifier. The number of test samples generated for each dataset exceeds 10,000, though there is a variable number of samples allocated in each region of shift. Boldface indicates the best method for a given dataset and shift region. Superscripts † and ‡ denote the methods (if any) whose scores are not statistically significantly different from the best one according to a Wilcoxon signed-rank test at different confidence levels: symbol † indicates 0.001 <𝑝 -value < 0.05 while symbol ‡ indicates 0.05 ≤𝑝 -value. For ease of readability, for each pair {dataset, shift} we colour-code cells via intense green for the best result, intense red for the worst result, and an interpolated tone for the scores in-between. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions .0749 .0626 .0478 .0644 .0838 .0776 .0598 .0848 .0967 .0899 .0616 .1039 Scene .0754 .0558 .0458 .0349 .0908 .0759 .0553 .0508 .1110 .0966 .0609 .0668 Yeast .1481 .1119 .0511 .0516†.1644 .1397 .0879 .0958 .1919 .1754 .1272 .1403 Birds .0229 .0243 .0191 .0202 .0258 .0276 .0255 .0264 .0293 .0331 .0371 .0357 Genbase .0003 .0006 .0016 .0007 .0003 .0006 .0018 .0007 .0003 .0005 .0017 .0006 Medical .0182 .0121 .0175 .0121 .0183 .0130 .0206 .0130 .0174 .0141 .0230 .0141 tmc2007_500 .0700 .0333 .0222 .0214 .0758 .0464 .0313 .0278 .0651 .0468 .0333 .0320 Ohsumed .0338 .0184 .0198 .0176 .0395 .0252 .0246 .0236 .0457 .0303 .0270 .0272‡ Enron .0239 .0207 .0172 .0198 .0274 .0247 .0228 .0245 .0280 .0253 .0254‡.0265 Reuters-21578 .0067 .0035 .0055 .0036 .0120 .0056 .0081 .0058 .0291 .0071 .0113 .0075 RCV1-v2 .0198 .0081 .0101 .0083 .0251 .0118 .0162 .0122 .0360 .0176 .0240 .0192 Mediamill .1390 .0236 .0159 .0155 .1488 .0341 .0252 .0247 .1690 .0476 .0322 .0310 Bibtex .0137 .0097 .0093 .0096 .0150 .0111 .0117 .0113 .0177 .0120 .0131 .0124 Corel5k .0357 .0093 .0082 .0082 .0363 .0097 .0087 .0092 .0371 .0100 .0099 .0095 Delicious .1037 .0116 .0096 .0094 .1036 .0134 .0113‡.0112 .0904 .0128 .0109 .0110‡ Average .0492 .0237 .0180 .0177 .0555 .0358 .0288 .0295 .0757 .0576 .0433 .0483 Rank Average 3.7 2.5 2.0 1.8 3.5 2.4 2.1 1.9 3.5 2.1 2.3 2.1 6.4 Testing Additional Instances of MLC+BA In this section we explore other methods relying on different multi-label classifiers, with the aim of studying the extent to which the results we have obtained in the previous experiments depend on the choice of the classifier being employed. To this aim, we focus on the MLC+BA group of methods, so that the aggregation stage plays only a minimal role. As a quantification method we adopt PCC, since this is the base quantifier that has yielded the best performance overall in the experiments of Section 6.3. The methods we study here thus consist of genuinely multi-label classifiers that generate posterior probabilities, where the latter are then aggregated by computing the expected value for each class. The aim of this experiment is not to provide an exhaustive evaluation of existing multi-label classifiers, but rather to study other MLC+BA configurations in action, and hopefully pinpoint interesting performance trends. With this in mind, we choose some representative instances from the main families of multilabel classifiers discussed in Section 3. The multi-label classifiers we consider here include (a) classifier chains (CChains) 14 as representative of the family of “problem transformation” methods (Section 3.2.1); (b) multi-label versions of KNN (ML-knn), 15 decision trees (DT), 16 and random 14 https://scikit-learn.org/stable/modules/generated/sklearn.multioutput.ClassifierChain.html#sklearn.multioutput. ClassifierChain 15http://scikit.ml/api/skmultilearn.adapt.mlknn.html 16https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:24 Moreo et al. Table 4. Values of AE obtained in our experiments for different amounts of shift using PCC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions .0418 .0420 .0586 .0474 .0685 .0654 .0720 .0564 .0923 .0857 .0951 .0664 Scene .0842 .0362 .0384 .0323 .1140 .0827 .0459 .0445 .1427 .1221 .0499 .0589 Yeast .1756 .0444 .0480 .0472 .1900 .0992 .0913 .0845 .2206 .1549 .1361 .1226 Birds .0286 .0208 .0181 .0213 .0328 .0246 .0243 .0288 .0440 .0321 .0351 .0404 Genbase .0011 .0005 .0022 .0007 .0011 .0005 .0025 .0007 .0010 .0005 .0023 .0006 Medical .0127 .0138 .0191 .0120 .0146 .0156 .0279 .0136 .0169 .0183 .0351 .0160 tmc2007_500 .1108 .0193 .0213 .0186 .1154 .0331 .0292 .0231 .1008 .0399 .0321 .0255 Ohsumed .1004 .0177 .0183 .0168 .1087 .0262 .0209 .0238 .1177 .0321 .0215 .0284 Enron .0347 .0161 .0169 .0185 .0397 .0235 .0227 .0228†.0439 .0287 .0253 .0246 Reuters-21578 .0167 .0036 .0049 .0037 .0243 .0059 .0070 .0060 .0370 .0075 .0088 .0078 RCV1-v2 .0456 .0084 .0093 .0084 .0533 .0129†.0146 .0128 .0654 .0198 .0215 .0201 Mediamill .1697 .0154 .0157 .0148 .1736 .0285 .0251 .0231 .1806 .0401 .0322 .0285 Bibtex .0354 .0091 .0092 .0093 .0374 .0126 .0116 .0120 .0423 .0152 .0129 .0142 Corel5k .0582 .0077 .0075 .0066 .0585 .0083 .0082 .0074 .0594 .0089 .0087 .0085 Delicious .1420 .0088 .0093 .0084 .1417 .0117 .0109 .0098 .1238 .0119 .0104 .0092 Average .0677 .0158 .0177 .0160 .0761 .0312 .0288 .0261 .1012 .0602 .0452 .0414 Rank Average 3.6 1.7 2.9 1.8 3.7 2.5 2.3 1.5 3.7 2.4 2.3 1.5 Table 5. Values of AE obtained in our experiments for different amounts of shift using ACC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions .1060 .1279 .0626 .0440 .1367 .1487 .0732 .0551 .1608 .1602 .1125 .0750 Scene .0537 .0436 .0456 .0361 .0626 .0601 .0512 .0513‡.0615 .0603‡.0596 .0711 Yeast .1937 .1765 .0506 .0531 .2164 .2191 .0896 .0957 .2301 .2620 .1204 .1480 Birds .1542 .1353 .0233 .0278 .1526 .1384 .0286 .0307 .1547 .1472 .0359 .0391 Genbase .0014 .0007 .0036 .0006 .0014 .0007 .0039 .0007‡.0013 .0006‡.0037 .0006 Medical .0212 .0307 .0187 .0183 .0189 .0329 .0259 .0248 .0153 .0329 .0311 .0294 tmc2007_500 .0366 .0365 .0220 .0222 .0612 .0581 .0302 .0278 .0647 .0591 .0339 .0315 Ohsumed .0253 .0241 .0198 .0180 .0320 .0292 .0228†.0226 .0407 .0337 .0239 .0263 Enron .1810 .0935 .0187 .0207 .1882 .0982 .0243 .0272 .1853 .1043 .0269 .0339 Reuters-21578 .0307 .0074 .0055 .0065 .0336 .0121 .0078 .0096 .0421 .0254 .0104 .0123 RCV1-v2 .0124 .0217 .0099 .0106 .0189 .0259 .0158 .0167 .0287 .0335 .0246 .0269 Mediamill .0539 .0425 .0164 .0163 .0976 .0539 .0246 .0274 .1467 .0647 .0316 .0374 Bibtex .0692 .0816 .0102 .0107 .0734 .0858 .0125 .0152 .0861 .0903 .0146 .0196 Corel5k .1515 .0173 .0081 .0062 .1537 .0158 .0089 .0076 .1509 .0149 .0099 .0094 Delicious .0846 .0528 .0097 .0093 .1000 .0531 .0111 .0110 .1016 .0492 .0106 .0109† Average .0750 .0558 .0193 .0182 .0841 .0716 .0302 .0296 .0901 .0808 .0482 .0495 Rank Average 3.7 3.1 1.7 1.5 3.5 3.2 1.7 1.7 3.5 3.1 1.5 1.9 forests (RF) 17 as representatives of the family of “algorithm adaptation” methods (Section 3.2.2); 17 https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble. RandomForestClassifier.fit ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:25 Table 6. Values of AE obtained in our experiments for different amounts of shift using PACC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions .1326 .0715 .0509 .0516 .1451 .1049 .0659 .0633 .1578 .1485 .1101 .0872 Scene .0508 .0379 .0391 .0310 .0697 .0498 .0433 .0441 .0757 .0499‡.0496 .0645 Yeast .1654 .1436 .0489 .0494 .2122 .1803 .0878 .0837 .2474 .2053 .1316 .1264 Birds .1253 .1290 .0191 .0227 .1243 .1286 .0244 .0282 .1250 .1173 .0377 .0434 Genbase .0018 .0010 .0041 .0016 .0018 .0010 .0043 .0015 .0018 .0010 .0041 .0015 Medical .0395 .0272 .0169 .0161 .0477 .0276 .0204 .0222 .0484 .0267 .0286†.0286 tmc2007_500 .0351 .0285 .0213 .0192 .0617 .0454 .0281 .0236 .0619 .0466 .0320 .0275 Ohsumed .0239 .0221 .0189 .0179 .0345 .0285 .0205 .0234 .0452 .0332 .0216 .0278 Enron .1433 .1429 .0198 .0201 .1618 .1539 .0243†.0239 .1504 .1693 .0275 .0253 Reuters-21578 .0086 .0465 .0053 .0054 .0311 .0519 .0076 .0087 .0643 .0619 .0113 .0117 RCV1-v2 .0173 .0130 .0098 .0093 .0334 .0228 .0159 .0148 .0505 .0342 .0243 .0232 Mediamill .0482 .0466 .0158†.0158 .0941 .0779 .0237 .0235 .1387 .1076 .0299 .0300‡ Bibtex .0320 .0218 .0099 .0100 .0459 .0387 .0121 .0133 .0684 .0662 .0140 .0161 Corel5k .1519 .1014 .0107 .0111 .1559 .1087 .0112‡.0112 .1711 .1221 .0120 .0116 Delicious .0594 .0480 .0094 .0092 .0837 .0828 .0107 .0105 .0871 .0914 .0101†.0099 Average .0646 .0561 .0181 .0175 .0823 .0701 .0279 .0276 .0958 .0782 .0463 .0467† Rank Average 3.8 2.9 1.7 1.5 3.8 3.0 1.7 1.5 3.8 2.8 1.7 1.7 Table 7. Values of AE obtained in our experiments for different amounts of shift using SLD as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions .2169 .0549 .0710 .0509 .2189 .0719 .0791 .0652 .2088 .0890 .0822 .0717 Scene .0407 .0433 .0337 .0424 .0467 .0753 .0497 .0709 .0487 .1012 .0628 .0881 Yeast .2557 .0948 .0511 .0500 .2607 .1192 .0889 .0827 .2939 .1438 .1362 .1171 Birds .0759 .0284 .0196 .0281 .0819 .0312 .0255 .0312 .1089 .0355†.0358†.0351 Genbase .0011 .0004 .0039 .0005 .0011 .0003 .0042 .0005 .0010 .0003 .0041 .0005 Medical .0233 .0133 .0190 .0129 .0211 .0135 .0263 .0131 .0189 .0133 .0312 .0132 tmc2007_500 .0384 .0248 .0202 .0187 .0526 .0407 .0285 .0230 .0546 .0432 .0330 .0228 Ohsumed .0294 .0186 .0173 .0185 .0316 .0232 .0189 .0232 .0321 .0250 .0200 .0250 Enron .0918 .0208 .0183 .0182 .0915 .0253 .0238 .0243 .0838 .0261†.0258 .0263† Reuters-21578 .0050 .0039 .0048 .0040 .0177 .0055 .0079 .0056 .0956 .0088 .0112 .0083 RCV1-v2 .0109 .0089 .0090†.0088 .0185 .0110 .0151 .0113 .0340 .0173 .0261 .0178 Mediamill .2040 .0237 .0151 .0145 .2204 .0444 .0238 .0223 .2481 .0695 .0308 .0282 Bibtex .0819 .0103 .0100 .0101 .0919 .0116†.0137 .0116 .1084 .0128‡.0183 .0127 Corel5k .1043 .0098 .0140 .0178 .1041 .0101 .0145 .0177 .1043 .0099 .0155 .0182 Delicious .1406 .0137 .0095 .0100 .1511 .0155 .0110 .0114 .1345 .0155 .0106 .0108‡ Average .0842 .0219 .0189 .0182 .0862 .0346 .0296 .0285 .0957 .0562 .0466 .0459 Rank Average 3.8 2.5 2.1 1.7 3.7 2.3 2.3 1.8 3.7 2.3 2.3 1.7 and (c) CLEMS 18 and label space clustering (LSC) 19 as representatives of the family of “ensemble” methods (Section 3.2.3). For the sake of comparison, we also include stacked generalization (SG – 18http://scikit.ml/api/skmultilearn.embedding.clems.html 19This was implemented by combining different classes from scikit-multilearn. ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:32 Moreo et al. [51] Tetsuya Sakai. 2021. A closer look at evaluation measures for ordinal quantification. In Proceedings of the CIKM 2021 Workshop on Learning to Quantify. Virtual Event. [52] Robert E. Schapire and Yoram Singer. 2000. BoosTexter: A boosting-based system for text categorization. Machine Learning 39, 2/3 (2000), 135–168. [53] Tobias Schumacher, Markus Strohmaier, and Florian Lemmerich. 2021. A comparative evaluation of quantification methods. https://doi.org/[cs.LG] arXiv:2103.03223. [54] Fabrizio Sebastiani. 2020. Evaluation measures for quantification: An axiomatic approach. Information Retrieval Journal 23, 3 (2020), 255–288. https://doi.org/10.1007/s10791-019-09363-y [55] Konstantinos Sechidis, Grigorios Tsoumakas, and Ioannis Vlahavas. 2011. On the stratification of multi-label data. In Proceedings of the European Conference on Machine Learning and Knowledge Discovery in Databases (ECML/PKDD 2011). Athens, GR, 145–158. https://doi.org/10.1007/978-3-642-23808-6_10 [56] Newton Spolaôr, Everton A. Cherman, Maria C. Monard, and Huei D. Lee. 2013. A comparison of multi-label feature selection methods using the problem transformation approach. Electronic Notes in Theoretical Computer Science 292 (2013), 135–151. https://doi.org/10.1016/j.entcs.2013.02.010 [57] Amos Storkey. 2009. When training and test sets are different: Characterizing learning transfer. In Dataset shift in machine learning, Joaquin Quiñonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D. Lawrence (Eds.). The MIT Press, Cambridge, US, 3–28. [58] Piotr Szymanski and Tomasz Kajdanowicz. 2017. A scikit-based Python environment for performing multi-label classification. arXiv:1702.01460 [cs.LG]. [59] Piotr Szymański and Tomasz Kajdanowicz. 2017. A network perspective on stratification of multi-label data. In Proceedings of the 1st International Workshop on Learning with Imbalanced Domains: Theory and Applications (LIDTA 2017). Skopje, MK, 22–35. [60] Piotr Szymański, Tomasz Kajdanowicz, and Kristian Kersting. 2016. How is a data-driven approach better than random choice in label space division for multi-label classification? Entropy 18, 8 (2016), 282. https://doi.org/10.3390/e18080282 [61] S.A.A. Taqvi, H. Zabiri, F. Uddin, M. Naqvi, L.D. Tufa, M. Kazmi, S. Rubab, S.R. Naqvi, and A.S. Maulud. 2022. Simultaneous fault diagnosis based on multiple kernel support vector machine in nonlinear dynamic distillation column. Energy Science and Engineering 10, 3 (2022), 814–839. https://doi.org/10.1002/ese3.1058 [62] Grigorios Tsoumakas and Ioannis Katakis. 2007. Multi-label classification: An overview. International Journal of Data Warehousing and Mining 3, 3 (2007), 1–13. [63] Grigorios Tsoumakas, Ioannis Katakis, and Ioannis Vlahavas. 2008. Effective and efficient multilabel classification in domains with large number of labels. In Proceedings of the ECML/PKDD 2008 Workshop on Mining Multidimensional Data (MMD 2008). Antwerp, BE, 53–59. [64] Grigorios Tsoumakas, Ioannis Katakis, and Ioannis Vlahavas. 2011. Random k-labelsets for multilabel classification. IEEE Transactions on Knowledge and Data Engineering 23, 7 (2011), 1079–1089. https://doi.org/10.1109/TKDE.2010.164 [65] Celine Vens, Jan Struyf, Leander Schietgat, Saso Dzeroski, and Hendrik Blockeel. 2008. Decision trees for hierarchical multi-label classification. Machine Learning 73, 2 (2008), 185–214. https://doi.org/10.1007/s10994-008-5077-3 [66] Tong Wei and Yu-Feng Li. 2020. Does tail label help for large-scale multi-label learning? IEEE Transactions On Neural Networks and Learning Systems 31, 7 (2020), 2315–2324. https://doi.org/10.1109/TNNLS.2019.2935143 [67] David H. Wolpert. 1992. Stacked generalization. Neural Networks 5, 2 (1992), 241–259. https://doi.org/10.1016/s0893- 6080(05)80023-1 [68] Bianca Zadrozny and Charles Elkan. 2002. Transforming classifier scores into accurate multiclass probability estimates. In Proceedings of the 8th ACM International Conference on Knowledge Discovery and Data Mining (KDD 2002). Edmonton, CA, 694–699. https://doi.org/10.1145/775107.775151 [69] Min-Ling Zhang and Zhi-Hua Zhou. 2007. Ml-KNN: A lazy learning approach to multi-label learning. Pattern Recognition 40, 7 (2007), 2038–2048. [70] Min-Ling Zhang and Zhi-Hua Zhou. 2014. A review on multi-label learning algorithms. IEEE Transactions on Knowledge and Data Engineering 26, 8 (2014), 1819–1837. https://doi.org/10.1109/TKDE.2013.39 [71] Qian-Wen Zhang, Ximing Zhang, Zhao Yan, Ruifang Liu, Yunbo Cao, and Min-Ling Zhang. 2021. Correlation-guided representation for multi-label text classification. In Proceedings of the 30th International Joint Conference on Artificial Intelligence (IJCAI 2021). Montreal, CA, 3363–3369. https://doi.org/10.24963/ijcai.2021/463 A EVALUATION IN TERMS OF RELATIVE ABSOLUTE ERROR While the tables presented in the main body of the paper report the results of our experiments in terms of the absolute error (AE) measure, in this section we present, for the sake of completeness, the results in terms of relative absolute error (RAE). We do not comment on these results since the ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:33 Table 12. Values of RAE obtained in our experiments for different amounts of shift using CC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions 0.1728 0.1463 0.1163 0.1529 0.3138 0.3180 0.2872 0.3523 0.4024 0.4225 0.3575 0.5395 Scene 0.3509 0.2647 0.1803 0.1464 0.5922 0.4659 0.3044 0.2490 2.7287 2.2747 1.2898 1.3553‡ Yeast 0.7124 0.4604 0.2163 0.2254 0.7935 0.5856 0.3626 0.4000 1.2682 1.0984 0.9905 1.0610 Birds 0.2981 0.3766 0.2842 0.3129 0.3435 0.4379 0.3649 0.3867 0.4039 0.4758 0.4244 0.4159† Genbase 0.0088 0.0254 0.0718 0.0273 0.0101 0.0270 0.0755 0.0288 0.0088 0.0257 0.0704 0.0275 Medical 0.2073 0.1402 0.3248 0.1403 0.2052 0.1673 0.4483 0.1673 0.2908 0.3065†0.6873 0.3065† tmc2007_500 1.1568 0.2116 0.2620 0.2351 1.2240 0.2924 0.3263 0.2779 1.1152 0.4701 0.4691 0.3989 Ohsumed 0.5071 0.1982 0.2452 0.1887 0.5857 0.2527 0.3014 0.2387 0.7796 0.4588 0.4709 0.4353 Enron 0.3524 0.3099 0.3068 0.2732 0.4227 0.3670 0.3920 0.3345 0.6222 0.5026 0.5554 0.4635 Reuters-21578 0.2352 0.0858 0.1433 0.0911 0.2315 0.0987 0.1676 0.1051 0.2648 0.0949 0.1697 0.1054 RCV1-v2 0.5356 0.1513 0.1979 0.1523 0.6071 0.1915 0.2997 0.2015 0.7414 0.3032 0.5434 0.3291 Mediamill 6.4321 0.2278 0.2798 0.2703 7.2338 0.2792 0.3815 0.3745 7.9048 0.5052 0.5427 0.5363 Bibtex 0.5653 0.3249 0.3501 0.3220 0.4882 0.2830 0.3349 0.2833‡0.4091 0.2313 0.3320 0.2401 Corel5k 1.3528 0.2474‡0.2471 0.2643 1.4460 0.2522 0.2588 0.2923 1.6125 0.2798 0.3262 0.3444 Delicious 4.9852 0.3564 0.3032 0.3043 5.3796 0.4033 0.3431 0.3449‡5.0129 0.4246 0.3745 0.3805† Average 1.2509 0.2301 0.2380 0.2083 1.1155 0.2916 0.3085 0.2665 1.4849 0.7943 0.6530 0.6209 Rank Average 3.6 2.1 2.3 2.0 3.4 2.0 2.5 2.1 3.3 2.1 2.5 2.1 Table 13. Values of RAE obtained in our experiments for different amounts of shift using PCC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions 0.3105 0.1720 0.1297 0.1318 0.4089 0.2945 0.3116 0.2812 0.4459 0.4191 0.6205 0.4639 Scene 0.2023 0.1416 0.1530 0.1332 0.4292 0.2893 0.2266 0.2171 1.7304 1.1136‡1.1121 1.3674 Yeast 1.4781 0.8704 0.2080 0.2024 2.0566 1.0807 0.3571 0.3319 2.9340 1.4858 1.0029 0.9498 Birds 3.4391 3.7460 0.2908 0.2730 3.5060 3.7643 0.3516 0.3316 3.3622 2.7057 0.4570 0.4704† Genbase 0.0376 0.0228 0.1290 0.0378 0.0376 0.0243 0.1466 0.0401 0.0360 0.0250 0.1497 0.0422 Medical 0.8565 0.5073 0.2812 0.2437 1.2243 0.5253 0.4063 0.3556 2.0092 0.6634‡0.8955 0.6556 tmc2007_500 0.3455 0.2420 0.2443 0.1987 0.5268 0.3260 0.3092 0.2507 0.4738 0.3160 0.4486 0.4338 Ohsumed 0.2628 0.2192 0.2356 0.1689 0.3865 0.2698 0.2784 0.2200 0.5300 0.3342 0.4005 0.4537 Enron 5.5524 5.4773 0.3640 0.3452 6.6795 5.7874 0.4409 0.4329 6.3135 7.0035 0.6331 0.5825 Reuters-21578 0.4275 3.9328 0.1359 0.1292 1.7934 3.9820 0.1844 0.1687 2.6267 3.9425 0.2238 0.1942 RCV1-v2 0.5285 0.4427 0.1824 0.1652 1.0813 0.8803 0.3071 0.2816 1.5968 1.2673 0.5635 0.5201 Mediamill 1.8713 1.8111 0.2798 0.2833 3.4939 2.6875 0.3841 0.3854‡4.6897 3.2192 0.5216 0.5511 Bibtex 1.3104 0.7556 0.3709 0.3102 1.4016 1.0460 0.3695 0.3492 1.4682 1.3451 0.3970 0.4261† Corel5k 9.8431 6.2210 0.3989 0.3997‡10.3929 6.6651 0.4224 0.4054 12.0719 7.4614 0.5075 0.4682 Delicious 3.2613 2.5366 0.3042 0.2875 4.2250 4.1529 0.3396 0.3240 4.1574 4.4159 0.3677 0.3478 Average 2.0194 1.8966 0.2510 0.2252 1.9582 1.6894 0.3134 0.2791 2.0662 1.4948 0.6694 0.6728 Rank Average 3.7 2.8 2.1 1.3 3.7 2.9 2.2 1.2 3.5 2.5 2.1 1.8 trends that emerge from them are essentially the same as for the AE measure. Tables 12,13,14,15, 16,17,18, are the RAE equivalents of Tables 3,4,5,6,7,9,11, respectively B EXPLORING OTHER REGRESSORS IN RQ We here report additional experiments that extend the ones presented in Section 6.5; the present experiments concern the use of regression algorithms other than ridge regression (Ridge-RQ), random forest regression (RF-RQ), and linear SVR (SVR-RQ), which were the only regression algorithms we considered in Section 6.5. Tables 19 and 20 report the results of these experiments in ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:34 Moreo et al. Table 14. Values of RAE obtained in our experiments for different amounts of shift using ACC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions 0.2491 0.2991 0.1579 0.1069 0.4297 0.4301 0.3294 0.2672 0.4519 0.4690 0.6290 0.4285 Scene 0.2035 0.1676 0.1792 0.1554 0.3371 0.3863 0.2778 0.2576 1.3324‡1.5409 1.3054 1.4589 Yeast 2.2331 0.5355 0.2116 0.2121†2.4014 0.6702 0.3733 0.3834 2.7847 1.4287 0.9628 1.1162 Birds 3.3221 3.0772 0.3130†0.3060 3.2554 3.0525 0.3861 0.3320 2.5615 2.3043 0.4546 0.3517 Genbase 0.0266 0.0081 0.1277 0.0058 0.0266 0.0076 0.1440 0.0065 0.0253 0.0081 0.1381 0.0065 Medical 0.2321 0.6153 0.3447 0.2579 0.2192 0.9236 0.5121 0.3689 0.2408 1.3156 0.8683 0.6021 tmc2007_500 0.3560 0.3457 0.2564 0.2597†0.5111 0.4541 0.3327 0.3252 0.4769 0.4228 0.5063†0.4963† Ohsumed 0.2620 0.2467 0.2381 0.1935 0.3216 0.2863 0.2820 0.2437 0.4047 0.3372 0.4122 0.4397 Enron 7.3850 1.8492 0.3285‡0.3278 8.1460 2.1083 0.4251 0.4155 9.3550 3.3057 0.5961 0.6283 Reuters-21578 2.1867 0.1421 0.1320 0.1491 2.1224 0.1381 0.1672 0.1798 1.5822 0.1984 0.1723 0.2147 RCV1-v2 0.2434 1.0216 0.1758 0.1609 0.3070 1.0289 0.2919 0.2450 0.4303 0.9287 0.5660 0.5090 Mediamill 2.2137 0.9835 0.2969 0.2527 3.7688 1.1194 0.4184 0.3713 5.3468 1.3355 0.5751 0.5984‡ Bibtex 3.6761 3.8536 0.3600 0.3549 3.7272 4.4074 0.3696 0.3863 4.1667 5.0247 0.4294 0.4587‡ Corel5k 9.8232 0.2167 0.2457 0.1865 10.2793 0.1994 0.2622 0.2165 10.7374 0.1848 0.3477 0.3049 Delicious 5.0943 1.9548 0.3215 0.2694 5.7915 2.2703 0.3597 0.3020 5.9927 2.5536 0.3907 0.3355 Average 2.6225 1.1079 0.2468 0.2167 1.9959 1.1025 0.3264 0.2793 1.8528 1.1373 0.7049 0.6926 Rank Average 3.5 3.0 2.1 1.3 3.5 3.0 2.1 1.4 2.9 2.7 2.3 2.1 Table 15. Values of RAE obtained in our experiments for different amounts of shift using PACC as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions 0.3105 0.1720 0.1297 0.1318 0.4089 0.2945 0.3116 0.2812 0.4459 0.4191 0.6205 0.4639 Scene 0.2023 0.1416 0.1530 0.1332 0.4292 0.2893 0.2266 0.2171 1.7304 1.1136‡1.1121 1.3674 Yeast 1.4781 0.8704 0.2080 0.2024 2.0566 1.0807 0.3571 0.3319 2.9340 1.4858 1.0029 0.9498 Birds 3.4391 3.7460 0.2908 0.2730 3.5060 3.7643 0.3516 0.3316 3.3622 2.7057 0.4570 0.4704† Genbase 0.0376 0.0228 0.1290 0.0378 0.0376 0.0243 0.1466 0.0401 0.0360 0.0250 0.1497 0.0422 Medical 0.8565 0.5073 0.2812 0.2437 1.2243 0.5253 0.4063 0.3556 2.0092 0.6634‡0.8955 0.6556 tmc2007_500 0.3455 0.2420 0.2443 0.1987 0.5268 0.3260 0.3092 0.2507 0.4738 0.3160 0.4486 0.4338 Ohsumed 0.2628 0.2192 0.2356 0.1689 0.3865 0.2698 0.2784 0.2200 0.5300 0.3342 0.4005 0.4537 Enron 5.5524 5.4773 0.3640 0.3452 6.6795 5.7874 0.4409 0.4329 6.3135 7.0035 0.6331 0.5825 Reuters-21578 0.4275 3.9328 0.1359 0.1292 1.7934 3.9820 0.1844 0.1687 2.6267 3.9425 0.2238 0.1942 RCV1-v2 0.5285 0.4427 0.1824 0.1652 1.0813 0.8803 0.3071 0.2816 1.5968 1.2673 0.5635 0.5201 Mediamill 1.8713 1.8111 0.2798 0.2833 3.4939 2.6875 0.3841 0.3854‡4.6897 3.2192 0.5216 0.5511 Bibtex 1.3104 0.7556 0.3709 0.3102 1.4016 1.0460 0.3695 0.3492 1.4682 1.3451 0.3970 0.4261† Corel5k 9.8431 6.2210 0.3989 0.3997‡10.3929 6.6651 0.4224 0.4054 12.0719 7.4614 0.5075 0.4682 Delicious 3.2613 2.5366 0.3042 0.2875 4.2250 4.1529 0.3396 0.3240 4.1574 4.4159 0.3677 0.3478 Average 2.0194 1.8966 0.2510 0.2252 1.9582 1.6894 0.3134 0.2791 2.0662 1.4948 0.6694 0.6728 Rank Average 3.7 2.8 2.1 1.3 3.7 2.9 2.2 1.2 3.5 2.5 2.1 1.8 terms of AE and RAE, respectively, obtained by optimizing the hyperparameters shown in Table 21. These results show that there are no substantial differences in performance for the low-shift regime, while these differences are instead noticeable in the mid-shift and (especially) in the high-shift regimes. These results are well correlated with the results we obtained in the validation phase, on which we relied upon for choosing ridge regression, random forest regression, and linear SVR, as representative regression models. Received 31 December 2022; revised 31 December 2022; accepted 31 December 2022 ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:35 Table 16. Values of RAE obtained in our experiments for different amounts of shift using SLD as the base quantifier. Notational conventions are as in Table 3. low shift mid shift high shift BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA BC+BA MLC+BA BC+MLA MLC+MLA Emotions 0.5117 0.1310 0.1646 0.1199 0.6961 0.2455 0.3179 0.2907†0.5526 0.2769 0.4625 0.3885 Scene 0.1519 0.1914 0.1432 0.1847 0.2518 0.3744 0.2587†0.3693 1.0904 2.1677 1.3721 1.9117 Yeast 1.3664 0.3688 0.2111 0.2210 1.3507 0.4597 0.3471 0.3409 1.8907 0.9233 1.0121 0.8924 Birds 0.9407 0.4495 0.2837 0.4340 1.1251 0.5193 0.3447 0.5015 1.7344 0.5495 0.3750 0.5064 Genbase 0.0273 0.0052 0.1146 0.0081 0.0282 0.0053 0.1344 0.0082 0.0268 0.0051 0.1430 0.0084 Medical 0.2526 0.1661 0.3077 0.1611 0.2617 0.2028 0.4439 0.1968 0.4769 0.3791 0.7228 0.3722 tmc2007_500 0.2548 0.1979 0.2212 0.1987 0.3232 0.2751 0.2939 0.2479 0.3446 0.2761 0.4381 0.3597 Ohsumed 0.2232 0.1701 0.1998 0.1693 0.2495 0.2079 0.2464 0.2072 0.2801 0.3330 0.3193 0.3374 Enron 1.1351 0.2639 0.3135 0.3362 1.2907 0.3181 0.3931 0.4285 1.8511 0.4268 0.5422 0.5888 Reuters-21578 0.1398 0.0810 0.1320 0.0869 0.3150 0.0821 0.2248 0.0927 1.6152 0.0974 0.2528 0.1060 RCV1-v2 0.2199 0.1282 0.1624 0.1328 0.4811 0.1456 0.2821 0.1724 0.7695 0.2318 0.5706 0.2990 Mediamill 10.8687 0.4144 0.2649 0.2549 11.3338 0.7821 0.4033 0.3748 11.1308 1.2462 0.5882 0.5481 Bibtex 3.7700 0.3307 0.3830 0.3284 3.7014 0.2854 0.4529 0.2913 3.4731 0.2393 0.6482 0.2614 Corel5k 5.3304 0.2248 0.5850 0.6043 5.4527 0.2321 0.6448 0.6184 5.6702 0.2668 0.7806 0.7129 Delicious 7.8086 0.4778 0.3098 0.3587 8.6288 0.5295 0.3578 0.4013 7.8740 0.5120 0.3911 0.4135 Average 2.3798 0.2376 0.2562 0.2396 1.7450 0.3066 0.3154 0.2835 1.5997 0.7513 0.6837 0.7033 Rank Average 3.7 2.0 2.4 1.9 3.7 1.9 2.6 1.8 3.3 1.9 2.7 2.1 Table 17. Values of RAE obtained for different multi-label classifiers using PCC as the base quantifier in MLC+BA. low shift mid shift high shift BC+BA ML-knn DT RF CChain CLEMS LSC SG BC+BA ML-knn DT RF CChain CLEMS LSC SG BC+BA ML-knn DT RF CChain CLEMS LSC SG Emotions 0.104†0.511 0.160 0.106 0.129 0.512 0.625 0.104 0.366 0.589 0.423 0.388 0.373 0.590 0.670 0.342 0.543 0.790 0.548 0.556 0.593 0.788 0.932 0.504 Scene 0.407 0.494 0.194 0.178 0.175 0.495 0.556 0.171 0.742 0.565 0.441 0.447 0.376 0.567 0.643 0.416 3.491 2.277 2.571 2.851 2.205 2.262 2.387‡2.710 Yeast 0.929 0.509 0.251 0.210 0.251 0.495 0.723 0.205 1.038 0.654 0.475 0.441 0.449 0.647 0.831 0.430 1.607 1.389 1.225 1.199†1.172 1.393 1.515 1.202† Birds 0.550 0.386 0.315 0.246 0.326 0.386 0.389 0.342 0.684 0.388 0.359 0.318 0.417 0.388 0.391 0.409 1.007 0.397 0.441 0.384 0.541 0.397 0.401 0.469 Genbase 0.047 0.406 0.030 0.064 0.025 0.406 0.400 0.022 0.051 0.402 0.032 0.072 0.027 0.402 0.398 0.024 0.053 0.427 0.031 0.075 0.026 0.425 0.408 0.023 Medical 0.173‡0.396 0.172 0.216 0.205 0.395 0.415 0.212 0.218 0.389 0.201 0.313 0.265 0.388 0.405 0.283 0.397 0.547 0.311 0.629 0.465 0.537 0.567 0.534 tmc2007_500 1.939 0.419 0.007 0.093 0.191 0.420 0.464 0.197 2.192 0.521 0.009 0.162 0.299 0.522 0.575 0.304 2.402 0.899 0.012 0.327 0.524 0.895 0.973 0.546 Ohsumed 1.912 0.427 0.248 0.213 0.169 0.430 0.447 0.193 2.326 0.484 0.357 0.352 0.228 0.486 0.506 0.266 2.961 1.031 0.825 0.946 0.481 1.033 1.064 0.548 Enron 0.621 0.370 0.369 0.308 0.284 0.372 0.386 0.282 0.741 0.408 0.431 0.401 0.376 0.408 0.428 0.373 1.146 0.537 0.641 0.662 0.631 0.530 0.570 0.631 Reuters-21578 0.910 0.171 0.146 0.192 0.095 0.171 0.175 0.091 1.184 0.215 0.171 0.283 0.110 0.215 0.220 0.106 1.040 0.298 0.191 0.292 0.105 0.297 0.302 0.100 RCV1-v2 2.028 0.253 0.264 0.282 0.166 0.253 0.262 0.160 2.525 0.303 0.432 0.560 0.227 0.300 0.316 0.218 2.970 0.550 0.752 0.997 0.379 0.545 0.566 0.351 Mediamill 7.677 0.222 0.355 0.343 0.295 0.231 0.243 0.290 8.616 0.287 0.522 0.528 0.438 0.302 0.327 0.444 8.941 0.553 0.831 0.839 0.748 0.563 0.605 0.726 Bibtex 1.669 0.275 0.392 0.365 0.336 0.275 0.274 0.323 1.643 0.259 0.364 0.370 0.297 0.259 0.258 0.336 1.513 0.278 0.294 0.345 0.246 0.277 0.276 0.335 Corel5k 2.284 0.173 0.297 0.292 0.266 0.177 0.176 0.220 2.511 0.163 0.330 0.324 0.284 0.166 0.166 0.226 2.973 0.173 0.397 0.403 0.334 0.175 0.175 0.266 Delicious 6.631 0.234 0.356 0.341 0.281 0.215 0.225 0.325 7.474 0.235 0.410 0.412 0.318 0.194 0.215 0.387 7.327 0.279 0.439 0.464 0.352 0.194 0.235 0.430 Average 1.990 0.330 0.248 0.242 0.216 0.329 0.358 0.211 1.931 0.415 0.332 0.364 0.299 0.415 0.450 0.301 2.421 1.025 0.931 1.077 0.854 1.020 1.087 0.952 Rank Average 6.7 4.6 4.3 4.3 3.1 4.8 5.6 2.5 6.9 4.4 4.3 4.7 3.1 4.5 5.3 2.9 6.9 4.2 4.2 5.3 3.1 3.8 5.0 3.5 ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. 1:36 Moreo et al. Table 18. Values of RAE obtained for different multi-label aggregation methods in BC+MLA. low shift mid shift high shift BC+BA RakEL-LPQ kMeans-LPQ Ridge-RQ RF-RQ SVR-RQ BC+BA RakEL-LPQ kMeans-LPQ Ridge-RQ RF-RQ SVR-RQ BC+BA RakEL-LPQ kMeans-LPQ Ridge-RQ RF-RQ SVR-RQ Emotions 0.1045 0.1119 0.1028 0.1202 0.1179 0.1454 0.3657 0.3507 0.3490 0.2843 0.2700 0.2935 0.5430 0.5707 0.5265 0.4284 0.6379 0.4726 Scene 0.4068 0.1540 0.1612 0.1426 0.1382 0.1519 0.7417 0.3454 0.3696 0.2340 0.1695 0.2515 3.4909 2.1628 2.3644 1.1922 1.2952†1.0550 Yeast 0.9286 0.2037 0.2049 0.2256 0.2469 0.2084 1.0377 0.4173 0.4187 0.4065 0.3798 0.3816 1.6070 1.1721‡1.1786‡1.0485 0.9558 1.0586 Birds 0.5500 0.3923 0.3263 0.3348 0.2642 0.2646†0.6844 0.4967 0.4161 0.4264 0.3353 0.3372 1.0065 0.6907 0.5887 0.4836 0.4117 0.3643 Genbase 0.0472 0.0155 0.0351 0.0209 0.2265 0.0874 0.0506 0.0166 0.0362 0.0217 0.3069 0.0947 0.0530 0.0161 0.0358 0.0217 0.3450 0.0864 Medical 0.1725 0.1879 0.1487 0.3360 0.3186 0.3463 0.2177 0.2553 0.1803 0.4714 0.6118 0.5229 0.3974 0.4843 0.3328 0.7950 1.5663 0.8961 tmc2007_500 1.9392 0.1892 0.1735 0.2462 0.2906 0.2626 2.1917 0.2964†0.2709 0.2702 0.3068 0.3226 2.4020 0.5277 0.4822 0.3361 0.3852 0.4660 Ohsumed 1.9122 0.1687 0.1876 0.2185 0.2554 0.2285 2.3257 0.2275 0.2519 0.2563 0.2858 0.2736 2.9609 0.4925 0.5201 0.3393 0.3995 0.3872 Enron 0.6213 0.2876 0.3000 0.3429 0.3391 0.3272 0.7415 0.3847 0.3972 0.4201 0.4164 0.4117 1.1457 0.6518 0.6627 0.6278 0.4975 0.5685 Reuters-21578 0.9101 0.0890 0.0936 0.1469 0.2540 0.1389 1.1838 0.1091 0.1125 0.1754 0.2732 0.1740 1.0398 0.1091 0.1145 0.2379 0.2457 0.1616 RCV1-v2 2.0283 0.1480 0.2005 0.2038 0.3375 0.1896 2.5246 0.2026 0.2687 0.3146 0.5212 0.2836 2.9699 0.3350 0.4316 0.5659 0.9107 0.5063 Mediamill 7.6767 0.3203 0.3214 0.4169 0.3768 0.2708 8.6165 0.4931 0.4933 0.5394 0.4639 0.3722 8.9409 0.7837 0.7821 0.6751 0.5796 0.5320 Bibtex 1.6686 0.3097 0.3183 0.3959 0.4328 0.3532 1.6432 0.3180 0.3320 0.3897 0.4883 0.3297 1.5127 0.3186 0.3338 0.3796 0.6234 0.3046 Corel5k 2.2844 0.2205 0.2941 0.2996 0.2903 0.2299 2.5112 0.2337 0.3164 0.3265 0.3091 0.2458 2.9733 0.2669 0.3760 0.3956 0.3686 0.2898 Delicious 6.6314 0.3309 0.3353 0.3425 0.3633 0.3012 7.4738 0.4034 0.4165 0.3628 0.3635 0.3357 7.3272 0.4569 0.4822 0.3565‡0.3459 0.3599† Average 1.9897 0.2101 0.2188 0.2598 0.2965 0.2366 1.9312 0.3035 0.3058 0.3213 0.3705 0.3043 2.4206 0.8541 0.8796 0.6423‡0.7820 0.6270 Rank Average 5.3 1.9 2.5 3.9 4.1 3.2 5.6 2.5 3.1 3.3 3.5 2.9 5.5 3.3 3.7 2.7 3.4 2.5 Table 19. AE for different regressors for multi-label quantifiers low shift mid shift high shift BC+BA Ridge (Ridge-RQ) MultitaskLasso RandomForest (RF-RQ) StackedLinearSVR ChainedLinearSVR LinearSVR (SVR-RQ) BC+BA Ridge (Ridge-RQ) MultitaskLasso RandomForest (RF-RQ) StackedLinearSVR ChainedLinearSVR LinearSVR (SVR-RQ) BC+BA Ridge (Ridge-RQ) MultitaskLasso RandomForest (RF-RQ) StackedLinearSVR ChainedLinearSVR LinearSVR (SVR-RQ) Emotions .0418 .0500 .0633 .0484 .0687 .0574 .0586 .0685 .0626 .0811 .0707 .1038 .1153 .0720 .0923 .0782 .1029 .1235 .1295 .1767 .0951 Scene .0842 .0350 .0440 .0303 .0363 .0359 .0384 .1140 .0454 .1110 .0306 .0859 .0868 .0459 .1427 .0581 .1764 .0507‡.1251 .1260 .0499 Yeast .1756 .0477 .0491 .0561 .0457 .0464 .0480 .1900 .0920 .0943 .0956 .0982 .1004 .0913 .2206 .1374 .1424 .1517 .1517 .1542 .1361 Birds .0286 .0213 .0230 .0185 .0217 .0213 .0181 .0328 .0289 .0299 .0251 .0297 .0280 .0243 .0440 .0405 .0424 .0382 .0436 .0427 .0351 Genbase .0011 .0015 .0137 .0103 .0168 .0177 .0022 .0011 .0014 .0175 .0148 .0245 .0246 .0025 .0010 .0013 .0173 .0172 .0364 .0347 .0023 Medical .0127 .0230 .0186 .0202 .0207 .0194 .0191 .0146 .0306 .0263 .0393 .0315 .0265 .0279 .0169 .0365 .0314 .0651 .0439 .0380 .0351 tmc2007_500 .1108 .0226 .0260 .0211 .0312 .0272 .0213‡.1154 .0274 .0436 .0224 .0528 .0508 .0292 .1008 .0282 .0571 .0237 .0726 .0714 .0321 Ohsumed .1004 .0193 .0220 .0183‡.0231 .0230 .0183 .1087 .0208 .0363 .0184 .0433 .0428 .0209 .1177 .0221 .0472 .0201 .0601 .0591 .0215 Enron .0347 .0192 .0187 .0174 .0180 .0189 .0169 .0397 .0250 .0256 .0219 .0267 .0269 .0227 .0439 .0287 .0300 .0212 .0332 .0325 .0253 Reuters-21578 .0167 .0048 .0072 .0073 .0082 .0082 .0049 .0243 .0070 .0114 .0109 .0181 .0182 .0070‡.0370 .0103 .0143 .0135 .0267 .0279 .0088 RCV1-v2 .0456 .0095 .0129 .0125 .0147 .0147 .0093 .0533 .0144 .0245 .0208 .0295 .0295 .0146 .0654 .0221 .0366 .0370 .0472 .0472 .0215 Mediamill .1697 .0184 .0169 .0158 .0167 .0176 .0157 .1736 .0259 .0266 .0229 .0315 .0321 .0251 .1806 .0316 .0321 .0294 .0440 .0442 .0322 Bibtex .0354 .0097 .0105 .0104 .0106 .0111 .0092 .0374 .0125 .0154 .0147 .0168 .0157 .0116 .0423 .0140 .0198 .0199 .0224 .0197 .0129 Corel5k .0582 .0074 .0080 .0087 .0073 .0091 .0075 .0585 .0084 .0088 .0091 .0088 .0102 .0082 .0594 .0094 .0098 .0100 .0106 .0117 .0087 Delicious .1420 .0093 .0096 .0093 .0100 .0109 .0093 .1417 .0108 .0134 .0102 .0139 .0147 .0109 .1238 .0102 .0151 .0092 .0163 .0172 .0104 Average .0677 .0180 .0206 .0186 .0211 .0207 .0177 .0761 .0288 .0401 .0300 .0440 .0444 .0288 .1012 .0454‡.0781 .0529 .0788 .0831 .0452 Rank Average 5.8 3.1 4.3 3.0 4.6 4.8 2.3 5.9 2.3 4.2 2.7 5.2 5.5 2.3 5.8 2.3 3.9 3.1 5.5 5.4 2.0 ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023. Multi-Label Quantification 1:37 Table 20. RAE for different regressors for multi-label quantifiers. low shift mid shift high shift BC+BA Ridge (Ridge-RQ) MultitaskLasso RandomForest (RF-RQ) StackedLinearSVR ChainedLinearSVR LinearSVR (SVR-RQ) BC+BA Ridge (Ridge-RQ) MultitaskLasso RandomForest (RF-RQ) StackedLinearSVR ChainedLinearSVR LinearSVR (SVR-RQ) BC+BA Ridge (Ridge-RQ) MultitaskLasso RandomForest (RF-RQ) StackedLinearSVR ChainedLinearSVR LinearSVR (SVR-RQ) Emotions 0.104 0.120 0.149 0.118 0.165 0.149 0.145 0.366 0.284 0.360 0.270 0.454 0.559 0.293 0.543 0.428 0.543 0.638 0.716 1.026 0.473 Scene 0.407 0.143 0.220 0.138 0.173 0.170 0.152 0.742 0.234 0.578 0.169 0.455 0.443 0.252 3.491 1.192 4.040 1.295†2.857 2.743 1.055 Yeast 0.929 0.226 0.217 0.247 0.220 0.228 0.208 1.038 0.407 0.403‡0.380 0.438 0.455 0.382 1.607 1.049 1.081†0.956 1.199 1.238 1.059 Birds 0.550 0.335 0.346 0.264 0.353 0.305 0.265†0.684 0.426 0.435 0.335 0.462 0.405 0.337 1.007 0.484 0.510 0.412 0.595 0.609 0.364 Genbase 0.047 0.021 0.266 0.226 0.283 0.336 0.087 0.051 0.022 0.355 0.307 0.411 0.445 0.095 0.053 0.022 0.369 0.345 0.652 0.675 0.086 Medical 0.173 0.336 0.305 0.319 0.297 0.226 0.346 0.218 0.471 0.445 0.612 0.449 0.320 0.523 0.397 0.795 0.693 1.566 0.919 0.711 0.896 tmc2007_500 1.939 0.246 0.377 0.291 0.331 0.279 0.263 2.192 0.270 0.495 0.307 0.526 0.463 0.323 2.402 0.336 0.900 0.385 1.092 0.975 0.466 Ohsumed 1.912 0.219 0.332 0.255 0.254 0.250 0.228 2.326 0.256 0.456 0.286 0.444 0.435 0.274 2.961 0.339 0.953 0.400 1.186 1.168 0.387 Enron 0.621 0.343 0.346 0.339 0.338 0.328‡0.327 0.741 0.420 0.443 0.416 0.455 0.428 0.412 1.146 0.628 0.691 0.498 0.741 0.651 0.569 Reuters-21578 0.910 0.147 0.261 0.254 0.227 0.232 0.139 1.184 0.175†0.291 0.273 0.389 0.382 0.174 1.040 0.238 0.246 0.246 0.393 0.437 0.162 RCV1-v2 2.028 0.204 0.329 0.338 0.324 0.324 0.190 2.525 0.315 0.585 0.521 0.638 0.643 0.284 2.970 0.566 0.889 0.911 1.060 1.068 0.506 Mediamill 7.677 0.417 0.407 0.377 0.331 0.361 0.271 8.616 0.539 0.524 0.464 0.523 0.561 0.372 8.941 0.675 0.649 0.580 0.810 0.874 0.532 Bibtex 1.669 0.396 0.434 0.433 0.425 0.427 0.353 1.643 0.390 0.490 0.488 0.523 0.477 0.330 1.513 0.380 0.567 0.623 0.661 0.544 0.305 Corel5k 2.284 0.300 0.296 0.290 0.320 0.423 0.230 2.511 0.327 0.316 0.309 0.362 0.453 0.246 2.973 0.396 0.374 0.369 0.460 0.549 0.290 Delicious 6.631 0.343 0.369 0.363 0.371 0.415 0.301 7.474 0.363 0.462 0.364 0.478 0.532 0.336 7.327 0.357‡0.567 0.346 0.648 0.720 0.360† Average 1.990 0.260 0.319 0.296 0.302 0.307 0.237 1.931 0.321 0.458 0.370 0.483 0.478 0.304 2.421 0.642‡1.358 0.782 1.276 1.260 0.627 Rank Average 5.9 3.0 4.9 3.8 4.3 4.1 2.1 6.1 2.7 4.4 2.6 5.3 4.9 2.1 6.0 2.3 3.9 3.0 5.5 5.3 2.0 Table 21. Hyperparameters explored during model selection for different regressors. Only the hyperparameters which are specific to the regressor are listed. All methods are deployed with an LR classifier; for hyperparameters 𝐶 and ClassWeight, we explore in the ranges { 10 −1, . . . , 10 2, 10 3} and {Balanced, None}, respectively. Regressor Hyperparameter Description Values Ridge Alpha regularization strength {10−3, . . . , 102,103} MultitaskLasso Alpha regularization strength {10−3, . . . , 102,103} RandomForest N_estimators number of trees {10, 100, 200} StackedLinearSVR 𝐶inverse of regularization strength in Linear SVR {10−1, . . . , 102,103} ChainedLinearSVR 𝐶inverse of regularization strength in Linear SVR {10−1, . . . , 102,103} LinearSVR 𝐶inverse of regularization strength in Linear SVR {10−1, . . . , 102,103} ACM Trans. Knowl. Discov. Data., Vol. 1, No. 1, Article 1. Publication date: June 2023.