# aayush-0131/12-jha-amritanshu-reddy-codes architecture

> Architecture diagram of the GitHub repository aayush-0131/12-jha-amritanshu-reddy-codes, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aayush-0131/12-jha-amritanshu-reddy-codes
- Repository: https://github.com/aayush-0131/12-jha-amritanshu-reddy-codes

## Overview

##### Project type and purpose
- This is an academic/research‐oriented data‐science project, not a full enterprise product. Its goal is to detect credit‐card fraud by formulating a convex optimization problem that minimizes the combined cost of false positives and false negatives.
- Key indicators: README title “Credit Card Fraud Detection and Cost Optimization Using Statistical Optimization Techniques,” no source code folders (only report, slides, README).

##### (minimal) file structure
- Top level contains documentation artifacts (PDF report, Quarto file, PowerPoint, README), no code folder.
- Implies the “system” is conceptual: data ingestion → model formulation → solver → evaluation/reporting.

##### README for additional insights
- Confirms use of Linear Programming (LP) and Quadratic Programming (QP).
- Team focused on modeling and cost formulation rather than deploying a microservice or web front end.

a. Main components
1. Data Source: Historical credit‐card transaction dataset (could be CSV or database).
2. Data Ingestion & Preprocessing: cleaning, feature extraction.
3. Cost Function Module: defines cost of FP and FN.
4. Optimization Model Builder: formulates LP/QP based on features and cost.
5. Solver Engine: uses an LP/QP solver library (e.g., CVX, Gurobi, CPLEX).
6. Results & Evaluation: computes confusion matrix, total cost.
7. Reporting/Visualization: generates tables, plots, and the project report.
b. Relationships & interactions
- Data flows from Data Source → Preprocessing → Model Builder.
- Model Builder interacts with Cost Function Module to parameterize the optimization.
- Model Builder sends the problem spec to Solver Engine.
- Solver Engine returns predicted labels → goes to Results & Evaluation.
- Evaluation outputs metrics to Reporting/Visualization.
c. Architectural patterns/principles
- Modular separation: data, cost definition, modeling, solving, evaluation.
- Pipeline pattern (linear flow of data through stages).
- Clear separation of concerns supports swapping solvers or cost functions.
d. Technologies/frameworks (if this were implemented)
- Data processing: Python pandas or R data.frame.
- Optimization modeling: cvxpy, PuLP, or JuMP.
- Solver back‐ends: Gurobi, CPLEX, OSQP.
- Reporting: Quarto (QMD), LaTeX/PDF, matplotlib or ggplot2.

##### Final recommendations
- Be as granular as it makes sense—e.g., split Preprocessing into Cleaning vs. Feature Engineering if your report covers both.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Layer
    subgraph "Data Layer"
        DataSource[(Historical Transaction Data)]:::data
        Preprocessing["Data Ingestion & Preprocessing"]:::data
    end

    %% Modeling Layer
    subgraph "Modeling Layer"
        CostFunction["Cost Function Module"]:::model
        ModelBuilder["Optimization Model Builder"]:::model
    end

    %% Solver
    SolverEngine((Solver Engine)):::solver

    %% Evaluation & Reporting
    subgraph "Evaluation & Reporting"
        Evaluation["Results & Evaluation"]:::report
        subgraph "Reporting/Visualization"
            ReportPDF["Project Report (PDF)"]:::doc
            QMDFile["Visualization Source (QMD)"]:::doc
            Slides["Presentation (PPTX)"]:::doc
        end
    end

    %% Documentation
    subgraph "Documentation"
        README["Project Overview / System Description"]:::doc
        License["License / External Dependencies"]:::doc
    end

    %% Data Flow
    DataSource -->|"raw data"| Preprocessing
    Preprocessing -->|"feature matrix X"| ModelBuilder
    CostFunction -->|"cost vector c"| ModelBuilder
    ModelBuilder -->|"optimization problem"| SolverEngine
    SolverEngine -->|"predicted labels"| Evaluation
    Evaluation -->|"metrics & insights"| ReportPDF
    Evaluation -->|"metrics & insights"| QMDFile
    Evaluation -->|"metrics & insights"| Slides

    %% Documentation links
    README --- DataSource
    License --- SolverEngine

    %% Click Events
    click ReportPDF "https://github.com/aayush-0131/12-jha-amritanshu-reddy-codes/blob/main/12-jha-amritanshu-reddy-project-report.pdf"
    click QMDFile "https://github.com/aayush-0131/12-jha-amritanshu-reddy-codes/blob/main/12-jha-amritanshu-reddy.qmd"
    click Slides "https://github.com/aayush-0131/12-jha-amritanshu-reddy-codes/blob/main/12-jha-amritanshu-reddy_presentation.pptx"
    click README "https://github.com/aayush-0131/12-jha-amritanshu-reddy-codes/blob/main/README.md"
    click License "https://github.com/aayush-0131/12-jha-amritanshu-reddy-codes/tree/main/LICENSE"

    %% Styles
    classDef data fill:#D6E9F8,stroke:#1E90FF
    classDef model fill:#DFF0D8,stroke:#3C763D
    classDef solver fill:#FCF8E3,stroke:#8A6D3B
    classDef report fill:#F5F5F5,stroke:#333
    classDef doc fill:#E8E8E8,stroke:#888
```
