{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# <strong><center>Introduction</center></strong>\n<p>\n    <div>Ovarian cancer is a type of cancer that begins in the ovaries, which are part of the female reproductive system. The ovaries are responsible for producing eggs and the female hormones estrogen and progesterone.</div>\n    <div>Ovarian cancer can develop in various parts of the ovaries and is classified into several different types, with the most common being epithelial ovarian cancer, which originates in the cells that cover the outer surface of the ovaries. Other less common types include germ cell tumors and stromal tumors.</div>\n    <div>The exact cause of ovarian cancer is not well understood, but there are certain risk factors that may increase a woman's likelihood of developing the disease. These risk factors include:</div>\n    <ol>\n        <li><strong>Age: </strong>Ovarian cancer is more common in women over the age of 50.</li>\n        <li><strong>Family history: </strong>Women with a family history of ovarian cancer or certain other cancers may be at higher risk.</li>\n        <li><strong>Inherited gene mutations: </strong>Some genetic mutations, such as BRCA1 and BRCA2, are associated with an increased risk of ovarian cancer.</li>\n        <li><strong>Personal history: </strong>A previous history of breast, colon, or uterine cancer may increase the risk.</li>\n        <li><strong>Reproductive factors: </strong>Factors like never having been pregnant, early onset of menstruation, and late onset of menopause may be associated with an increased risk.</li>\n        <li><strong>Hormone replacement therapy: </strong>Long-term use of hormone replacement therapy (estrogen without progesterone) may increase the risk.</li>\n    </ol>\n    <div>Symptoms of ovarian cancer can be vague and may include abdominal bloating, pelvic or abdominal pain, difficulty eating or feeling full quickly, and changes in bowel or urinary habits. These symptoms can often be mistaken for other less serious conditions, which can make early detection challenging.</div>\n    <div>The diagnosis of ovarian cancer typically involves a combination of medical history, physical examination, imaging tests (such as ultrasounds or CT scans), and blood tests to measure tumor markers. Ultimately, a definitive diagnosis is made through biopsy or surgery.</div>\n    <div>Treatment for ovarian cancer usually involves a combination of surgery, chemotherapy, and sometimes radiation therapy. The specific treatment plan will depend on the type and stage of the cancer, as well as the patient's overall health. Ovarian cancer is often diagnosed at advanced stages, which can make it more challenging to treat, so early detection and prompt medical intervention are crucial for improving outcomes.</div>\n</p>\n<center><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASUAAACsCAMAAAAKcUrhAAABX1BMVEX////eezvlwMLddjH+/Pv89/bddzLddS7qr5D89PDpqojprIzccynccCLcbx/deDXrtZn47evszsjanI+TAADz1MXvxbD15uP45dyVAA3xy7jpx8D23dHcopbkubDopoLXlIXy39vtu6LeqZ6WABX67ebgrqTVjX3lnHPaZgDy0L/x29f05ufuwarYlojjkWLnwLjQfmudKTLp1tfNdmLTh3XggkinSU/ij17LbVbMcVu/goWzZ2y0a3CaFiPPfGnCTi3m0NHIlZjYtbegMDi+OAClAADPYznhiFLlcCyrU1nNn6GYDR21am+jPUTYtrjARB3DXTewRTXHYEXaWh7viEDDio3ZXgC6eXzGeneqCh3OXCy1QkqsT1nScE/eimGbAAC1JTHGRQ6vLiPfmn+1OR+tOjCrMzK9V0aLGCGfGzF+CxPLi4ezMxTecj7JUyrSSwDvj1HAUCbQbkDPXxxpojjYAAAgAElEQVR4nO19i1/aWNr/AXKEyDUJkEhIuEQSIFyCiHdRtBcVq061jrPuzmw7nc5uf/u2+77t///5PeckQYKiYDs77X74tkLISZ6c881zO5cAQjPMMMMMM8wwwwwzzDDDDDPMMMMMM/w5wP2r7cv22GLusj+uiEnnyqHsH1Kpbw3thcVkciG5Oa68lnwypqQUicYA5T+oYt8UjrubHPZ3F04RxvCRIS+1NudsYoap1WAbt8krfIQy98y5YFkqVYOxDGyXJHoyixiJpYWs816S6CdkS/9ecbp4Qt76x0comYSNzWSvt5RMJlcxOk3unST7XPIE4SPYc9xDTPJoK7mwSAlD1egKecvmsqgeq1QqOYRylWIlFgsBKwexWKXJICleqURTSPpxvknKv1tcLu6Rt9riIjpa9CPUXUDJhX5ve3ETnR53l174uYVVdJW88vePjxGz0D3pb3WP6J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uid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19"}},{"cell_type":"code","source":"import os\nimport random\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport plotly.express as px\nimport plotly.offline as pyo\nfrom IPython.display import HTML","metadata":{"execution":{"iopub.status.busy":"2023-10-18T07:12:16.649206Z","iopub.execute_input":"2023-10-18T07:12:16.649653Z","iopub.status.idle":"2023-10-18T07:12:16.655882Z","shell.execute_reply.started":"2023-10-18T07:12:16.64962Z","shell.execute_reply":"2023-10-18T07:12:16.65472Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <center><strong>Configs and Utils</strong></center>","metadata":{}},{"cell_type":"code","source":"train_csv_path = \"/kaggle/input/UBC-OCEAN/train.csv\"\ntrain_images_path = \"/kaggle/input/UBC-OCEAN/train_images\"\ntrain_thumbnails_path = \"/kaggle/input/UBC-OCEAN/train_thumbnails\"\ntest_csv_path = \"/kaggle/input/UBC-OCEAN/test.csv\"\ntest_images_path = \"/kaggle/input/UBC-OCEAN/test_images\"\ntest_thumbnails_path = \"/kaggle/input/UBC-OCEAN/test_images\"","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:25:40.082972Z","iopub.execute_input":"2023-10-18T06:25:40.083585Z","iopub.status.idle":"2023-10-18T06:25:40.08909Z","shell.execute_reply.started":"2023-10-18T06:25:40.083554Z","shell.execute_reply":"2023-10-18T06:25:40.088221Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Plot some random images from a folder\ndef plot_images(folder_path: str, resize: bool = False):\n    # Get a list of image file names in the folder\n    image_files = [f for f in os.listdir(folder_path) if f.endswith(('.jpg', '.jpeg', '.png', '.gif'))]\n    # Number of random images to plot\n    num_images_to_plot = 6\n    # Select random images\n    selected_images = random.sample(image_files, num_images_to_plot)\n    # Create subplots to display the selected images\n    fig, axes = plt.subplots(2, 3, figsize=(12, 8))\n    for i, ax in enumerate(axes.flat):\n        if i < num_images_to_plot:\n            image_path = os.path.join(folder_path, selected_images[i])\n            img = Image.open(image_path)\n            if resize:\n                img = img.resize((512,512))\n            img = np.array(img)\n            ax.imshow(img)\n            ax.set_title(selected_images[i])\n            ax.axis('off')\n    # Adjust spacing and display the plot\n    plt.tight_layout()\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:25:57.040899Z","iopub.execute_input":"2023-10-18T06:25:57.041727Z","iopub.status.idle":"2023-10-18T06:25:57.050211Z","shell.execute_reply.started":"2023-10-18T06:25:57.041686Z","shell.execute_reply":"2023-10-18T06:25:57.049001Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Plot bar plot\ndef bar_plot(df: pd.DataFrame, x: str, y: str):\n    # Create a barplot\n    sns.set(style=\"whitegrid\")  # Set the style (optional)\n    #plt.figure(figsize=(8, 6))  # Set the figure size (optional)\n    sns.barplot(data=df, x=x, y=y, palette=\"Blues\")  # Create the barplot\n    # Add labels and a title\n    plt.xlabel(x)\n    plt.ylabel(y)\n    plt.title(\"Barplot of {} and {}\".format(x, y))\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2023-10-18T07:49:57.666568Z","iopub.execute_input":"2023-10-18T07:49:57.667055Z","iopub.status.idle":"2023-10-18T07:49:57.674527Z","shell.execute_reply.started":"2023-10-18T07:49:57.667001Z","shell.execute_reply":"2023-10-18T07:49:57.672985Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Plot histogram plot\ndef hist_plot(df: pd.DataFrame, x: str):\n    # Create a histogram using Seaborn\n    sns.set(style=\"whitegrid\")  # Set the style (optional)\n    #plt.figure(figsize=(8, 6))  # Set the figure size\n    # Create the histogram\n    sns.histplot(df[x].to_list(), kde=True, color='blue')\n    # Set labels and title\n    plt.xlabel(x)\n    plt.ylabel('Frequency')\n    plt.title('Histogram of {}'.format(x))\n    # Show the histogram\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2023-10-18T07:49:35.264485Z","iopub.execute_input":"2023-10-18T07:49:35.264932Z","iopub.status.idle":"2023-10-18T07:49:35.272238Z","shell.execute_reply.started":"2023-10-18T07:49:35.264892Z","shell.execute_reply":"2023-10-18T07:49:35.270762Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <strong><center>Plot Train Thumbnails</center></strong>","metadata":{}},{"cell_type":"code","source":"plot_images(train_thumbnails_path)","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:25:58.395341Z","iopub.execute_input":"2023-10-18T06:25:58.396472Z","iopub.status.idle":"2023-10-18T06:26:06.372899Z","shell.execute_reply.started":"2023-10-18T06:25:58.396434Z","shell.execute_reply":"2023-10-18T06:26:06.371786Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <strong><center>Explore Train Metadata</center></strong>","metadata":{}},{"cell_type":"code","source":"df = pd.read_csv(train_csv_path)","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:32:44.682928Z","iopub.execute_input":"2023-10-18T06:32:44.683351Z","iopub.status.idle":"2023-10-18T06:32:44.692195Z","shell.execute_reply.started":"2023-10-18T06:32:44.683319Z","shell.execute_reply":"2023-10-18T06:32:44.691323Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:32:51.424584Z","iopub.execute_input":"2023-10-18T06:32:51.424981Z","iopub.status.idle":"2023-10-18T06:32:51.435758Z","shell.execute_reply.started":"2023-10-18T06:32:51.424954Z","shell.execute_reply":"2023-10-18T06:32:51.434992Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.tail()","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:32:58.375033Z","iopub.execute_input":"2023-10-18T06:32:58.375605Z","iopub.status.idle":"2023-10-18T06:32:58.387204Z","shell.execute_reply.started":"2023-10-18T06:32:58.37556Z","shell.execute_reply":"2023-10-18T06:32:58.385998Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(\"Size of the dataset: \", df.shape[0])","metadata":{"execution":{"iopub.status.busy":"2023-10-18T06:34:09.723071Z","iopub.execute_input":"2023-10-18T06:34:09.723519Z","iopub.status.idle":"2023-10-18T06:34:09.730218Z","shell.execute_reply.started":"2023-10-18T06:34:09.723464Z","shell.execute_reply":"2023-10-18T06:34:09.729057Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <center><strong>Dataset Balanced or Imbalanced?</strong></center>","metadata":{}},{"cell_type":"markdown","source":"<p>\n    From the plot it's clear that the dataset is <strong>imblanaced</strong>. Let's explore what the label means:<br>\n    <ul>\n        <li><strong>HGSC: </strong>HGSC stands for High-Grade Serous Carcinoma, which is the most common and aggressive type of epithelial ovarian cancer. Epithelial ovarian cancer originates in the cells that cover the surface of the ovaries. High-Grade Serous Carcinoma is characterized by the following features: Aggressiveness, High-Grade and Serous. High-Grade Serous Carcinoma is often associated with genetic mutations, particularly in the BRCA1 and BRCA2 genes, which are also linked to an increased risk of breast cancer. These mutations are thought to contribute to the development of this type of ovarian cancer. Women with these mutations have a higher risk of developing HGSC ovarian cancer, and it is often recommended that they undergo regular screening and risk-reduction measures.</li>\n        <li><strong>EC: </strong>EC ovarian cancer refers to Endometrioid Carcinoma of the Ovary, which is a specific subtype of ovarian cancer. It is named after its resemblance to endometrioid carcinoma of the endometrium, which is the inner lining of the uterus. This type of ovarian cancer originates in the tissue that lines the ovaries and is composed of cells that resemble those found in the endometrium. Key characteristics of EC ovarian cancer include: Histology, Association with Endometriosis and Grade.The treatment of EC ovarian cancer typically involves a combination of surgery and chemotherapy. The extent of surgery and the specific chemotherapy regimen will depend on the stage and grade of the cancer and the individual patient's medical condition.</li>\n        <li><strong>CC: </strong>CC ovarian cancer typically refers to Clear Cell Carcinoma of the Ovary, which is a specific subtype of ovarian cancer. This type of cancer is named after its histological appearance, where the tumor cells appear clear under a microscope due to the presence of clear cytoplasm. Clear cell carcinoma is a rare form of ovarian cancer, and it has distinct characteristics: Histology, Aggressiveness and Association with Endometriosis. The treatment for clear cell ovarian cancer generally involves surgery to remove the tumor, followed by chemotherapy. The specific treatment plan will depend on the stage, grade, and extent of the cancer, as well as the individual patient's medical condition.</li>\n        <li><strong>LGSC: </strong>LGSC ovarian cancer refers to Low-Grade Serous Carcinoma of the Ovary, which is a specific subtype of ovarian cancer. This type of cancer is characterized by its histological and biological features and is distinct from High-Grade Serous Carcinoma (HGSC), which is the more common and aggressive subtype of ovarian cancer.Key features of LGSC ovarian cancer include: Histology, Clinical Presentation, Mutation Profile and Response to Treatment. The treatment of LGSC ovarian cancer typically involves surgery to remove the tumor, and in some cases, it may also involve chemotherapy.</li>\n        <li><strong>MC: </strong>Mucinous Carcinoma (MC) of the Ovary is another specific subtype of ovarian cancer. Mucinous carcinomas are characterized by the type of cells from which they originate, which are mucin-producing cells. Mucin is a thick, gel-like substance that these cancer cells can produce. There are two main categories of mucinous carcinomas of the ovary: Intestinal-Type and Endocervical-Type. Mucinous carcinoma of the ovary is relatively rare compared to other ovarian cancer subtypes like serous carcinoma. The treatment for mucinous carcinoma typically involves surgery to remove the tumor, and the specific treatment plan will depend on the stage and extent of the cancer, as well as the patient's individual medical circumstances.</li>\n    </ul>\n</p>","metadata":{}},{"cell_type":"code","source":"label_df = pd.DataFrame(df['label'].value_counts())\nlabel_df.reset_index(inplace=True)\nbar_plot(label_df, 'label', 'count')\ndel(label_df)","metadata":{"execution":{"iopub.status.busy":"2023-10-18T08:42:54.882314Z","iopub.execute_input":"2023-10-18T08:42:54.882856Z","iopub.status.idle":"2023-10-18T08:42:55.162295Z","shell.execute_reply.started":"2023-10-18T08:42:54.882819Z","shell.execute_reply":"2023-10-18T08:42:55.161221Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <center><strong>Dimenssion of the Images</strong></center>","metadata":{}},{"cell_type":"markdown","source":"## <strong>Image Height</strong>","metadata":{}},{"cell_type":"code","source":"hist_plot(df, 'image_height')","metadata":{"execution":{"iopub.status.busy":"2023-10-18T07:49:40.299308Z","iopub.execute_input":"2023-10-18T07:49:40.299777Z","iopub.status.idle":"2023-10-18T07:49:40.815909Z","shell.execute_reply.started":"2023-10-18T07:49:40.299743Z","shell.execute_reply":"2023-10-18T07:49:40.81459Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## <strong>Image Width</strong>","metadata":{}},{"cell_type":"code","source":"hist_plot(df, 'image_width')","metadata":{"execution":{"iopub.status.busy":"2023-10-18T07:50:37.637053Z","iopub.execute_input":"2023-10-18T07:50:37.637506Z","iopub.status.idle":"2023-10-18T07:50:38.057986Z","shell.execute_reply.started":"2023-10-18T07:50:37.637476Z","shell.execute_reply":"2023-10-18T07:50:38.056913Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <strong><center>TMA</center></strong>\n<p>\n    <div>Tissue microarray (TMA) is a technology used in cancer research, including the study of ovarian cancer. It is not a type or subtype of ovarian cancer but rather a research technique used to examine and analyze ovarian cancer tissues and other types of cancer tissues. TMA is a high-throughput method for evaluating multiple tissue samples on a single microscope slide.</div>\n    <div>TMA is particularly useful in studying tissue-based factors in cancer, such as protein expression, genetic markers, and tissue characteristics. It helps researchers efficiently analyze a large number of tissue samples, which can aid in understanding the biology of ovarian cancer, identifying potential biomarkers, and developing targeted therapies.</div>\n    <div>It's important to note that TMA is a research method and not a specific type of ovarian cancer. Researchers use TMA as a tool to advance our understanding of different types and subtypes of ovarian cancer and to develop more effective diagnostic and treatment strategies.</div>\n</p>","metadata":{}},{"cell_type":"code","source":"tma_df = pd.DataFrame(df['is_tma'].value_counts())\ntma_df.reset_index(inplace=True)\nbar_plot(tma_df, 'is_tma', 'count')\ndel(tma_df)","metadata":{"execution":{"iopub.status.busy":"2023-10-18T07:55:07.2528Z","iopub.execute_input":"2023-10-18T07:55:07.253358Z","iopub.status.idle":"2023-10-18T07:55:07.539794Z","shell.execute_reply.started":"2023-10-18T07:55:07.253317Z","shell.execute_reply":"2023-10-18T07:55:07.538504Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# <strong><center>Please Upvote! If you like it.</center></strong>","metadata":{}}]}