How does Keras handle multilabel classification? : <p>I am unsure how to interpret the default behavior of Keras in the following situation:</p>

<p>My Y (ground truth) was set up using scikit-learn's <code>MultilabelBinarizer</code>().</p>

<p>Therefore, to give a random example, one row of my <code>y</code> column is one-hot encoded as such:
<code>[0,0,0,1,0,1,0,0,0,0,1]</code>.</p>

<p>So I have 11 classes that could be predicted, and more than one can be true; hence the multilabel nature of the problem.  There are three labels for this particular sample.</p>

<p>I train the model as I would for a non multilabel problem (business as usual) and I get no errors.</p>

<pre><code>from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation
from keras.optimizers import SGD

model = Sequential()
model.add(Dense(5000, activation='relu', input_dim=X_train.shape[1]))
model.add(Dropout(0.1))
model.add(Dense(600, activation='relu'))
model.add(Dropout(0.1))
model.add(Dense(y_train.shape[1], activation='softmax'))

sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)
model.compile(loss='categorical_crossentropy',
              optimizer=sgd,
              metrics=['accuracy',])

model.fit(X_train, y_train,epochs=5,batch_size=2000)

score = model.evaluate(X_test, y_test, batch_size=2000)
score
</code></pre>

<p>What does Keras do when it encounters my <code>y_train</code> and sees that it is "multi" one-hot encoded, meaning there is more than one 'one' present in each row of <code>y_train</code>?  Basically, does Keras automatically perform multilabel classification?  Any differences in the interpretation of the scoring metrics?</p>
