# hegdechaitra/bank-marketing-campaign-analysis architecture

> Architecture diagram of the GitHub repository hegdechaitra/bank-marketing-campaign-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hegdechaitra/bank-marketing-campaign-analysis
- Repository: https://github.com/hegdechaitra/bank-marketing-campaign-analysis

## Overview

##### Project type and purpose
- This is a data‐analysis/ML pipeline project implemented as a Jupyter Notebook.
- Its goal is to ingest bank marketing campaign data, run preprocessing and a suite of ML algorithms (Logistic Regression, Decision Trees, Random Forest, Gradient Boosting, AdaBoost), evaluate feature importance, and produce actionable recommendations for the marketing team.

##### File structure
- Top‐level files:
- Bank_Marketing_Project.ipynb — the main interactive notebook containing code, narrative, and results
- bank-additional-full.csv — raw campaign data
- README.md — project overview and instructions
- PDFs (Bank Marketing Project.pdf, predicting-bank-marketing.pdf) — exported reports and writeups
- .DS_Store — macOS metadata (ignore in design)
- No separate “src” or “tests” directories: the notebook holds all stages from ingestion to reporting.
- Dependencies are managed implicitly (Python 3, pandas, scikit-learn, matplotlib/ seaborn).

##### Core components
a. Data Source
- bank-additional-full.csv
- (Optionally external metadata if any)
b. Data Ingestion & Preprocessing
- Libraries: pandas, numpy
- Steps: missing-value handling, encoding categorical variables, train/test split
c. Model Training & Selection
- Algorithms: Logistic Regression, Decision Trees, Random Forest, Gradient Boosting, AdaBoost
- Framework: scikit-learn
d. Evaluation & Feature Importance
- Cross-validation, accuracy/ROC metrics
- Feature importance extraction for tree-based models
e. Visualization & Reporting
- Plotting: matplotlib, seaborn
- Outputs: feature importance charts (s1.png, s2.png), PDF reports
f. Recommendations Engine (Business Logic)
- Translate model insights into marketing strategies
- Documented in notebook commentary and final PDFs

##### Architectural patterns and design principles
- Linear pipeline pattern (ETL → ML → Reporting)
- Single‐node batch processing within a Jupyter environment (no microservices)
- Modular separation within notebook cells: keep data preparation, modeling, evaluation, visualization in distinct sections
- Reproducibility principle: record all steps sequentially in the notebook, version‐control the .ipynb and data

##### Technology & frameworks
- Python 3 runtime
- pandas / numpy
- scikit-learn (for all ML algorithms)
- matplotlib / seaborn (for plots)
- Jupyter Notebook (interactive orchestration and documentation)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Project Overview"
        Readme["README.md"]:::doc
    end

    subgraph "Data"
        DataSource[(bank-additional-full.csv)]:::data
    end

    subgraph "Preprocessing"
        Preprocessing["Preprocessing: missing-value handling, encoding, train/test split"]:::compute
    end

    subgraph "Modeling"
        ModelingLR["Logistic Regression"]:::compute
        ModelingDT["Decision Trees"]:::compute
        ModelingRF["Random Forest"]:::compute
        ModelingGB["Gradient Boosting"]:::compute
        ModelingAB["AdaBoost"]:::compute
    end

    subgraph "Evaluation & Feature Importance"
        Evaluation["Evaluation & Feature Importance: cross-validation, metrics, feature importance extraction"]:::eval
    end

    subgraph "Reporting & Recommendations"
        Viz["Visualization: matplotlib/seaborn"]:::eval
        ReportPDF1["Bank Marketing Project.pdf"]:::biz
        ReportPDF2["predicting-bank-marketing.pdf"]:::biz
        Recommendations["Recommendations (business logic)"]:::biz
    end

    Readme --> DataSource
    DataSource --> Preprocessing
    Preprocessing --> ModelingLR
    Preprocessing --> ModelingDT
    Preprocessing --> ModelingRF
    Preprocessing --> ModelingGB
    Preprocessing --> ModelingAB
    ModelingLR --> Evaluation
    ModelingDT --> Evaluation
    ModelingRF --> Evaluation
    ModelingGB --> Evaluation
    ModelingAB --> Evaluation
    Evaluation --> Viz
    Viz --> ReportPDF1
    Viz --> ReportPDF2
    Viz --> Recommendations

    click Readme "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/README.md"
    click DataSource "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/bank-additional-full.csv"
    click Preprocessing "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click ModelingLR "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click ModelingDT "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click ModelingRF "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click ModelingGB "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click ModelingAB "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click Evaluation "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click Viz "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"
    click ReportPDF1 "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank Marketing Project.pdf"
    click ReportPDF2 "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/predicting-bank-marketing.pdf"
    click Recommendations "https://github.com/hegdechaitra/bank-marketing-campaign-analysis/blob/master/Bank_Marketing_Project.ipynb"

    classDef data fill:#a6cee3,stroke:#333,stroke-width:1px
    classDef compute fill:#b2df8a,stroke:#333,stroke-width:1px
    classDef eval fill:#fd8d3c,stroke:#333,stroke-width:1px
    classDef biz fill:#cab2d6,stroke:#333,stroke-width:1px
    classDef doc fill:#cccccc,stroke:#333,stroke-width:1px
```
