CoolFace
Apppublic

AmanullahShahzad75/Enhanced_Breast_Cancer_Synthetic_Data

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

Breast Cancer Clean and Fuzzy Data

This project focuses on generating synthetic breast cancer patient data with two variants: clean (perfect) data and fuzzy (noisy) data. The clean data is generated with realistic features such as age, menopausal status, tumor size, lymph node involvement, and treatment details, while the fuzzy data introduces noise to test the robustness of any data analysis.

Changes and Enhancements

This project was enhanced as part of an assignment provided by @michael lively, which focused on improving synthetic data creation. The following changes were made to the original code:

1. Synthetic Data Generation:

  • —The data generation was made more realistic, incorporating various features such as:
  • —Age, menopausal status, tumor size, lymph node involvement, tumor grade, and stage.
  • —ER, PR, HER2 status, Ki-67 level, TNBC status, BRCA mutation, and overall health.
  • —Genomic recurrence score and treatment recommendations based on tumor stage.
  • —The features were made dependent on one another to ensure that the data is consistent and reflects real-world patterns.

2. Fuzziness (Noise) Introduction:

  • —A function was introduced to add randomness and errors (10% error rate) to the dataset for testing the robustness of analysis tools.
  • —String variables like menopausal status and tumor status were swapped between values, while numerical data was modified with Gaussian noise.

3. Visualization:

  • —Added visualizations for key features such as tumor stage and tumor grade for both clean and fuzzy datasets using Seaborn and Matplotlib.
  • —The visualizations allow users to see how the data distributions differ between the clean and noisy datasets.

4. Streamlit Integration:

  • —The app allows users to input the number of patients and generates both clean and fuzzy datasets.
  • —It provides the ability to download both datasets as CSV files for further use.
  • —The app also includes the ability to visualize the data distributions.

Code Changes Summary

Before:

  • —The original code generated synthetic data, but it lacked realistic dependencies between variables and visualization features.
  • —There was no option to add noise or fuzziness to the data for testing purposes.

After:

  • —Introduced dependencies between features, such as the relationship between tumor size and lymph node involvement.
  • —Added a noise function to introduce fuzziness in the data for robustness testing.
  • —Integrated visualizations to compare the clean and fuzzy datasets.
  • —Provided functionality for downloading both datasets and visualizing key attributes.

How to Use

  1. 1.Enter the number of patients to generate synthetic data.
  2. 2.Click on "Generate Data" to see both clean and noisy datasets.
  3. 3.Download the datasets using the provided buttons.
  4. 4.Visualize distributions of key features like tumor stage and grade.

Enjoy working with synthetic breast cancer data for your analysis and testing!


Note: This project is based on an assignment provided by @michael lively, aimed at enhancing synthetic data creation for breast cancer datasets.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference