# sifat192/social-network-ads-ml architecture

> Architecture diagram of the GitHub repository sifat192/social-network-ads-ml, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sifat192/social-network-ads-ml
- Repository: https://github.com/sifat192/social-network-ads-ml

## Overview

This repository is a notebook-based classification project that predicts ad purchases from demographic data. Its documented workflow runs from loading the Social Network Ads dataset through preparation and exploration to logistic-regression training and evaluation. The README identifies accuracy, confusion matrix, and F1 score as evaluation measures. The notebook is not included in the excerpts, so the graph represents documented stages and does not assert implementation details beyond them.

Main entry points: [`Social_Network_Ads_model.ipynb`](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb) (Logistic regression), [`Social_Network_Ads.csv`](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads.csv) (Ads dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_prep["Data preparation"]
  node_ads_data["Ads dataset"]
  node_loading["Data loading"]
  node_cleaning["Data cleaning"]
  node_eda["Exploratory analysis"]
  node_features["Feature engineering"]
end

subgraph group_modeling["Modeling"]
  node_split["Train-test split"]
  node_logistic["Logistic regression"]
end

subgraph group_evaluation["Evaluation"]
  node_metrics["Model evaluation"]
  node_prediction["Purchase prediction"]
end

node_loading -->|"reads"| node_ads_data
node_loading -->|"passes data"| node_cleaning
node_cleaning -->|"precedes"| node_eda
node_eda -->|"precedes"| node_features
node_features -->|"precedes"| node_split
node_split -->|"precedes"| node_logistic
node_logistic -->|"evaluated by"| node_metrics
node_logistic -->|"predicts"| node_prediction

click node_ads_data "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads.csv"
click node_loading "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_cleaning "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_eda "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_features "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_split "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_logistic "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_metrics "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"
click node_prediction "https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb"

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_ads_data,node_loading,node_cleaning,node_eda,node_features toneBlue
class node_split,node_logistic toneAmber
class node_metrics,node_prediction toneMint
```

## Components

### Data preparation

- [Ads dataset](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads.csv): `Social_Network_Ads.csv`
- [Data loading](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`
- [Data cleaning](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`
- [Exploratory analysis](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`
- [Feature engineering](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`

### Modeling

- [Train-test split](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`
- [Logistic regression](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`

### Evaluation

- [Model evaluation](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`
- [Purchase prediction](https://github.com/sifat192/social-network-ads-ml/blob/main/Social_Network_Ads_model.ipynb): `Social_Network_Ads_model.ipynb`

## Connections

- Data loading → Ads dataset: reads (evidence: `README.md`)
- Data loading → Data cleaning: passes data (evidence: `README.md`)
- Data cleaning → Exploratory analysis: precedes (evidence: `README.md`)
- Exploratory analysis → Feature engineering: precedes (evidence: `README.md`)
- Feature engineering → Train-test split: precedes (evidence: `README.md`)
- Train-test split → Logistic regression: precedes (evidence: `README.md`)
- Logistic regression → Model evaluation: evaluated by (evidence: `README.md`)
- Logistic regression → Purchase prediction: predicts (evidence: `README.md`)
