# shaiknawazshareef/breast-cancer-classification-using-machine-learning architecture

> Architecture diagram of the GitHub repository shaiknawazshareef/breast-cancer-classification-using-machine-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning
- Repository: https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning

## Overview

This Colab-style script uploads and reads the breast-cancer dataset, preprocesses its categorical data, splits features and labels, trains seven classifier configurations, and prints training/testing accuracy and test-set metrics. The README also describes comparing model performance. The graph groups preprocessing and modeling stages while keeping data loading and results visible. All implementation paths point to the single script; relationships are supported by its excerpt or explicit README workflow statements. The repository has no separate application layers or services beyond the Colab upload facility.

Main entry points: [`breast_cancer.py`](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py) (Feature split), [`breast-cancer .data`](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast-cancer%20.data) (Breast cancer data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_dataset["Breast cancer data"]
  node_loader["CSV loading<br/>[breast_cancer.py]"]
  node_cleaning["Missing-value imputation<br/>[breast_cancer.py]"]
  node_encoding["Label encoding<br/>[breast_cancer.py]"]
  node_split["Feature split<br/>[breast_cancer.py]"]
end

subgraph group_models["Model training"]
  node_perceptron["L1 perceptron<br/>[breast_cancer.py]"]
  node_logistic["Logistic regression<br/>[breast_cancer.py]"]
  node_trees["Decision trees<br/>[breast_cancer.py]"]
  node_svm["Polynomial SVM<br/>[breast_cancer.py]"]
  node_knn["3-neighbor KNN<br/>[breast_cancer.py]"]
  node_bayes["Gaussian naive Bayes<br/>[breast_cancer.py]"]
end

subgraph group_results["Evaluation"]
  node_evaluation["Metrics evaluation<br/>[breast_cancer.py]"]
  node_comparison["Model comparison<br/>[breast_cancer.py]"]
end

node_user(("Notebook user"))
node_colab["Colab upload"]

node_user -->|"uploads dataset"| node_colab
node_user -->|"runs workflow"| node_loader
node_loader -->|"requests upload"| node_colab
node_loader -->|"reads CSV"| node_dataset
node_loader -->|"checks and imputes"| node_cleaning
node_cleaning -->|"encodes categories"| node_encoding
node_encoding -->|"separates and splits"| node_split
node_split -->|"fits model"| node_perceptron
node_split -->|"fits model"| node_logistic
node_split -->|"fits models"| node_trees
node_split -->|"fits model"| node_svm
node_split -->|"fits model"| node_knn
node_split -->|"fits model"| node_bayes
node_perceptron -->|"predicts for scoring"| node_evaluation
node_logistic -->|"predicts for scoring"| node_evaluation
node_trees -->|"predicts for scoring"| node_evaluation
node_svm -->|"predicts for scoring"| node_evaluation
node_knn -->|"predicts for scoring"| node_evaluation
node_bayes -->|"predicts for scoring"| node_evaluation
node_evaluation -->|"prints results"| node_comparison

click node_dataset "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast-cancer%20.data"
click node_loader "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_cleaning "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_encoding "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_split "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_perceptron "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_logistic "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_trees "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_svm "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_knn "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_bayes "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_evaluation "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"
click node_comparison "https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_loader,node_cleaning,node_encoding,node_split,node_user toneBlue
class node_perceptron,node_logistic,node_trees,node_svm,node_knn,node_bayes toneAmber
class node_evaluation,node_comparison toneMint
class node_colab toneIndigo
```

## Components

### Data preparation

- [Breast cancer data](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast-cancer%20.data): `breast-cancer .data`
- [CSV loading](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Missing-value imputation](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Label encoding](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Feature split](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`

### Model training

- [L1 perceptron](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Logistic regression](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Decision trees](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Polynomial SVM](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [3-neighbor KNN](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Gaussian naive Bayes](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`

### Evaluation

- [Metrics evaluation](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`
- [Model comparison](https://github.com/shaiknawazshareef/breast-cancer-classification-using-machine-learning/blob/main/breast_cancer.py): `breast_cancer.py`

### Other components

- **Notebook user**
- **Colab upload**

## Connections

- Notebook user → Colab upload: uploads dataset (evidence: `README.md`)
- Notebook user → CSV loading: runs workflow (evidence: `README.md`)
- CSV loading → Colab upload: requests upload (evidence: `breast_cancer.py`)
- CSV loading → Breast cancer data: reads CSV (evidence: `breast_cancer.py`)
- CSV loading → Missing-value imputation: checks and imputes (evidence: `breast_cancer.py`)
- Missing-value imputation → Label encoding: encodes categories (evidence: `breast_cancer.py`)
- Label encoding → Feature split: separates and splits (evidence: `breast_cancer.py`)
- Feature split → L1 perceptron: fits model (evidence: `breast_cancer.py`)
- Feature split → Logistic regression: fits model (evidence: `breast_cancer.py`)
- Feature split → Decision trees: fits models (evidence: `breast_cancer.py`)
- Feature split → Polynomial SVM: fits model (evidence: `breast_cancer.py`)
- Feature split → 3-neighbor KNN: fits model (evidence: `breast_cancer.py`)
- Feature split → Gaussian naive Bayes: fits model (evidence: `breast_cancer.py`)
- L1 perceptron → Metrics evaluation: predicts for scoring (evidence: `breast_cancer.py`)
- Logistic regression → Metrics evaluation: predicts for scoring (evidence: `breast_cancer.py`)
- Decision trees → Metrics evaluation: predicts for scoring (evidence: `breast_cancer.py`)
- Polynomial SVM → Metrics evaluation: predicts for scoring (evidence: `breast_cancer.py`)
- 3-neighbor KNN → Metrics evaluation: predicts for scoring (evidence: `breast_cancer.py`)
- Gaussian naive Bayes → Metrics evaluation: predicts for scoring (evidence: `breast_cancer.py`)
- Metrics evaluation → Model comparison: prints results (evidence: `README.md`)
