{
  "id": 491227,
  "title": "Trouble understanding a depth=2 table",
  "url": "/competitions/home-credit-credit-risk-model-stability/discussion/491227",
  "author_name": "salamanda19",
  "post_date": "2024-04-05T04:35:06.819000",
  "votes": 4,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hi all, I need some help understanding a depth=2 table, particularly <code>person_2</code>.  </p>\n<p>The document says: &gt;In case <code>num_group1</code> or <code>num_group2</code> stands for person index (this is clear with predictor definitions) the zero index has special meaning. When <code>num_groupN</code>=0 it is the applicant (the person who applied for a loan).</p>\n<p>For example, let's look at one case where <code>case_id</code>=2701940:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3795525%2F605f9b779961f8c1aaf70574bea3c93b%2FCapture.PNG?generation=1712289907092124&amp;alt=media\" alt=\"image\"></p>\n<p>The feature definition mentions that: </p>\n<ol>\n<li><p><code>empls_economicalst_849M</code>, <code>empls_employedfrom_796D</code>, <code>empls_employer_name_740M</code>: <strong>num_group1 - person, num_group2 - employment</strong>, </p></li>\n<li><p><code>relatedpersons_role_762T</code>: <strong>num_group1 - person, num_group2 - related person</strong></p></li>\n</ol>\n<p>Up to this point my understanding is:</p>\n<ol>\n<li><p>The first 2 rows with <code>num_group1</code>=0 and <code>num_group2</code>=0 is of the applicant.</p></li>\n<li><p>The remaining rows with <code>num_group1</code>=1 is of another person.</p></li>\n</ol>\n<p>My question:</p>\n<ol>\n<li><p>In 1st row, the <code>relatedpersons_role_762T</code> field is 'SPOUSE'. How can the applicant be a spouse of himself?</p></li>\n<li><p>For the person <code>num_group1</code>=1 (let's call him/her person 1), these are 4 people related to him/her (row 3-6), who are of relationship 'OTHERS', 'SPOUSE', 'OTHER_RELATIVE' and 'PARENT' respectively.</p></li>\n<li><p>The 3rd row <code>num_group1</code>=1 and <code>num_group2</code>=0 shows that we have some employment record of this person (who is 'OTHER' of person 1).</p></li>\n<li><p>Person 1 also has 8 more people related to him/her (<code>num_group2</code>=4 to 11).</p></li>\n</ol>\n<p>Is my understanding correct?</p>",
  "messages": [
    {
      "id": 2736176,
      "postDate": "2024-04-05T04:35:06.820Z",
      "content": "<p>Hi all, I need some help understanding a depth=2 table, particularly <code>person_2</code>.  </p>\n<p>The document says: &gt;In case <code>num_group1</code> or <code>num_group2</code> stands for person index (this is clear with predictor definitions) the zero index has special meaning. When <code>num_groupN</code>=0 it is the applicant (the person who applied for a loan).</p>\n<p>For example, let's look at one case where <code>case_id</code>=2701940:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3795525%2F605f9b779961f8c1aaf70574bea3c93b%2FCapture.PNG?generation=1712289907092124&amp;alt=media\" alt=\"image\"></p>\n<p>The feature definition mentions that: </p>\n<ol>\n<li><p><code>empls_economicalst_849M</code>, <code>empls_employedfrom_796D</code>, <code>empls_employer_name_740M</code>: <strong>num_group1 - person, num_group2 - employment</strong>, </p></li>\n<li><p><code>relatedpersons_role_762T</code>: <strong>num_group1 - person, num_group2 - related person</strong></p></li>\n</ol>\n<p>Up to this point my understanding is:</p>\n<ol>\n<li><p>The first 2 rows with <code>num_group1</code>=0 and <code>num_group2</code>=0 is of the applicant.</p></li>\n<li><p>The remaining rows with <code>num_group1</code>=1 is of another person.</p></li>\n</ol>\n<p>My question:</p>\n<ol>\n<li><p>In 1st row, the <code>relatedpersons_role_762T</code> field is 'SPOUSE'. How can the applicant be a spouse of himself?</p></li>\n<li><p>For the person <code>num_group1</code>=1 (let's call him/her person 1), these are 4 people related to him/her (row 3-6), who are of relationship 'OTHERS', 'SPOUSE', 'OTHER_RELATIVE' and 'PARENT' respectively.</p></li>\n<li><p>The 3rd row <code>num_group1</code>=1 and <code>num_group2</code>=0 shows that we have some employment record of this person (who is 'OTHER' of person 1).</p></li>\n<li><p>Person 1 also has 8 more people related to him/her (<code>num_group2</code>=4 to 11).</p></li>\n</ol>\n<p>Is my understanding correct?</p>",
      "rawMarkdown": "Hi all, I need some help understanding a depth=2 table, particularly `person_2`.  \n\nThe document says: >In case `num_group1` or `num_group2` stands for person index (this is clear with predictor definitions) the zero index has special meaning. When `num_groupN`=0 it is the applicant (the person who applied for a loan).\n\nFor example, let's look at one case where `case_id`=2701940:\n\n![image](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3795525%2F605f9b779961f8c1aaf70574bea3c93b%2FCapture.PNG?generation=1712289907092124&alt=media)\n\nThe feature definition mentions that: \n1. `empls_economicalst_849M`, `empls_employedfrom_796D`, `empls_employer_name_740M`: **num_group1 - person, num_group2 - employment**, \n\n2. `relatedpersons_role_762T`: **num_group1 - person, num_group2 - related person**\n\nUp to this point my understanding is:\n\n1. The first 2 rows with `num_group1`=0 and `num_group2`=0 is of the applicant.\n\n2. The remaining rows with `num_group1`=1 is of another person.\n\nMy question:\n1. In 1st row, the `relatedpersons_role_762T` field is 'SPOUSE'. How can the applicant be a spouse of himself?\n\n2. For the person `num_group1`=1 (let's call him/her person 1), these are 4 people related to him/her (row 3-6), who are of relationship 'OTHERS', 'SPOUSE', 'OTHER_RELATIVE' and 'PARENT' respectively.\n\n3. The 3rd row `num_group1`=1 and `num_group2`=0 shows that we have some employment record of this person (who is 'OTHER' of person 1).\n\n4. Person 1 also has 8 more people related to him/her (`num_group2`=4 to 11).\n\nIs my understanding correct?",
      "votes": 4
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2736176": "Hi all, I need some help understanding a depth=2 table, particularly `person_2`.  \n\nThe document says: >In case `num_group1` or `num_group2` stands for person index (this is clear with predictor definitions) the zero index has special meaning. When `num_groupN`=0 it is the applicant (the person who applied for a loan).\n\nFor example, let's look at one case where `case_id`=2701940:\n\n![image](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3795525%2F605f9b779961f8c1aaf70574bea3c93b%2FCapture.PNG?generation=1712289907092124&alt=media)\n\nThe feature definition mentions that: \n1. `empls_economicalst_849M`, `empls_employedfrom_796D`, `empls_employer_name_740M`: **num_group1 - person, num_group2 - employment**, \n\n2. `relatedpersons_role_762T`: **num_group1 - person, num_group2 - related person**\n\nUp to this point my understanding is:\n\n1. The first 2 rows with `num_group1`=0 and `num_group2`=0 is of the applicant.\n\n2. The remaining rows with `num_group1`=1 is of another person.\n\nMy question:\n1. In 1st row, the `relatedpersons_role_762T` field is 'SPOUSE'. How can the applicant be a spouse of himself?\n\n2. For the person `num_group1`=1 (let's call him/her person 1), these are 4 people related to him/her (row 3-6), who are of relationship 'OTHERS', 'SPOUSE', 'OTHER_RELATIVE' and 'PARENT' respectively.\n\n3. The 3rd row `num_group1`=1 and `num_group2`=0 shows that we have some employment record of this person (who is 'OTHER' of person 1).\n\n4. Person 1 also has 8 more people related to him/her (`num_group2`=4 to 11).\n\nIs my understanding correct?"
  }
}