Which method should be considered to evaluate the imbalanced multi-class classification?












1












$begingroup$


I am working on multiclass-imbalanced data. My dependent variable is highly skewed.



           Injury

2(No Injury) 208753
1(Medium Injury) 22318
0(severe Injury) 3394


I have used random forest algorithm with parameter "class_weight='balanced' " to manage the class 2 imbalance.



I get the below results when I use average='micro'.



 [[   34   107   688]
[ 148 778 4592]
[ 905 4635 46730]]
Accuracy Score: 0.8110616374089428
precision score: 0.8110616374089428
Recall score: 0.8110616374089428
AUC Score: 0.8582962280567071
F1 score: 0.8110616374089428
Kappa Score: 0.05522284663052324


For the average = 'macro', the results are below.



[[   31   125   684]
[ 157 838 4559]
[ 890 4694 46639]]
Accuracy Score: 0.8104816009007626
precision score: 0.3586119227436326
Recall score: 0.3602869806251181
AUC Score: 0.5253225798824679
F1 score: 0.3592735337079687
Kappa Score: 0.06376296115668922


So, which results should I consider to evaluate the model? If I have to consider the macro, then my model performance is really bad. Please suggest if there are any methods to improve the precision, recall and AUC score?



If I consider micro results, my precision, recall, f1 score is same. How can I justify this in the project?



I am interested in medium and severe injuries. But individual class precisions 0.0312(severe), 0.1409(medium) for macro are very low. The overall precision score is also very low 0.35. Is it possible to increase these scores? Or Is it fine to consider these low values as my final results for the project? Any suggestions are greatly appreciated. NOTE: I have tried SMOTE oversampling and ensemble cross-validation with different algorithms but I ended up having precision and recall scores less than 50.



Any help would be appreciated.



Thank you.










share|improve this question











$endgroup$




bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • $begingroup$
    If you think that there is a problem to your model by the imbalanceness of the classes, have you considered using a resampling methods such SMOTE for oversappling?
    $endgroup$
    – JoPapou13
    Nov 7 '18 at 19:45










  • $begingroup$
    Yes, I have used smote method to oversample and then computed the above results.
    $endgroup$
    – Bhaskar Sharma
    Nov 7 '18 at 20:00
















1












$begingroup$


I am working on multiclass-imbalanced data. My dependent variable is highly skewed.



           Injury

2(No Injury) 208753
1(Medium Injury) 22318
0(severe Injury) 3394


I have used random forest algorithm with parameter "class_weight='balanced' " to manage the class 2 imbalance.



I get the below results when I use average='micro'.



 [[   34   107   688]
[ 148 778 4592]
[ 905 4635 46730]]
Accuracy Score: 0.8110616374089428
precision score: 0.8110616374089428
Recall score: 0.8110616374089428
AUC Score: 0.8582962280567071
F1 score: 0.8110616374089428
Kappa Score: 0.05522284663052324


For the average = 'macro', the results are below.



[[   31   125   684]
[ 157 838 4559]
[ 890 4694 46639]]
Accuracy Score: 0.8104816009007626
precision score: 0.3586119227436326
Recall score: 0.3602869806251181
AUC Score: 0.5253225798824679
F1 score: 0.3592735337079687
Kappa Score: 0.06376296115668922


So, which results should I consider to evaluate the model? If I have to consider the macro, then my model performance is really bad. Please suggest if there are any methods to improve the precision, recall and AUC score?



If I consider micro results, my precision, recall, f1 score is same. How can I justify this in the project?



I am interested in medium and severe injuries. But individual class precisions 0.0312(severe), 0.1409(medium) for macro are very low. The overall precision score is also very low 0.35. Is it possible to increase these scores? Or Is it fine to consider these low values as my final results for the project? Any suggestions are greatly appreciated. NOTE: I have tried SMOTE oversampling and ensemble cross-validation with different algorithms but I ended up having precision and recall scores less than 50.



Any help would be appreciated.



Thank you.










share|improve this question











$endgroup$




bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • $begingroup$
    If you think that there is a problem to your model by the imbalanceness of the classes, have you considered using a resampling methods such SMOTE for oversappling?
    $endgroup$
    – JoPapou13
    Nov 7 '18 at 19:45










  • $begingroup$
    Yes, I have used smote method to oversample and then computed the above results.
    $endgroup$
    – Bhaskar Sharma
    Nov 7 '18 at 20:00














1












1








1





$begingroup$


I am working on multiclass-imbalanced data. My dependent variable is highly skewed.



           Injury

2(No Injury) 208753
1(Medium Injury) 22318
0(severe Injury) 3394


I have used random forest algorithm with parameter "class_weight='balanced' " to manage the class 2 imbalance.



I get the below results when I use average='micro'.



 [[   34   107   688]
[ 148 778 4592]
[ 905 4635 46730]]
Accuracy Score: 0.8110616374089428
precision score: 0.8110616374089428
Recall score: 0.8110616374089428
AUC Score: 0.8582962280567071
F1 score: 0.8110616374089428
Kappa Score: 0.05522284663052324


For the average = 'macro', the results are below.



[[   31   125   684]
[ 157 838 4559]
[ 890 4694 46639]]
Accuracy Score: 0.8104816009007626
precision score: 0.3586119227436326
Recall score: 0.3602869806251181
AUC Score: 0.5253225798824679
F1 score: 0.3592735337079687
Kappa Score: 0.06376296115668922


So, which results should I consider to evaluate the model? If I have to consider the macro, then my model performance is really bad. Please suggest if there are any methods to improve the precision, recall and AUC score?



If I consider micro results, my precision, recall, f1 score is same. How can I justify this in the project?



I am interested in medium and severe injuries. But individual class precisions 0.0312(severe), 0.1409(medium) for macro are very low. The overall precision score is also very low 0.35. Is it possible to increase these scores? Or Is it fine to consider these low values as my final results for the project? Any suggestions are greatly appreciated. NOTE: I have tried SMOTE oversampling and ensemble cross-validation with different algorithms but I ended up having precision and recall scores less than 50.



Any help would be appreciated.



Thank you.










share|improve this question











$endgroup$




I am working on multiclass-imbalanced data. My dependent variable is highly skewed.



           Injury

2(No Injury) 208753
1(Medium Injury) 22318
0(severe Injury) 3394


I have used random forest algorithm with parameter "class_weight='balanced' " to manage the class 2 imbalance.



I get the below results when I use average='micro'.



 [[   34   107   688]
[ 148 778 4592]
[ 905 4635 46730]]
Accuracy Score: 0.8110616374089428
precision score: 0.8110616374089428
Recall score: 0.8110616374089428
AUC Score: 0.8582962280567071
F1 score: 0.8110616374089428
Kappa Score: 0.05522284663052324


For the average = 'macro', the results are below.



[[   31   125   684]
[ 157 838 4559]
[ 890 4694 46639]]
Accuracy Score: 0.8104816009007626
precision score: 0.3586119227436326
Recall score: 0.3602869806251181
AUC Score: 0.5253225798824679
F1 score: 0.3592735337079687
Kappa Score: 0.06376296115668922


So, which results should I consider to evaluate the model? If I have to consider the macro, then my model performance is really bad. Please suggest if there are any methods to improve the precision, recall and AUC score?



If I consider micro results, my precision, recall, f1 score is same. How can I justify this in the project?



I am interested in medium and severe injuries. But individual class precisions 0.0312(severe), 0.1409(medium) for macro are very low. The overall precision score is also very low 0.35. Is it possible to increase these scores? Or Is it fine to consider these low values as my final results for the project? Any suggestions are greatly appreciated. NOTE: I have tried SMOTE oversampling and ensemble cross-validation with different algorithms but I ended up having precision and recall scores less than 50.



Any help would be appreciated.



Thank you.







machine-learning neural-network deep-learning multiclass-classification class-imbalance






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 '18 at 8:37







Bhaskar Sharma

















asked Nov 7 '18 at 9:30









Bhaskar SharmaBhaskar Sharma

183




183





bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community yesterday


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • $begingroup$
    If you think that there is a problem to your model by the imbalanceness of the classes, have you considered using a resampling methods such SMOTE for oversappling?
    $endgroup$
    – JoPapou13
    Nov 7 '18 at 19:45










  • $begingroup$
    Yes, I have used smote method to oversample and then computed the above results.
    $endgroup$
    – Bhaskar Sharma
    Nov 7 '18 at 20:00


















  • $begingroup$
    If you think that there is a problem to your model by the imbalanceness of the classes, have you considered using a resampling methods such SMOTE for oversappling?
    $endgroup$
    – JoPapou13
    Nov 7 '18 at 19:45










  • $begingroup$
    Yes, I have used smote method to oversample and then computed the above results.
    $endgroup$
    – Bhaskar Sharma
    Nov 7 '18 at 20:00
















$begingroup$
If you think that there is a problem to your model by the imbalanceness of the classes, have you considered using a resampling methods such SMOTE for oversappling?
$endgroup$
– JoPapou13
Nov 7 '18 at 19:45




$begingroup$
If you think that there is a problem to your model by the imbalanceness of the classes, have you considered using a resampling methods such SMOTE for oversappling?
$endgroup$
– JoPapou13
Nov 7 '18 at 19:45












$begingroup$
Yes, I have used smote method to oversample and then computed the above results.
$endgroup$
– Bhaskar Sharma
Nov 7 '18 at 20:00




$begingroup$
Yes, I have used smote method to oversample and then computed the above results.
$endgroup$
– Bhaskar Sharma
Nov 7 '18 at 20:00










2 Answers
2






active

oldest

votes


















0












$begingroup$

For imbalanced datasets you can employ F1 score. It considers both rare and common classes. You can take a look at this article if you are not familiar with that.






share|improve this answer









$endgroup$





















    0












    $begingroup$

    This answer explains how micro and macro are different and which one you should use.






    share|improve this answer











    $endgroup$














      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "557"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f40851%2fwhich-method-should-be-considered-to-evaluate-the-imbalanced-multi-class-classif%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0












      $begingroup$

      For imbalanced datasets you can employ F1 score. It considers both rare and common classes. You can take a look at this article if you are not familiar with that.






      share|improve this answer









      $endgroup$


















        0












        $begingroup$

        For imbalanced datasets you can employ F1 score. It considers both rare and common classes. You can take a look at this article if you are not familiar with that.






        share|improve this answer









        $endgroup$
















          0












          0








          0





          $begingroup$

          For imbalanced datasets you can employ F1 score. It considers both rare and common classes. You can take a look at this article if you are not familiar with that.






          share|improve this answer









          $endgroup$



          For imbalanced datasets you can employ F1 score. It considers both rare and common classes. You can take a look at this article if you are not familiar with that.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 7 '18 at 20:01









          VaalizaadehVaalizaadeh

          7,55062263




          7,55062263























              0












              $begingroup$

              This answer explains how micro and macro are different and which one you should use.






              share|improve this answer











              $endgroup$


















                0












                $begingroup$

                This answer explains how micro and macro are different and which one you should use.






                share|improve this answer











                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  This answer explains how micro and macro are different and which one you should use.






                  share|improve this answer











                  $endgroup$



                  This answer explains how micro and macro are different and which one you should use.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 8 '18 at 1:47

























                  answered Nov 7 '18 at 17:46









                  Gyan RanjanGyan Ranjan

                  3508




                  3508






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Data Science Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f40851%2fwhich-method-should-be-considered-to-evaluate-the-imbalanced-multi-class-classif%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to label and detect the document text images

                      Vallis Paradisi

                      Tabula Rosettana