# alokyadav310703/ieee-cis-transaction-fraud-detection-system architecture

> Architecture diagram of the GitHub repository alokyadav310703/ieee-cis-transaction-fraud-detection-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system
- Repository: https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system

## Overview

This repository is a fraud-detection ML project with a Streamlit demo. The documented workflow takes IEEE-CIS transaction and identity data through preprocessing, feature engineering, model training and evaluation; the demo then transforms sample rows with saved preprocessing artifacts, scores them with LightGBM, and presents predictions and evaluation. The training notebook is documented but unsampled, so its detailed internal calls are not mapped. Relationships below rely on README statements or the shown app and pipeline excerpts.

Main entry points: [`notebooks/02_feature_engineering_&_model_training.ipynb`](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb) (Training pipeline), [`streamlit_app.py`](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.py) (Streamlit demo), [`notebooks/04_save_pipeline_artifacts.py`](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/04_save_pipeline_artifacts.py) (Artifact export), [`models/pipeline_artifacts.pkl`](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/models/pipeline_artifacts.pkl) (Pipeline artifacts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data"]
  node_kaggle_data[("IEEE-CIS data")]
  node_sample["Holdout sample<br/>[sample_1000.csv]"]
end

subgraph group_training["Model development"]
  node_eda["Exploratory analysis<br/>[01_eda.ipynb]"]
  node_train_pipeline["Training pipeline"]
  node_preprocess["Shared preprocessing<br/>[fraud_pipeline.py]"]
  node_feature_eng["Feature engineering<br/>[fraud_pipeline.py]"]
  node_imbalance["SMOTE balancing"]
  node_models_train["Model training"]
  node_ensemble["Rank ensemble"]
  node_artifact_writer["Artifact export"]
end

subgraph group_serving["Demo scoring"]
  node_artifacts["Pipeline artifacts"]
  node_model["LightGBM model<br/>[lgb_gbdt.txt]"]
  node_app["Streamlit demo<br/>[streamlit_app.py]"]
  node_transform["Inference transform<br/>[fraud_pipeline.py]"]
  node_scoring["Transaction scoring<br/>[streamlit_app.py]"]
end

subgraph group_results["Results"]
  node_evaluation["Model evaluation"]
  node_dashboard["Metrics and dashboard<br/>[streamlit_app.py]"]
end

node_operator(("Analyst"))

node_operator -->|"explores data"| node_eda
node_operator -->|"runs training"| node_train_pipeline
node_kaggle_data -->|"supplies data"| node_train_pipeline
node_kaggle_data -->|"supplies data"| node_eda
node_train_pipeline -->|"fits preprocessing"| node_preprocess
node_train_pipeline -->|"engineers features"| node_feature_eng
node_train_pipeline -->|"applies SMOTE"| node_imbalance
node_train_pipeline -->|"trains models"| node_models_train
node_train_pipeline -->|"combines predictions"| node_ensemble
node_train_pipeline -->|"evaluates models"| node_evaluation
node_operator -->|"exports artifacts"| node_artifact_writer
node_artifact_writer -->|"calls fit"| node_preprocess
node_artifact_writer -->|"writes artifacts"| node_artifacts
node_models_train -->|"saves model"| node_model
node_operator -->|"starts demo"| node_app
node_sample -->|"loads sample"| node_app
node_artifacts -->|"loads artifacts"| node_app
node_model -->|"loads model"| node_app
node_app -->|"calls transform"| node_transform
node_transform -->|"returns features"| node_scoring
node_app -->|"simulates transactions"| node_scoring
node_scoring -->|"shows results"| node_dashboard

click node_sample "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/data/sample_1000.csv"
click node_eda "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/01_eda.ipynb"
click node_train_pipeline "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb"
click node_preprocess "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/fraud_pipeline.py"
click node_feature_eng "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/fraud_pipeline.py"
click node_imbalance "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb"
click node_models_train "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb"
click node_ensemble "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb"
click node_evaluation "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb"
click node_artifact_writer "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/04_save_pipeline_artifacts.py"
click node_artifacts "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/models/pipeline_artifacts.pkl"
click node_model "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/models/lgb_gbdt.txt"
click node_app "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.py"
click node_transform "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/fraud_pipeline.py"
click node_scoring "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.py"
click node_dashboard "https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.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_kaggle_data,node_sample toneBlue
class node_eda,node_train_pipeline,node_preprocess,node_feature_eng,node_imbalance,node_models_train,node_ensemble,node_artifact_writer toneAmber
class node_artifacts,node_model,node_app,node_transform,node_scoring toneMint
class node_evaluation,node_dashboard toneRose
class node_operator toneIndigo
```

## Components

### Data

- **IEEE-CIS data**
- [Holdout sample](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/data/sample_1000.csv): `data/sample_1000.csv`

### Model development

- [Exploratory analysis](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/01_eda.ipynb): `notebooks/01_eda.ipynb`
- [Training pipeline](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb): `notebooks/02_feature_engineering_&_model_training.ipynb`
- [Shared preprocessing](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/fraud_pipeline.py): `fraud_pipeline.py`
- [Feature engineering](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/fraud_pipeline.py): `fraud_pipeline.py`
- [SMOTE balancing](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb): `notebooks/02_feature_engineering_&_model_training.ipynb`
- [Model training](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb): `notebooks/02_feature_engineering_&_model_training.ipynb`
- [Rank ensemble](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb): `notebooks/02_feature_engineering_&_model_training.ipynb`
- [Artifact export](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/04_save_pipeline_artifacts.py): `notebooks/04_save_pipeline_artifacts.py`

### Demo scoring

- [Pipeline artifacts](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/models/pipeline_artifacts.pkl): `models/pipeline_artifacts.pkl`
- [LightGBM model](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/models/lgb_gbdt.txt): `models/lgb_gbdt.txt`
- [Streamlit demo](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.py): `streamlit_app.py`
- [Inference transform](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/fraud_pipeline.py): `fraud_pipeline.py`
- [Transaction scoring](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.py): `streamlit_app.py`

### Results

- [Model evaluation](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/notebooks/02_feature_engineering_%26_model_training.ipynb): `notebooks/02_feature_engineering_&_model_training.ipynb`
- [Metrics and dashboard](https://github.com/alokyadav310703/ieee-cis-transaction-fraud-detection-system/blob/main/streamlit_app.py): `streamlit_app.py`

### Other components

- **Analyst**

## Connections

- Analyst → Exploratory analysis: explores data (evidence: `README.md`)
- Analyst → Training pipeline: runs training (evidence: `README.md`)
- IEEE-CIS data → Training pipeline: supplies data (evidence: `README.md`)
- IEEE-CIS data → Exploratory analysis: supplies data (evidence: `README.md`)
- Training pipeline → Shared preprocessing: fits preprocessing (evidence: `fraud_pipeline.py`)
- Training pipeline → Feature engineering: engineers features (evidence: `README.md`)
- Training pipeline → SMOTE balancing: applies SMOTE (evidence: `README.md`)
- Training pipeline → Model training: trains models (evidence: `README.md`)
- Training pipeline → Rank ensemble: combines predictions (evidence: `README.md`)
- Training pipeline → Model evaluation: evaluates models (evidence: `README.md`)
- Analyst → Artifact export: exports artifacts (evidence: `notebooks/04_save_pipeline_artifacts.py`)
- Artifact export → Shared preprocessing: calls fit (evidence: `notebooks/04_save_pipeline_artifacts.py`)
- Artifact export → Pipeline artifacts: writes artifacts (evidence: `notebooks/04_save_pipeline_artifacts.py`)
- Model training → LightGBM model: saves model (evidence: `README.md`)
- Analyst → Streamlit demo: starts demo (evidence: `streamlit_app.py`)
- Holdout sample → Streamlit demo: loads sample (evidence: `streamlit_app.py`)
- Pipeline artifacts → Streamlit demo: loads artifacts (evidence: `streamlit_app.py`)
- LightGBM model → Streamlit demo: loads model (evidence: `streamlit_app.py`)
- Streamlit demo → Inference transform: calls transform (evidence: `fraud_pipeline.py`)
- Inference transform → Transaction scoring: returns features (evidence: `fraud_pipeline.py`)
- Streamlit demo → Transaction scoring: simulates transactions (evidence: `streamlit_app.py`)
- Transaction scoring → Metrics and dashboard: shows results (evidence: `streamlit_app.py`)
