{
  "id": 348109,
  "title": "Open Sourcing Some Code on Measuring FTUs",
  "url": "/competitions/hubmap-organ-segmentation/discussion/348109",
  "author_name": "Ravi Shah",
  "post_date": "2022-08-27T00:37:05.558000",
  "votes": 3,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I realized I won't have much more time to spend on this competition, so I decided to publish some code I wrote. It can definitely be improved and expanded, and I think it can be used in a variety of ways. Hopefully someone finds it useful.</p>\n<p><a href=\"https://www.kaggle.com/code/ravishah1/measuring-functional-tissue-units\" target=\"_blank\">notebook</a></p>\n<p><strong>This notebook has a few uses:</strong></p>\n<ol>\n<li>EDA - you can use the classes in this notebook to help you expand your EDA</li>\n<li>Features - this notebook creates a few features such as area (µm) and compute_polsby_popper (measures the compactness of an organ on a scale of 0 to 1 where 1 is the most compactly shaped) - these features could potentially be used to improve a ML model or post processing</li>\n<li>Judges Prize - one of the questions to answer for the judges prize is \"Is it possible to predict FTU area size distribution, given age and sex info across all organs?\" The dataset generated at the end of this notebook can help you get started on this task</li>\n</ol>\n<p><strong>Methodology</strong></p>\n<ul>\n<li>I have a config class and utils file for basics</li>\n<li>The FTU class represents any one functional tissue unit as a shapely Polygon. It calculates features such as the area, perimeter, compactness, etc for each FTU.</li>\n<li>The organ class represents any organ sample. The organ consists of a list of FTUs. It makes it easy to analyze any organ, perform EDA, and extract features.</li>\n<li>I show an example of one of each type of organ</li>\n<li>Create an Organ object for each sample. Use that to create a pandas dataframe with each feature for every organ</li>\n</ul>",
  "messages": [
    {
      "id": 1915413,
      "postDate": "2022-08-27T00:37:05.560Z",
      "content": "<p>I realized I won't have much more time to spend on this competition, so I decided to publish some code I wrote. It can definitely be improved and expanded, and I think it can be used in a variety of ways. Hopefully someone finds it useful.</p>\n<p><a href=\"https://www.kaggle.com/code/ravishah1/measuring-functional-tissue-units\" target=\"_blank\">notebook</a></p>\n<p><strong>This notebook has a few uses:</strong></p>\n<ol>\n<li>EDA - you can use the classes in this notebook to help you expand your EDA</li>\n<li>Features - this notebook creates a few features such as area (µm) and compute_polsby_popper (measures the compactness of an organ on a scale of 0 to 1 where 1 is the most compactly shaped) - these features could potentially be used to improve a ML model or post processing</li>\n<li>Judges Prize - one of the questions to answer for the judges prize is \"Is it possible to predict FTU area size distribution, given age and sex info across all organs?\" The dataset generated at the end of this notebook can help you get started on this task</li>\n</ol>\n<p><strong>Methodology</strong></p>\n<ul>\n<li>I have a config class and utils file for basics</li>\n<li>The FTU class represents any one functional tissue unit as a shapely Polygon. It calculates features such as the area, perimeter, compactness, etc for each FTU.</li>\n<li>The organ class represents any organ sample. The organ consists of a list of FTUs. It makes it easy to analyze any organ, perform EDA, and extract features.</li>\n<li>I show an example of one of each type of organ</li>\n<li>Create an Organ object for each sample. Use that to create a pandas dataframe with each feature for every organ</li>\n</ul>",
      "rawMarkdown": "I realized I won't have much more time to spend on this competition, so I decided to publish some code I wrote. It can definitely be improved and expanded, and I think it can be used in a variety of ways. Hopefully someone finds it useful.\n\n[notebook](https://www.kaggle.com/code/ravishah1/measuring-functional-tissue-units)\n\n**This notebook has a few uses:**\n1. EDA - you can use the classes in this notebook to help you expand your EDA\n2. Features - this notebook creates a few features such as area (µm) and compute_polsby_popper (measures the compactness of an organ on a scale of 0 to 1 where 1 is the most compactly shaped) - these features could potentially be used to improve a ML model or post processing\n3. Judges Prize - one of the questions to answer for the judges prize is \"Is it possible to predict FTU area size distribution, given age and sex info across all organs?\" The dataset generated at the end of this notebook can help you get started on this task\n\n**Methodology**\n- I have a config class and utils file for basics\n- The FTU class represents any one functional tissue unit as a shapely Polygon. It calculates features such as the area, perimeter, compactness, etc for each FTU.\n- The organ class represents any organ sample. The organ consists of a list of FTUs. It makes it easy to analyze any organ, perform EDA, and extract features.\n- I show an example of one of each type of organ\n- Create an Organ object for each sample. Use that to create a pandas dataframe with each feature for every organ",
      "votes": 3
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1915413": "I realized I won't have much more time to spend on this competition, so I decided to publish some code I wrote. It can definitely be improved and expanded, and I think it can be used in a variety of ways. Hopefully someone finds it useful.\n\n[notebook](https://www.kaggle.com/code/ravishah1/measuring-functional-tissue-units)\n\n**This notebook has a few uses:**\n1. EDA - you can use the classes in this notebook to help you expand your EDA\n2. Features - this notebook creates a few features such as area (µm) and compute_polsby_popper (measures the compactness of an organ on a scale of 0 to 1 where 1 is the most compactly shaped) - these features could potentially be used to improve a ML model or post processing\n3. Judges Prize - one of the questions to answer for the judges prize is \"Is it possible to predict FTU area size distribution, given age and sex info across all organs?\" The dataset generated at the end of this notebook can help you get started on this task\n\n**Methodology**\n- I have a config class and utils file for basics\n- The FTU class represents any one functional tissue unit as a shapely Polygon. It calculates features such as the area, perimeter, compactness, etc for each FTU.\n- The organ class represents any organ sample. The organ consists of a list of FTUs. It makes it easy to analyze any organ, perform EDA, and extract features.\n- I show an example of one of each type of organ\n- Create an Organ object for each sample. Use that to create a pandas dataframe with each feature for every organ"
  }
}