@Override
    public String getSerializableForm(boolean includeConfidence) {
        /*
         * Note: Due to the sparse implementation of MultiLabel, all 'key=value' pairs will have value=true. That is,
         * say 'all possible labels' for a dataset are {R1,R2} but this particular example has label set = {R1}. Then
         * this method will output only "R1=true",whereas one might expect "R1=true,R2=false". Nevertheless, we generate
         * the 'serializable form' of this MultiLabel in this way to be consistent with that of other multi-output types
         * such as MultipleRegressor.
         */
        String str = labels.stream()
                .map(label -> String.format("%s=%b", label, true))
                .collect(Collectors.joining(","));
        if (includeConfidence) {
            return str + ":" + score;
        }
        return str;
    }
@Test
    public void getsCorrectSerializableForm() {
        MultiLabel abc = new MultiLabel(mkLabelSet("a", "b", "c"));
        assertEquals("a=true,b=true,c=true", abc.getSerializableForm(false));
        assertEquals("a=true,b=true,c=true:NaN", abc.getSerializableForm(true));

        MultiLabel scored = new MultiLabel(mkLabelSet("a", "b", "c"), 1.0);
        assertEquals("a=true,b=true,c=true", scored.getSerializableForm(false));
        assertEquals("a=true,b=true,c=true:1.0", scored.getSerializableForm(true));
    }