Multinomial Logistic Regression with R | 3. Confusion Matrix & Misclassification Error

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

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

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

    Excellent trainning and testing approach! Thanks a lot

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

      You are welcome!

  • @rajaramk1993
    @rajaramk1993 4 года назад +1

    Waiting for more videos like this. Thankyou.

    • @bkrai
      @bkrai  4 года назад

      Thanks for comments!

  • @celisacastelino2312
    @celisacastelino2312 4 года назад +1

    Hi Sir, by far your videos have been the best ever and I have undoubtedly learnt and benefitted by it. I never subscribe to channels but this definitely needs a thumps up :) Keep up the great work and I look forward to your future videos.

    • @bkrai
      @bkrai  4 года назад

      Wow, thanks!

  • @delt19
    @delt19 4 года назад +1

    Very nice three part video. Any chance you can do a video on anomoly detection techniques? I've been using isolation forest from solitude package in R but there aren't many videos on it for R.

    • @bkrai
      @bkrai  4 года назад

      Thanks for the suggestion, I've added it to my list of future videos.

  • @namelessbecky
    @namelessbecky 2 месяца назад +1

    Thank you

    • @bkrai
      @bkrai  2 месяца назад

      You're welcome!

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

    very nice video, im just wondering as to why you put set.seed(222) for 222. what does this actually do? i get quite a large misclassification for my data

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

      You can refer to this for more details on data partitioning:
      ruclips.net/video/aS1O8EiGLdg/видео.html

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

    predict() function outputs probability. So how do you convert that value in labels e.g. Label 1, 2, 3 in this example?

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

      Include type = 'class'
      You can refer to this for more details:
      ruclips.net/video/ftjNuPkPQB4/видео.html

  • @shwetaredkar734
    @shwetaredkar734 4 года назад +1

    Informative and very much helpful. Please make a tutorial on graph convolution neural network for binary classification for non-image dataset. Thanks.

    • @bkrai
      @bkrai  4 года назад

      Thanks for the suggestion, it's on my list of future videos.

  • @galan8115
    @galan8115 4 года назад +1

    Good evening doctor. The package "caret" gives a function "confusionMatrix" with Sensivity, Specifity and other statistics that can be easily applied to predictions and reference.
    Also, thank you for your videos. I got a question, ¿does multinom accept, like you are using, features/variables with diverse type like, multifactors, binomials or continuous data without a problem? ¡Have a good day!

    • @bkrai
      @bkrai  4 года назад +1

      Yes, that should work fine.

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

    Can we calculate ROC & Area Under Curve for Multinomial Logistic Regression?

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

      You can try 2 levels at a time.

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

      @@bkrai Sir can u share a video on this?

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

    Sir, for my own data when I followed these steps, misclassification error for training data is around 7.2% but misclassification error for testing data is around 91%. Why such a huge difference, what do we do in such case?
    Thank you so much for making this series, it has helped me in building my own model.

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

      I think you are making some calculation error. Check and see if 91% is actually accuracy and not misclassification.

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

      @@bkrai Yes sir I re-checked if I made some mistakes. My confusion matrix for testing data is not proper, as the classifications (0, 1, 2) on row and column are coming out differently. It is 0 1 2 on row and 2 0 1 on colunm. Perhaps that is why when I run sum(diag(tab1))/sum(tab1) the results are strange. Please guide me on how to fix this issue. Your guidance will help me in completing my model since it is the last step and I have been investing a couple of days in learning about multinomial logistic regression from your channel.
      Thank you

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

      Try adding one more line after line-16 where you do the same thing for test data.

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

      @@bkrai Yes sir with this suggestion I could fix the issue. All problems are resolved, finally, my model is complete. Thank you so much for helping me out, it really means a lot.

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

      Thanks for the update!

  • @giorgiogentile8566
    @giorgiogentile8566 4 года назад +1

    Good morning doctor, how can i get the coefficient of the equation not referred to the reference level?

    • @bkrai
      @bkrai  4 года назад

      That's not required. You can see that class-1 is easily predicted using the model.

  • @lianjek5788
    @lianjek5788 4 года назад +1

    hi sir, followed the same way but when I went for the confusin matrix of the testing data sets its showing .How to change the vector into data frame? How to fix it? Thanks.

    • @bkrai
      @bkrai  4 года назад +1

      Look at the structure of data using str function and make sure response is a factor variable.

  • @manikandankrishnakumar5430
    @manikandankrishnakumar5430 4 года назад +1

    👍

    • @bkrai
      @bkrai  4 года назад

      Thanks!