Issue 1:
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.

Thank you!

Check that you are up-to-date with the master branch of Keras. You can update with:

pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps

If running on TensorFlow, check that you are up-to-date with the latest version. The installation instructions can be found here.

If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:

pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

Issue 2:
Hi all,

I was wondering if you would be able to help or advice me on an issue I am having. I am not sure that this is a bug but I would like some input on this problem to be sure of what is happening!

I have built a multi-label classifier network in order to classify categories in some data i have that includes classes such as age etc... My question is related to the predict function and just wanted some clarification as to the confidence scores assigned by the network. I have some unlabelled data in my data set, and I would like also the network to predict what class it thinks the data belongs to. The reason it is unknown is because it has not been measured, however, given that it hasn't been measured, I would like to know what the network thinks it is.

For each sample, multiple labels exist (age, sex) etc...

My code is as follows:

For label binarizing, the unknown class are given a 0 and when one-hot encoding, they are left out as follows:

from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
Metadataencoded= Normcountstransposemetadata.apply(le.fit_transform)

cat_Organ=to_categorical(Metadataencoded["Organ"],12)
cat_Age=to_categorical(Metadataencoded["Age"],6)
cat_Sex=to_categorical(Metadataencoded["Sex"],3)
cat_LLGC=to_categorical(Metadataencoded["Life_long_Generative_capacity"],5)
cat_LLGC=cat_LLGC[:,1:5]
cat_Sex=cat_Sex[:,1:3]

Sex and LLGC are the categories for which there are unknown or unlabelled data. The first column is removed as label binarizer assigns these samples a class.. so after this, the unknown samples contain all 0's for one-hot encoded data.

Merge one-hot encoded classes:

trainingtarget1 = np.concatenate((cat_Age, cat_Organ,cat_Sex,cat_LLGC), axis=1)

Test and split and compile model

`X_train, X_test, y_train, y_test = train_test_split(Normcountstrain,trainingtarget1, train_size = 0.8)

numpy.random.seed(7)

model= Sequential()

model.add(Dense(units=64, input_dim=5078, activation="relu"))

model.add(Dense(units=32, activation="relu"))

model.add(Dense(units=100, activation="relu"))

model.add(Dense(units=24, activation="sigmoid"))

model.compile(loss="binary_crossentropy", optimizer='adam', metrics=['accuracy'])

model.fit(X_train, y_train,

epochs=200,

batch_size=32,

verbose=1,

validation_split=0.15,

callbacks=[EarlyStopping(monitor='val_loss', patience=5,)])

`

Validation loss and accuracy etc (the model performs relatively well)... and now skipping to the part I have a question about: I run the following code to get prediction scores.

trainpred = model.predict(X_train)
trainpred=pd.DataFrame(trainpred, index=X_train.index)

I have attached a screenshot of of a portion of the unknown samples under the 4 classes I would like to know about (the 0.9 values is a sample with a known class). As you can see it can assign some confidence value to the samples with unknown labels I would like the network to try and classify, however, they are all very very low values. Should I go with the highest value in the categories and then assume the network thinks it is most likely that class? I will say that for the most part, even though the values are low, the highest value is normally assigned to what I would assume is the correct class... so another question would then be, why is the value so low?

Is this how it is for classification of unknown labels or is there another way of evaluating this/tweaking the model to get a higher confidence value etc?

I will add, I dont want to force these in to the test unseen set as this class is not known at all, and so would like to try and train on these to learn unique features within this class. They are samples at different ages where the class is not known, but it is known for two ages.. I would like to see where they fit in between...

Thank you for your time and any help and advice is much appreciated!!