ROC Curve and AUC Explained in Python From Scratch

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

Комментарии • 25

  • @neux64
    @neux64 Год назад +2

    I know this is a year old, but I want to express my thanks. My instructor expected me to learn how to plot an ROC curve with sklearn using non-random samples on my own (and the book doesn't even cover or mention ROC!). Very nice and simple way to manually graph ROC given outcome data and predictions. Thanks again!

    • @sefiks
      @sefiks  Год назад

      Happy to hear that!

  • @YYchen713
    @YYchen713 3 года назад +3

    Thanks for going through manual calculate the points for ROC! It’s an easier way to understand how the curve is being generated

  • @camilo.caceresf
    @camilo.caceresf 3 года назад +3

    Very clear and good explanation!!!!
    Thank you for taking the time to explain it!

  • @RaviRajput-mq2ew
    @RaviRajput-mq2ew 3 года назад +1

    Great Sir.....So eaisly Explained

  • @tunateke9806
    @tunateke9806 3 года назад +2

    Most of tutorials explain precision - recall and jump to roc and auc directly. this is really confusing. this video tutoral bridges that gap. thank you.

  • @임선호-k2z
    @임선호-k2z 2 года назад +1

    Thank so much for sharing !

  • @NikitaDavydov-y1x
    @NikitaDavydov-y1x Год назад +1

    Thanks Bro, you help me so much!

  • @AasishThapaMagarx
    @AasishThapaMagarx Год назад +1

    Thank you man!

  • @meghnajain7889
    @meghnajain7889 3 года назад +1

    Good work

  • @saugatbhattarai327
    @saugatbhattarai327 3 года назад +2

    Thanks, I needed this thing for my research. I have a deadline in 24 hours. Could you please suggest to create ROC with multi-class?

    • @sefiks
      @sefiks  3 года назад

      Multiclass classification problems could be transformed to n times binary classification problem. So, you should apply this approach several times.

    • @saugatbhattarai327
      @saugatbhattarai327 3 года назад

      @@sefiks Do you mean OneVsAll? I have found this technique somewhere. Is this ok?

    • @sefiks
      @sefiks  3 года назад +1

      Yes I mean it.

    • @g8kN
      @g8kN 3 года назад

      @@saugatbhattarai327 Could you explain the way you did it? I have a very similar problem

  • @aashishmalhotra
    @aashishmalhotra 2 года назад +1

    For me tp,fp,tn,fn is 1,0,0,0 and if calculation tpr , fpr giving Zerodivision Error how to mitigate it. If somebody help

    • @sefiks
      @sefiks  2 года назад

      Add epsilon value (e.g. 0.0001) to divisor

  • @MerveNoyan
    @MerveNoyan 3 года назад +1

    Neat explanation!

    • @sefiks
      @sefiks  3 года назад

      Glad you think so! Thanks...

  • @tunateke9806
    @tunateke9806 3 года назад +1

    Tuning predictions is easy with roc curve.

    • @sefiks
      @sefiks  3 года назад +1

      Newbies tend to assign a proba to a class if it is greater than 0.5 but that is not always true.

  • @broken_arrow1813
    @broken_arrow1813 3 года назад

    Thanks for your informative post. I have a question. How does one build a ROC curve for ranked data. Say I have a list of ranks in the form {x:23, y:31, z:45, ...}. Suppose I want to calculate roc curve only for items for which the values are less than 40. How do I set up the calculation? In this case all items with values less than 40 will be considered as positives and the rest be considered as negatives.

    • @sefiks
      @sefiks  3 года назад

      Not possible. You have to have scores to build a roc curve. For example, we cannot build roc curves in regular decision tree classifiers because they return distinct classes.

    • @broken_arrow1813
      @broken_arrow1813 3 года назад

      @@sefiks Thanks for your prompt reply. How would you suggest that I empirically compare the performance of two algorithms that return ranked data such that the algorithm that ranks more items in the top percentiles is considered better than the other? For example if I have two algorithms A and B. If A ranks 14 positive items in the top 10% and B ranks 18 positive items in the top 10 percent then B is considered to be performing better than A.

    • @sefiks
      @sefiks  3 года назад

      @@broken_arrow1813 accuracy, precision and recall recores are enough to evaluate the model