# fahimfaysaltamim/cse437_repeatpurchaseusingml_8 architecture

> Architecture diagram of the GitHub repository fahimfaysaltamim/cse437_repeatpurchaseusingml_8, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8
- Repository: https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8

## Overview

This is a notebook-based data-science project for predicting whether identified Online Retail II customers make a valid purchase in a fixed future 90-day window. Its principal workflow moves from transaction audit and preprocessing through customer-level feature and label construction, model comparison and tuning, then threshold selection and untouched-test error analysis. Reusable date constants and a training-fitted quantile clipper form a small internal utility layer. The README documents the notebook order and capabilities; notebook internals were not sampled, so the edges reflect documented handoffs rather than inspected calls.

Main entry points: [`notebooks/01_data_audit_and_eda.ipynb`](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/01_data_audit_and_eda.ipynb) (Audit and EDA), [`notebooks/02_preprocessing.ipynb`](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/02_preprocessing.ipynb) (Transaction preprocessing), [`notebooks/03_feature_engineering.ipynb`](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/03_feature_engineering.ipynb) (Customer features and split), [`notebooks/04_modeling_and_tuning.ipynb`](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/04_modeling_and_tuning.ipynb) (Modeling and tuning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_prep["Data preparation"]
  node_audit["Audit and EDA"]
  node_preprocess["Transaction preprocessing"]
  node_utilities["Shared constants and clipper<br/>[utils.py]"]
end

subgraph group_modeling["Feature and modeling"]
  node_features["Customer features and split"]
  node_model_tuning["Modeling and tuning"]
end

subgraph group_reporting["Results and reporting"]
  node_evaluation["Test evaluation and errors"]
  node_report_builder["PDF report builder<br/>[build_report.py]"]
  node_report_markdown["Project report<br/>[report.md]"]
  node_report_pdf["PDF report<br/>[report.pdf]"]
end

node_analyst(("Project analyst"))
node_retail_workbook["Retail workbook"]

node_analyst -->|"runs first"| node_audit
node_retail_workbook -->|"audits data"| node_audit
node_audit -->|"then runs"| node_preprocess
node_preprocess -->|"then runs"| node_features
node_features -->|"then runs"| node_model_tuning
node_model_tuning -->|"then runs"| node_evaluation

click node_audit "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/01_data_audit_and_eda.ipynb"
click node_preprocess "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/02_preprocessing.ipynb"
click node_utilities "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/src/utils.py"
click node_features "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/03_feature_engineering.ipynb"
click node_model_tuning "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/04_modeling_and_tuning.ipynb"
click node_evaluation "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/05_evaluation_and_error_analysis.ipynb"
click node_report_builder "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/report/build_report.py"
click node_report_markdown "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/report/report.md"
click node_report_pdf "https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/report/report.pdf"

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_audit,node_preprocess,node_utilities toneBlue
class node_features,node_model_tuning toneAmber
class node_evaluation,node_report_builder,node_report_markdown,node_report_pdf toneMint
class node_analyst,node_retail_workbook toneIndigo
```

## Components

### Data preparation

- [Audit and EDA](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/01_data_audit_and_eda.ipynb): `notebooks/01_data_audit_and_eda.ipynb`
- [Transaction preprocessing](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/02_preprocessing.ipynb): `notebooks/02_preprocessing.ipynb`
- [Shared constants and clipper](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/src/utils.py): `src/utils.py`

### Feature and modeling

- [Customer features and split](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/03_feature_engineering.ipynb): `notebooks/03_feature_engineering.ipynb`
- [Modeling and tuning](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/04_modeling_and_tuning.ipynb): `notebooks/04_modeling_and_tuning.ipynb`

### Results and reporting

- [Test evaluation and errors](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/notebooks/05_evaluation_and_error_analysis.ipynb): `notebooks/05_evaluation_and_error_analysis.ipynb`
- [PDF report builder](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/report/build_report.py): `report/build_report.py`
- [Project report](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/report/report.md): `report/report.md`
- [PDF report](https://github.com/fahimfaysaltamim/cse437_repeatpurchaseusingml_8/blob/main/report/report.pdf): `report/report.pdf`

### Other components

- **Project analyst**
- **Retail workbook**

## Connections

- Project analyst → Audit and EDA: runs first (evidence: `README.md`)
- Retail workbook → Audit and EDA: audits data (evidence: `README.md`)
- Audit and EDA → Transaction preprocessing: then runs (evidence: `README.md`)
- Transaction preprocessing → Customer features and split: then runs (evidence: `README.md`)
- Customer features and split → Modeling and tuning: then runs (evidence: `README.md`)
- Modeling and tuning → Test evaluation and errors: then runs (evidence: `README.md`)
