# Multi-label classification

I am working on a project and I need some suggestions.

I have a data set with 600 songs and for each song we have 60 numerical features (linked to the rhythm and the timbre of the sound). Moreover one or more emotions chosen out of 6 (happy,amazed,angry,sad,quiet,relaxing) are associated to each song. This means that, for each song, we have a vector of 60 numerical features and a binary vector of 6 labels (with one or more ones) and our objective is to be able to classify the songs with respect to the emotions associated starting from their physical features.

Do you have any suggestion about multi-label classification algorithms (or others) that we could use? Are there some useful libraries on R?

## 4 Answers

Predict each label independently.

Because objects may have more than one label.

Thus, this isn't really a multi-class problem, because the classes aren't disjoint.

• This method is called binary relevance. Aug 12 '16 at 10:25

In the next version of mlr that will come out on monday, there will be many multilabel algorithms available in R. For learning how to use it, you can use the tutorial: http://mlr-org.github.io/mlr-tutorial/devel/html/multilabel/index.html

You can install the development version, where all multilabel algorithms learner are already available now with following code:

install.packages("devtools")
devtools::install_github("mlr-org/mlr")


If you have more questions you can ask me, I am a developer of mlr.

I would suggest MP Boost link. It is based on AdaBoost.MH and effectively does pivot sample selection in each iteration.

In my application I needed a multi label classification capability. Unfortunately it was not directly applicable since there is no easy way to forbid/allow certain combinations of labels.

The software is implemented in C++ and requires little dependencies.

The utiml package has a lot of options to carry out multi-label experiments.

A simple example:

install.packages("utiml")
library(utiml)

ds <- create_holdout_partition(emotions)

brmodel <- br(ds$train, "SVM", seed=123) prediction <- predict(brmodel, ds$test)

result <- multilabel_evaluate(ds\$tes, prediction)