Keras Multiclass Classification for Deep Neural Networks with ROC and AUC (4.2)

แชร์
ฝัง

ความคิดเห็น • 16

  • @kifueralle
    @kifueralle 5 ปีที่แล้ว +13

    My neural network classifies this video as excellent!

  • @buroojghani
    @buroojghani 3 ปีที่แล้ว

    Dear Jeff,
    Thank you so much for explaining with such clarity.
    I have a problem and I'm right now kinda stuck. I have a multi-class classification problem for which I get a very high AUC score (>0.98) while the other metric scores (precision, recall, accuracy) are relatively low (~0.69). I have an explanation but I need someone to validate if what I am reasoning is really the case.
    So in case of multi-class problems if I want to use ROC I would need to binarize the class labels (since ROC works for binary class problems). Now for instance if I am using the one-vs-one configuration (Hand and Till, 2001), and the classifier distributes the mis-classifications (false positives and false negatives) uniformly across many (or even all) classes, I will inevitably have small number of false positives and small number of false negatives for any pair of classes. Consequently, less number of false positives and false negatives will amount to high true positive rate and low false positive rate and ergo a high AUC. Since this does not really mean the classifications are mostly correct you will get a low score on accuracy, precision or recall. Does that make sense?
    My dataset is balanced.
    I hope I have succeeded to some extend at explaining my problem and my understanding of it.
    I would really really appreciate if you could help me with resolving this problem. Thank you so much!

  • @hanserj169
    @hanserj169 5 ปีที่แล้ว +2

    Thanks for the amazing content. I was wondering if should I apply other strategy to prevent overfitting or improve the accuracy or ROC performance, something like crossover? or using early stopping is enough?

  • @ChristianGruber-ww5ly
    @ChristianGruber-ww5ly 2 ปีที่แล้ว

    I love your videos! They are super helpful!

  • @Lalancelot
    @Lalancelot 5 ปีที่แล้ว +1

    On the ROC chart example, in the code, you have removed all the save line (checkpointer = ...) that are in the video. I'm having hard time to save anything on my Windows drive. Is it even possible to save those best 'weights' from jupyter notebook to our drive?

    • @Lalancelot
      @Lalancelot 5 ปีที่แล้ว

      I have tried this from previous videos:
      checkpoint_path = "C:/Users/lalan/Tensor/data/bestmodels/best_weight.h5"
      checkpointer = model.save(checkpoint_path)
      model.load_weights(checkpoint_path) # Load weights from best model.
      It did save, and gave no error on load. But later, when I tried to plot_roc
      ValueError: continuous format is not supported

  • @xiaonand7035
    @xiaonand7035 4 ปีที่แล้ว

    Great Video! I have a question: since we use ROC to measure binary classification, why not use metrics = ['roc_auc'] in the compile part instead of ['accuracy']? Which metrics to put there is better?
    - model.compile(loss='binary_crossentropy',
    optimizer=tensorflow.keras.optimizers.Adam(),
    metrics =['accuracy'])

  • @marcopolo9623
    @marcopolo9623 2 ปีที่แล้ว

    Why don't you calculate the ROC curve for the multiclass classification?

  • @rchuso
    @rchuso 5 ปีที่แล้ว

    Thanks. I wasn't aware that a binary_classification could be used with a single y -- testing that now. :-)

  • @nedyalkovs
    @nedyalkovs 4 ปีที่แล้ว

    For the first network when you classify the type of cancer why do you use a linear activation function on the output layer. When you have binary classification I thought you should use Sigmoid activation function. Can you please clarify?

  • @DeevyankarAgarwal
    @DeevyankarAgarwal 4 ปีที่แล้ว

    Great Prof..Thank You

  • @hhemsi6612
    @hhemsi6612 5 ปีที่แล้ว +1

    In the example where y holds diagnosis values, it needs to be converted to NumPy, by adding .values
    y = df['diagnosis'].map({'M':1,"B":0}).values # Binary classification, M is 1 and B is 0
    Otherwise training fails.

  • @zackstrater7210
    @zackstrater7210 4 ปีที่แล้ว

    what does: kernel_initializer='random_normal' do?

  • @mhamri
    @mhamri 3 ปีที่แล้ว

    at 1:19 you have your ending advrtisement covering other things you are saying

  • @sdc8591
    @sdc8591 4 ปีที่แล้ว +1

    It's really frustrating when you do not scroll in the code side wise. Yes you have said that you are not interested in explaining the code but for someone who is a beginner and has no idea how the code is written this video is a waste of time because it does not even show the arguments completely.

    • @tatjanaweiner1133
      @tatjanaweiner1133 4 ปีที่แล้ว +3

      Maybe click on the github link instead of trying to copy code from a video?