{ "cells": [ { "cell_type": "markdown", "id": "ca95c55a", "metadata": {}, "source": [ "### Feature Summary\n", "\n", "Demographics\n", "Age, Gender (0 = Female, 1 = Male), BMI\n", "\n", "Lifestyle & Environmental (0–10 index)\n", "Smoking, Alcohol_Use, Obesity,\n", "Diet_Red_Meat, Diet_Salted_Processed, Fruit_Veg_Intake,\n", "Physical_Activity, Physical_Activity_Level,\n", "Air_Pollution, Occupational_Hazards, Calcium_Intake\n", "(Higher = greater exposure or intensity)\n", "\n", "Genetic / Medical Flags (0/1)\n", "Family_History, BRCA_Mutation, H_Pylori_Infection\n", "\n", "\n", "Engineered Fields\n", "Overall_Risk_Score — composite numeric index\n", "Risk_Level — categorical stratification of overall risk\n", "\n", "### Data Notes\n", "\n", "Prostate occurs only when Gender = 1 (male).\n", "\n", "A small number of male cases appear in Breast (rare but realistic).\n", "\n", "Risk_Level is moderately imbalanced (Medium majority).\n", "\n", "The composite score aligns directionally with exposure intensity\n", "(higher with smoking/pollution, lower with fruit/vegetable intake).\n" ] }, { "cell_type": "markdown", "id": "bdbad880", "metadata": {}, "source": [ "### Identification\n", "\n", "| Column | Meaning | Example | Explanation |\n", "| :-------------- | :-------------------------------------- | :------------------- | :----------------------------------------------------------- |\n", "| **Patient_ID** | Unique ID for each patient | `LU0000` | Used just to identify each record — not used for prediction. |\n", "| **Cancer_Type** | The type of cancer diagnosed or studied | `Breast`, `Prostate` | Indicates which cancer the patient has or is at risk for. |\n", "\n", "\n", "### Demographics\n", "\n", "| Column | Meaning | Example | Explanation |\n", "| :--------- | :------------------------------------------------------- | :------ | :------------------------------------------------------------------------------- |\n", "| **Age** | Age of the patient | `68` | Self-explanatory. Older age often increases risk. |\n", "| **Gender** | Biological sex of the patient (`0 = Female`, `1 = Male`) | `0` | Some cancers (like Prostate) are only in males, while Breast can appear in both. |\n", "| **BMI** | Body Mass Index (weight relative to height) | `28.0` | Higher BMI often correlates with obesity and higher risk levels. |\n", "\n", "### Lifestyle & Environmental Factors\n", "\n", "(All are index scores from 0–10, where higher = greater exposure or intensity)\n", "\n", "| Column | Meaning | Example | Explanation |\n", "| :-------------------------- | :---------------------------------------------- | :--------- | :-------------------------------------------------------------- |\n", "| **Smoking** | Smoking intensity or frequency | `7` | Higher means the person smokes more heavily. |\n", "| **Alcohol_Use** | Alcohol consumption level | `2` | Higher means drinks more often or heavily. |\n", "| **Obesity** | Obesity severity level | `8` | Reflects how overweight the person is — higher = more obese. |\n", "| **Diet_Red_Meat** | Intake of red meat | `5` | More red meat often linked with higher risk. |\n", "| **Diet_Salted_Processed** | Intake of salty or processed foods | `3` | High intake can raise certain cancer risks. |\n", "| **Fruit_Veg_Intake** | Fruit and vegetable consumption | `7` | Higher is healthier — tends to **lower risk**. |\n", "| **Physical_Activity** | Frequency or intensity of exercise | `4` | Higher = more active, generally lowers risk. |\n", "| **Physical_Activity_Level** | Activity rating (can be numeric or categorical) | `5` or `9` | Another indicator of how physically active a person is. |\n", "| **Air_Pollution** | Environmental air pollution exposure | `6` | High value means poor air quality where the person lives. |\n", "| **Occupational_Hazards** | Exposure to harmful substances at work | `3` | E.g., chemicals, dust, radiation — higher = more dangerous job. |\n", "| **Calcium_Intake** | Level of calcium in diet | `0` or `5` | Higher may be beneficial depending on the cancer type. |\n", "\n", "\n", "### Genetic / Medical Factors\n", "\n", "| Column | Meaning | Example | Explanation |\n", "| :--------------------- | :----------------------------------------- | :------ | :--------------------------------------------------------- |\n", "| **Family_History** | 1 if cancer runs in the family, else 0 | `0` | Indicates if close relatives had cancer. |\n", "| **BRCA_Mutation** | 1 if BRCA gene mutation present | `1` | Strong genetic risk factor (especially for breast cancer). |\n", "| **H_Pylori_Infection** | 1 if Helicobacter pylori infection present | `0` | Linked to stomach and digestive cancers. |\n", "\n", "### Engineered (Calculated) Features\n", "\n", "| Column | Meaning | Example | Explanation |\n", "| :--------------------- | :----------------------------------------------- | :--------- | :----------------------------------------------------------------------------- |\n", "| **Overall_Risk_Score** | Combined numeric score of all risk factors | `0.398696` | A number that summarizes how risky the profile is overall. Higher = more risk. |\n", "| **Risk_Level** | Category of risk (e.g., `Low`, `Medium`, `High`) | `Medium` | Derived from the Overall_Risk_Score — easier for interpretation. |\n", "\n" ] }, { "cell_type": "code", "execution_count": 19, "id": "cfa68452", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | Patient_ID | \n", "Cancer_Type | \n", "Age | \n", "Gender | \n", "Smoking | \n", "Alcohol_Use | \n", "Obesity | \n", "Family_History | \n", "Diet_Red_Meat | \n", "Diet_Salted_Processed | \n", "Fruit_Veg_Intake | \n", "Physical_Activity | \n", "Air_Pollution | \n", "Occupational_Hazards | \n", "BRCA_Mutation | \n", "H_Pylori_Infection | \n", "Calcium_Intake | \n", "Overall_Risk_Score | \n", "BMI | \n", "Physical_Activity_Level | \n", "Risk_Level | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "LU0000 | \n", "Breast | \n", "68 | \n", "0 | \n", "7 | \n", "2 | \n", "8 | \n", "0 | \n", "5 | \n", "3 | \n", "7 | \n", "4 | \n", "6 | \n", "3 | \n", "1 | \n", "0 | \n", "0 | \n", "0.398696 | \n", "28.0 | \n", "5 | \n", "Medium | \n", "
| 1 | \n", "LU0001 | \n", "Prostate | \n", "74 | \n", "1 | \n", "8 | \n", "9 | \n", "8 | \n", "0 | \n", "0 | \n", "3 | \n", "7 | \n", "1 | \n", "3 | \n", "3 | \n", "0 | \n", "0 | \n", "5 | \n", "0.424299 | \n", "25.4 | \n", "9 | \n", "Medium | \n", "
| 2 | \n", "LU0002 | \n", "Skin | \n", "55 | \n", "1 | \n", "7 | \n", "10 | \n", "7 | \n", "0 | \n", "3 | \n", "3 | \n", "4 | \n", "1 | \n", "8 | \n", "10 | \n", "0 | \n", "0 | \n", "6 | \n", "0.605082 | \n", "28.6 | \n", "2 | \n", "Medium | \n", "
| 3 | \n", "LU0003 | \n", "Colon | \n", "61 | \n", "0 | \n", "6 | \n", "2 | \n", "2 | \n", "0 | \n", "6 | \n", "2 | \n", "4 | \n", "6 | \n", "4 | \n", "8 | \n", "0 | \n", "0 | \n", "8 | \n", "0.318449 | \n", "32.1 | \n", "7 | \n", "Low | \n", "
| 4 | \n", "LU0004 | \n", "Lung | \n", "67 | \n", "1 | \n", "10 | \n", "7 | \n", "4 | \n", "0 | \n", "6 | \n", "3 | \n", "10 | \n", "9 | \n", "10 | \n", "9 | \n", "0 | \n", "0 | \n", "5 | \n", "0.524358 | \n", "25.1 | \n", "2 | \n", "Medium | \n", "