# chalke-aayush-15/finance-loan-default-prediction architecture

> Architecture diagram of the GitHub repository chalke-aayush-15/finance-loan-default-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chalke-aayush-15/finance-loan-default-prediction
- Repository: https://github.com/chalke-aayush-15/finance-loan-default-prediction

## Overview

This repository documents an R loan-approval classification workflow: users run an analysis to prepare loan data, engineer features, train logistic-regression and random-forest models, evaluate them, and examine feature importance. The tree contains datasets, one R script, and a feature-importance output, but no source excerpts; the README also names a different, absent analysis-script path. Accordingly, script responsibilities and workflow links below reflect README claims, not verified calls in the available script.

Main entry points: [`scripts`](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts) (Analysis workflow), [`data/loan_data.csv`](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/loan_data.csv) (Loan dataset), [`data/train_data.csv`](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/train_data.csv) (Training data), [`data/test_data.csv`](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/test_data.csv) (Test data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data workflow"]
  node_runner["Analysis workflow"]
  node_generation["Data generation"]
  node_cleaning["Data cleaning"]
  node_engineering["Feature engineering"]
  node_split["Train-test split"]
  node_preprocess["Recipe preprocessing"]
end

subgraph group_models["Modeling"]
  node_logistic["Logistic regression"]
  node_forest["Random forest"]
end

subgraph group_analysis["Analysis outputs"]
  node_eda["Exploratory analysis"]
  node_evaluation["Model evaluation"]
  node_importance["Feature importance"]
end

subgraph group_assets["Project data"]
  node_loan_data["Loan dataset<br/>[loan_data.csv]"]
  node_train_data["Training data<br/>[train_data.csv]"]
  node_test_data["Test data<br/>[test_data.csv]"]
  node_importance_output["Importance results"]
end

node_applicant(("Analyst"))

node_applicant -->|"runs"| node_runner
node_runner -->|"generates"| node_generation
node_runner -->|"cleans"| node_cleaning
node_runner -->|"engineers"| node_engineering
node_runner -->|"splits"| node_split
node_runner -->|"visualizes"| node_eda
node_runner -->|"preprocesses"| node_preprocess
node_runner -->|"trains"| node_logistic
node_runner -->|"trains"| node_forest
node_runner -->|"evaluates"| node_evaluation
node_runner -->|"analyzes"| node_importance
node_runner -.->|"uses"| node_loan_data
node_runner -->|"creates"| node_train_data
node_runner -->|"creates"| node_test_data
node_importance -.->|"writes"| node_importance_output

click node_runner "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_generation "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_cleaning "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_engineering "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_split "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_eda "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_preprocess "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_logistic "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_forest "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_evaluation "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_importance "https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts"
click node_loan_data "https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/loan_data.csv"
click node_train_data "https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/train_data.csv"
click node_test_data "https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/test_data.csv"
click node_importance_output "https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/outputs/feature_importance.csv"

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_runner,node_generation,node_cleaning,node_engineering,node_split,node_preprocess toneBlue
class node_logistic,node_forest toneAmber
class node_eda,node_evaluation,node_importance toneMint
class node_loan_data,node_train_data,node_test_data,node_importance_output toneRose
class node_applicant toneIndigo
```

## Components

### Data workflow

- [Analysis workflow](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Data generation](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Data cleaning](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Feature engineering](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Train-test split](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Recipe preprocessing](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`

### Modeling

- [Logistic regression](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Random forest](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`

### Analysis outputs

- [Exploratory analysis](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Model evaluation](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`
- [Feature importance](https://github.com/chalke-aayush-15/finance-loan-default-prediction/tree/main/scripts): `scripts`

### Project data

- [Loan dataset](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/loan_data.csv): `data/loan_data.csv`
- [Training data](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/train_data.csv): `data/train_data.csv`
- [Test data](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/data/test_data.csv): `data/test_data.csv`
- [Importance results](https://github.com/chalke-aayush-15/finance-loan-default-prediction/blob/main/outputs/feature_importance.csv): `outputs/feature_importance.csv`

### Other components

- **Analyst**

## Connections

- Analyst → Analysis workflow: runs (evidence: `Readme.md`)
- Analysis workflow → Data generation: generates (evidence: `Readme.md`)
- Analysis workflow → Data cleaning: cleans (evidence: `Readme.md`)
- Analysis workflow → Feature engineering: engineers (evidence: `Readme.md`)
- Analysis workflow → Train-test split: splits (evidence: `Readme.md`)
- Analysis workflow → Exploratory analysis: visualizes (evidence: `Readme.md`)
- Analysis workflow → Recipe preprocessing: preprocesses (evidence: `Readme.md`)
- Analysis workflow → Logistic regression: trains (evidence: `Readme.md`)
- Analysis workflow → Random forest: trains (evidence: `Readme.md`)
- Analysis workflow → Model evaluation: evaluates (evidence: `Readme.md`)
- Analysis workflow → Feature importance: analyzes (evidence: `Readme.md`)
- Analysis workflow → Loan dataset: uses
- Analysis workflow → Training data: creates (evidence: `Readme.md`)
- Analysis workflow → Test data: creates (evidence: `Readme.md`)
- Feature importance → Importance results: writes
