{
  "id": 183983,
  "title": "Multi-Label Classification Problem?",
  "url": "/competitions/rsna-str-pulmonary-embolism-detection/discussion/183983",
  "author_name": "Ronaldo S.A. Batista",
  "post_date": "2020-09-18T19:44:41.001000",
  "votes": 4,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hello Everyone, </p>\n<p>Given the label consistency Rules, neatly explained in this kernel <a href=\"https://www.kaggle.com/kozodoi/checking-the-label-consistency-requirements\" target=\"_blank\">https://www.kaggle.com/kozodoi/checking-the-label-consistency-requirements</a> by <a href=\"https://www.kaggle.com/kozodoi\" target=\"_blank\">@kozodoi</a>. </p>\n<p>A possible approaches would be to have a Binary Classification Problem with the images as a first stage and then with the result of this have other pipeline tackling the possible constraints, maybe as a Multi-Class Problem. This seems more complicated to me and we'd have to check the consistency of the results</p>\n<p>My question is if it makes sense to treat this problem as a Multi-Label Classification Problem, and to put the Consistency Constraints in the labels.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4616296%2Fdf4d1f41c372487daa4ddf9fec9e7f46%2FScreenshot_2020-09-05%2040250%20jpg%20(JPEG%20Image%201277%20%20723%20pixels).png?generation=1599297444118954&amp;alt=media\" alt=\"\"><br>\n<a href=\"https://www.kaggle.com/c/lish-moa/discussion/180500\" target=\"_blank\">Image Source</a> </p>\n<p>Given the abreviations:<br>\n<strong>pos</strong>      =  <code>pe_present_on_image&gt; 0.5</code> otherwise <strong>neg</strong><br>\n<strong>rvlt</strong>       =  <code>rv_lv_ratio_lt_1 &gt; 0.5</code><br>\n<strong>rvgte</strong>     =  <code>rv_lv_ratio_gte_1 &gt; 0.5</code><br>\n<strong>cpe</strong>      =  <code>central_pe &gt; 0.5</code><br>\n<strong>rpe</strong>       =  <code>rightsided_pe &gt; 0.5</code><br>\n<strong>lpe</strong>       =  <code>leftside_pe &gt; 0.5</code><br>\n<strong>accpe</strong>  =  <code>acute_and_chronic_pe &gt; 0.5</code><br>\n<strong>acpe</strong>    =  <code>chronic_pe &gt; 0.5</code><br>\n<strong>idt</strong>        =  <code>indeterminate</code> &gt; 0.5</p>\n<p>Following the consistency constraints, the possible labels would be ( in bold );</p>\n<ul>\n<li>pos<ul>\n<li>pos &amp; rvlt<ul>\n<li>pos &amp; rvlt &amp; cpe<ul>\n<li>pos &amp; rvlt &amp; cpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; rpe<ul>\n<li>pos &amp; rvlt &amp; rpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; lpe</li>\n<li>pos &amp; rvlt &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe<ul>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe &amp; acpe</li></ul></li></ul></li>\n<li>pos &amp; rvgte<ul>\n<li>pos &amp; rvgte &amp; cpe<ul>\n<li>pos &amp; rvgte &amp; cpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; rpe<ul>\n<li>pos &amp; rvgte &amp; rpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; lpe</li>\n<li>pos &amp; rvgte &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe<ul>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe &amp; acpe</li></ul></li></ul></li></ul></li>\n<li>neg</li>\n<li>idt</li>\n</ul>\n<p>I think I've exhausted the cases, given 44 possible labels. </p>\n<p>Please let me know of any mistakes.</p>\n<p>Does this make sense? What are the alternatives?</p>\n<p>What about the weights for each individual class. We would sum them?</p>",
  "messages": [
    {
      "id": 1016293,
      "postDate": "2020-09-18T19:44:41Z",
      "content": "<p>Hello Everyone, </p>\n<p>Given the label consistency Rules, neatly explained in this kernel <a href=\"https://www.kaggle.com/kozodoi/checking-the-label-consistency-requirements\" target=\"_blank\">https://www.kaggle.com/kozodoi/checking-the-label-consistency-requirements</a> by <a href=\"https://www.kaggle.com/kozodoi\" target=\"_blank\">@kozodoi</a>. </p>\n<p>A possible approaches would be to have a Binary Classification Problem with the images as a first stage and then with the result of this have other pipeline tackling the possible constraints, maybe as a Multi-Class Problem. This seems more complicated to me and we'd have to check the consistency of the results</p>\n<p>My question is if it makes sense to treat this problem as a Multi-Label Classification Problem, and to put the Consistency Constraints in the labels.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4616296%2Fdf4d1f41c372487daa4ddf9fec9e7f46%2FScreenshot_2020-09-05%2040250%20jpg%20(JPEG%20Image%201277%20%20723%20pixels).png?generation=1599297444118954&amp;alt=media\" alt=\"\"><br>\n<a href=\"https://www.kaggle.com/c/lish-moa/discussion/180500\" target=\"_blank\">Image Source</a> </p>\n<p>Given the abreviations:<br>\n<strong>pos</strong>      =  <code>pe_present_on_image&gt; 0.5</code> otherwise <strong>neg</strong><br>\n<strong>rvlt</strong>       =  <code>rv_lv_ratio_lt_1 &gt; 0.5</code><br>\n<strong>rvgte</strong>     =  <code>rv_lv_ratio_gte_1 &gt; 0.5</code><br>\n<strong>cpe</strong>      =  <code>central_pe &gt; 0.5</code><br>\n<strong>rpe</strong>       =  <code>rightsided_pe &gt; 0.5</code><br>\n<strong>lpe</strong>       =  <code>leftside_pe &gt; 0.5</code><br>\n<strong>accpe</strong>  =  <code>acute_and_chronic_pe &gt; 0.5</code><br>\n<strong>acpe</strong>    =  <code>chronic_pe &gt; 0.5</code><br>\n<strong>idt</strong>        =  <code>indeterminate</code> &gt; 0.5</p>\n<p>Following the consistency constraints, the possible labels would be ( in bold );</p>\n<ul>\n<li>pos<ul>\n<li>pos &amp; rvlt<ul>\n<li>pos &amp; rvlt &amp; cpe<ul>\n<li>pos &amp; rvlt &amp; cpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; rpe<ul>\n<li>pos &amp; rvlt &amp; rpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; lpe</li>\n<li>pos &amp; rvlt &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe<ul>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; rpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvlt &amp; cpe &amp; rpe &amp; lpe &amp; acpe</li></ul></li></ul></li>\n<li>pos &amp; rvgte<ul>\n<li>pos &amp; rvgte &amp; cpe<ul>\n<li>pos &amp; rvgte &amp; cpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; rpe<ul>\n<li>pos &amp; rvgte &amp; rpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; lpe</li>\n<li>pos &amp; rvgte &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe<ul>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; rpe &amp; lpe &amp; acpe</li></ul></li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe<ul>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe &amp; accpe</li>\n<li>pos &amp; rvgte &amp; cpe &amp; rpe &amp; lpe &amp; acpe</li></ul></li></ul></li></ul></li>\n<li>neg</li>\n<li>idt</li>\n</ul>\n<p>I think I've exhausted the cases, given 44 possible labels. </p>\n<p>Please let me know of any mistakes.</p>\n<p>Does this make sense? What are the alternatives?</p>\n<p>What about the weights for each individual class. We would sum them?</p>",
      "rawMarkdown": "Hello Everyone, \n\nGiven the label consistency Rules, neatly explained in this kernel https://www.kaggle.com/kozodoi/checking-the-label-consistency-requirements by @kozodoi. \n\nA possible approaches would be to have a Binary Classification Problem with the images as a first stage and then with the result of this have other pipeline tackling the possible constraints, maybe as a Multi-Class Problem. This seems more complicated to me and we'd have to check the consistency of the results\n\nMy question is if it makes sense to treat this problem as a Multi-Label Classification Problem, and to put the Consistency Constraints in the labels.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4616296%2Fdf4d1f41c372487daa4ddf9fec9e7f46%2FScreenshot_2020-09-05%2040250%20jpg%20(JPEG%20Image%201277%20%20723%20pixels).png?generation=1599297444118954&alt=media)\n[Image Source](https://www.kaggle.com/c/lish-moa/discussion/180500) \n\nGiven the abreviations:\n**pos**      =  `pe_present_on_image> 0.5` otherwise **neg**\n**rvlt**       =  `rv_lv_ratio_lt_1 > 0.5`\n**rvgte**     =  `rv_lv_ratio_gte_1 > 0.5`\n**cpe**      =  `central_pe > 0.5`\n**rpe**       =  `rightsided_pe > 0.5`\n**lpe**       =  `leftside_pe > 0.5`\n**accpe**  =  `acute_and_chronic_pe > 0.5`\n**acpe**    =  `chronic_pe > 0.5`\n**idt**        =  `indeterminate` > 0.5\n\nFollowing the consistency constraints, the possible labels would be ( in bold );\n\n- pos\n    - pos & rvlt\n        - pos & rvlt & cpe\n            - pos & rvlt & cpe\n            - pos & rvlt & cpe & accpe\n            - pos & rvlt & cpe & acpe\n        - pos & rvlt & rpe\n            - pos & rvlt & rpe\n            - pos & rvlt & rpe & accpe\n            - pos & rvlt & rpe & acpe\n        - pos & rvlt & lpe\n            - pos & rvlt & lpe\n            - pos & rvlt & lpe & accpe\n            - pos & rvlt & lpe & acpe\n        - pos & rvlt & cpe & rpe\n            - pos & rvlt & cpe & rpe\n            - pos & rvlt & cpe & rpe & accpe\n            - pos & rvlt & cpe & rpe & acpe\n        - pos & rvlt & cpe & lpe\n            - pos & rvlt & cpe & lpe\n            - pos & rvlt & cpe & lpe & accpe\n            - pos & rvlt & cpe & lpe & acpe\n        - pos & rvlt & rpe & lpe\n            - pos & rvlt & rpe & lpe\n            - pos & rvlt & rpe & lpe & accpe\n            - pos & rvlt & rpe & lpe & acpe\n        - pos & rvlt & cpe & rpe & lpe\n            - pos & rvlt & cpe & rpe & lpe\n            - pos & rvlt & cpe & rpe & lpe & accpe\n            - pos & rvlt & cpe & rpe & lpe & acpe\n    - pos & rvgte\n        - pos & rvgte & cpe\n            - pos & rvgte & cpe\n            - pos & rvgte & cpe & accpe\n            - pos & rvgte & cpe & acpe\n        - pos & rvgte & rpe\n            - pos & rvgte & rpe\n            - pos & rvgte & rpe & accpe\n            - pos & rvgte & rpe & acpe\n        - pos & rvgte & lpe\n            - pos & rvgte & lpe\n            - pos & rvgte & lpe & accpe\n            - pos & rvgte & lpe & acpe\n        - pos & rvgte & cpe & rpe\n            - pos & rvgte & cpe & rpe\n            - pos & rvgte & cpe & rpe & accpe\n            - pos & rvgte & cpe & rpe & acpe\n        - pos & rvgte & cpe & lpe\n            - pos & rvgte & cpe & lpe\n            - pos & rvgte & cpe & lpe & accpe\n            - pos & rvgte & cpe & lpe & acpe\n        - pos & rvgte & rpe & lpe\n            - pos & rvgte & rpe & lpe\n            - pos & rvgte & rpe & lpe & accpe\n            - pos & rvgte & rpe & lpe & acpe\n        - pos & rvgte & cpe & rpe & lpe\n            - pos & rvgte & cpe & rpe & lpe\n            - pos & rvgte & cpe & rpe & lpe & accpe\n            - pos & rvgte & cpe & rpe & lpe & acpe\n- neg\n- idt\n\nI think I've exhausted the cases, given 44 possible labels. \n\nPlease let me know of any mistakes.\n\nDoes this make sense? What are the alternatives?\n\nWhat about the weights for each individual class. We would sum them?",
      "votes": 3
    },
    {
      "id": 1028365,
      "postDate": "2020-09-26T19:52:27.280Z",
      "content": "<p>my approach is to treat is as a multi-label classification, and at the end add another step - compliance resolving, i.e. I find all the compliance errors, and use a heuristic algorithm to make the minimal changes that resolve the  error. This heuristic cost me ~0.001 in LB to fully resolve all errors (I have ~50 errors to resolve on public test).</p>",
      "rawMarkdown": "my approach is to treat is as a multi-label classification, and at the end add another step - compliance resolving, i.e. I find all the compliance errors, and use a heuristic algorithm to make the minimal changes that resolve the  error. This heuristic cost me ~0.001 in LB to fully resolve all errors (I have ~50 errors to resolve on public test).",
      "votes": 4,
      "replies": [
        {
          "id": 1028368,
          "postDate": "2020-09-26T19:55:26.477Z",
          "content": "<p>Thanks <a href=\"https://www.kaggle.com/yuval6967\" target=\"_blank\">@yuval6967</a> , it means we can have  14  or (2 different heads)  multilabel classifications (based on whatever  pipeline individual choose to use) and still can get good results without complicating it further . Am I correct ?</p>",
          "rawMarkdown": "Thanks @yuval6967 , it means we can have  14  or (2 different heads)  multilabel classifications (based on whatever  pipeline individual choose to use) and still can get good results without complicating it further . Am I correct ?"
        },
        {
          "id": 1028381,
          "postDate": "2020-09-26T20:11:33.710Z",
          "content": "<p><a href=\"https://www.kaggle.com/phoenix9032\" target=\"_blank\">@phoenix9032</a> yes</p>",
          "rawMarkdown": "@phoenix9032 yes",
          "votes": 2
        },
        {
          "id": 1028442,
          "postDate": "2020-09-26T21:10:27.327Z",
          "content": "<p>Thank you very much <a href=\"https://www.kaggle.com/yuval\" target=\"_blank\">@yuval</a> for the input. I was complicating a lot then.</p>",
          "rawMarkdown": "Thank you very much @yuval for the input. I was complicating a lot then."
        }
      ]
    },
    {
      "id": 1028280,
      "postDate": "2020-09-26T18:31:24.353Z",
      "content": "<p>Somehow this question got lost in the discussion , not sure if you got the answer . I have just started this comp . What I understood so far , this problem relates to Hierarchical Multi-Label Classification problem .  What do you think?</p>\n<p>See this link for HMC<br>\n<a href=\"https://uh.edu/cbl/_files/publications/PR-2017-LZ.pdf\" target=\"_blank\">https://uh.edu/cbl/_files/publications/PR-2017-LZ.pdf</a> </p>",
      "rawMarkdown": "Somehow this question got lost in the discussion , not sure if you got the answer . I have just started this comp . What I understood so far , this problem relates to Hierarchical Multi-Label Classification problem .  What do you think?\n\nSee this link for HMC\nhttps://uh.edu/cbl/_files/publications/PR-2017-LZ.pdf \n",
      "replies": [
        {
          "id": 1028289,
          "postDate": "2020-09-26T18:41:13.747Z",
          "content": "<p>Hello, yes. My question got lost in the discussion. This approach of mine </p>\n<p>I still don't know how to model this problem.Thank you for the link, I'll check it out</p>",
          "rawMarkdown": "Hello, yes. My question got lost in the discussion. This approach of mine \n\nI still don't know how to model this problem.Thank you for the link, I'll check it out"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1028365,
      "author_name": "yuval reina",
      "author_url": "",
      "post_date": "2020-09-26T19:52:27.280000",
      "content": "<p>my approach is to treat is as a multi-label classification, and at the end add another step - compliance resolving, i.e. I find all the compliance errors, and use a heuristic algorithm to make the minimal changes that resolve the  error. This heuristic cost me ~0.001 in LB to fully resolve all errors (I have ~50 errors to resolve on public test).</p>",
      "votes": 4,
      "replies": [
        {
          "id": 1028368,
          "author_name": "Nirjhar Roy",
          "author_url": "",
          "post_date": "2020-09-26T19:55:26.477000",
          "content": "<p>Thanks <a href=\"https://www.kaggle.com/yuval6967\" target=\"_blank\">@yuval6967</a> , it means we can have  14  or (2 different heads)  multilabel classifications (based on whatever  pipeline individual choose to use) and still can get good results without complicating it further . Am I correct ?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1028381,
          "author_name": "yuval reina",
          "author_url": "",
          "post_date": "2020-09-26T20:11:33.710000",
          "content": "<p><a href=\"https://www.kaggle.com/phoenix9032\" target=\"_blank\">@phoenix9032</a> yes</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1028442,
          "author_name": "Ronaldo S.A. Batista",
          "author_url": "",
          "post_date": "2020-09-26T21:10:27.327000",
          "content": "<p>Thank you very much <a href=\"https://www.kaggle.com/yuval\" target=\"_blank\">@yuval</a> for the input. I was complicating a lot then.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1028280,
      "author_name": "Nirjhar Roy",
      "author_url": "",
      "post_date": "2020-09-26T18:31:24.353000",
      "content": "<p>Somehow this question got lost in the discussion , not sure if you got the answer . I have just started this comp . What I understood so far , this problem relates to Hierarchical Multi-Label Classification problem .  What do you think?</p>\n<p>See this link for HMC<br>\n<a href=\"https://uh.edu/cbl/_files/publications/PR-2017-LZ.pdf\" target=\"_blank\">https://uh.edu/cbl/_files/publications/PR-2017-LZ.pdf</a> </p>",
      "votes": 0,
      "replies": [
        {
          "id": 1028289,
          "author_name": "Ronaldo S.A. Batista",
          "author_url": "",
          "post_date": "2020-09-26T18:41:13.747000",
          "content": "<p>Hello, yes. My question got lost in the discussion. This approach of mine </p>\n<p>I still don't know how to model this problem.Thank you for the link, I'll check it out</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1016293": "Hello Everyone, \n\nGiven the label consistency Rules, neatly explained in this kernel https://www.kaggle.com/kozodoi/checking-the-label-consistency-requirements by @kozodoi. \n\nA possible approaches would be to have a Binary Classification Problem with the images as a first stage and then with the result of this have other pipeline tackling the possible constraints, maybe as a Multi-Class Problem. This seems more complicated to me and we'd have to check the consistency of the results\n\nMy question is if it makes sense to treat this problem as a Multi-Label Classification Problem, and to put the Consistency Constraints in the labels.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4616296%2Fdf4d1f41c372487daa4ddf9fec9e7f46%2FScreenshot_2020-09-05%2040250%20jpg%20(JPEG%20Image%201277%20%20723%20pixels).png?generation=1599297444118954&alt=media)\n[Image Source](https://www.kaggle.com/c/lish-moa/discussion/180500) \n\nGiven the abreviations:\n**pos**      =  `pe_present_on_image> 0.5` otherwise **neg**\n**rvlt**       =  `rv_lv_ratio_lt_1 > 0.5`\n**rvgte**     =  `rv_lv_ratio_gte_1 > 0.5`\n**cpe**      =  `central_pe > 0.5`\n**rpe**       =  `rightsided_pe > 0.5`\n**lpe**       =  `leftside_pe > 0.5`\n**accpe**  =  `acute_and_chronic_pe > 0.5`\n**acpe**    =  `chronic_pe > 0.5`\n**idt**        =  `indeterminate` > 0.5\n\nFollowing the consistency constraints, the possible labels would be ( in bold );\n\n- pos\n    - pos & rvlt\n        - pos & rvlt & cpe\n            - pos & rvlt & cpe\n            - pos & rvlt & cpe & accpe\n            - pos & rvlt & cpe & acpe\n        - pos & rvlt & rpe\n            - pos & rvlt & rpe\n            - pos & rvlt & rpe & accpe\n            - pos & rvlt & rpe & acpe\n        - pos & rvlt & lpe\n            - pos & rvlt & lpe\n            - pos & rvlt & lpe & accpe\n            - pos & rvlt & lpe & acpe\n        - pos & rvlt & cpe & rpe\n            - pos & rvlt & cpe & rpe\n            - pos & rvlt & cpe & rpe & accpe\n            - pos & rvlt & cpe & rpe & acpe\n        - pos & rvlt & cpe & lpe\n            - pos & rvlt & cpe & lpe\n            - pos & rvlt & cpe & lpe & accpe\n            - pos & rvlt & cpe & lpe & acpe\n        - pos & rvlt & rpe & lpe\n            - pos & rvlt & rpe & lpe\n            - pos & rvlt & rpe & lpe & accpe\n            - pos & rvlt & rpe & lpe & acpe\n        - pos & rvlt & cpe & rpe & lpe\n            - pos & rvlt & cpe & rpe & lpe\n            - pos & rvlt & cpe & rpe & lpe & accpe\n            - pos & rvlt & cpe & rpe & lpe & acpe\n    - pos & rvgte\n        - pos & rvgte & cpe\n            - pos & rvgte & cpe\n            - pos & rvgte & cpe & accpe\n            - pos & rvgte & cpe & acpe\n        - pos & rvgte & rpe\n            - pos & rvgte & rpe\n            - pos & rvgte & rpe & accpe\n            - pos & rvgte & rpe & acpe\n        - pos & rvgte & lpe\n            - pos & rvgte & lpe\n            - pos & rvgte & lpe & accpe\n            - pos & rvgte & lpe & acpe\n        - pos & rvgte & cpe & rpe\n            - pos & rvgte & cpe & rpe\n            - pos & rvgte & cpe & rpe & accpe\n            - pos & rvgte & cpe & rpe & acpe\n        - pos & rvgte & cpe & lpe\n            - pos & rvgte & cpe & lpe\n            - pos & rvgte & cpe & lpe & accpe\n            - pos & rvgte & cpe & lpe & acpe\n        - pos & rvgte & rpe & lpe\n            - pos & rvgte & rpe & lpe\n            - pos & rvgte & rpe & lpe & accpe\n            - pos & rvgte & rpe & lpe & acpe\n        - pos & rvgte & cpe & rpe & lpe\n            - pos & rvgte & cpe & rpe & lpe\n            - pos & rvgte & cpe & rpe & lpe & accpe\n            - pos & rvgte & cpe & rpe & lpe & acpe\n- neg\n- idt\n\nI think I've exhausted the cases, given 44 possible labels. \n\nPlease let me know of any mistakes.\n\nDoes this make sense? What are the alternatives?\n\nWhat about the weights for each individual class. We would sum them?",
    "1028365": "my approach is to treat is as a multi-label classification, and at the end add another step - compliance resolving, i.e. I find all the compliance errors, and use a heuristic algorithm to make the minimal changes that resolve the  error. This heuristic cost me ~0.001 in LB to fully resolve all errors (I have ~50 errors to resolve on public test).",
    "1028280": "Somehow this question got lost in the discussion , not sure if you got the answer . I have just started this comp . What I understood so far , this problem relates to Hierarchical Multi-Label Classification problem .  What do you think?\n\nSee this link for HMC\nhttps://uh.edu/cbl/_files/publications/PR-2017-LZ.pdf \n"
  }
}