# tulsip26-hub/loan-prediction-model_classification architecture

> Architecture diagram of the GitHub repository tulsip26-hub/loan-prediction-model_classification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tulsip26-hub/loan-prediction-model_classification
- Repository: https://github.com/tulsip26-hub/loan-prediction-model_classification

## Overview

This repository is a loan-approval classification project. Its documented workflow takes the loan dataset through cleaning, exploratory analysis, feature engineering, preprocessing and train/test splitting, then trains and evaluates classifiers, compares them, and identifies a best model. The README also describes feature-importance analysis. Source excerpts are empty, so the stage links reflect README documentation rather than verified implementation calls; the tree supports the listed module paths but not finer internal wiring.

Main entry points: [`src/model_build.py`](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py) (Train-test split), [`data/loan_data.csv`](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/data/loan_data.csv) (Loan dataset), [`src/data_ingestion.py`](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_ingestion.py) (Data ingestion), [`src/data_preprocessing.py`](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py) (Data cleaning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data analysis"]
  node_dataset[("Loan dataset<br/>[loan_data.csv]")]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_cleaning["Data cleaning"]
  node_eda["Exploratory analysis"]
end

subgraph group_prep["Feature preparation"]
  node_engineering["Feature engineering"]
  node_preprocessing["Data preprocessing"]
  node_split["Train-test split<br/>[model_build.py]"]
end

subgraph group_models["Modeling and assessment"]
  node_logistic["Logistic regression<br/>[model_build.py]"]
  node_tree["Decision tree<br/>[model_build.py]"]
  node_forest["Random forest<br/>[model_build.py]"]
  node_evaluation["Model evaluation<br/>[model_build.py]"]
  node_comparison["Model comparison<br/>[model_build.py]"]
  node_best["Best model<br/>[model_build.py]"]
  node_importance["Feature importance<br/>[model_build.py]"]
end

node_analyst(("Project user"))
node_decision["Approval prediction"]

node_analyst -->|"provides data"| node_dataset
node_dataset -->|"loads"| node_ingestion
node_ingestion -->|"supplies data"| node_cleaning
node_cleaning -->|"analyzes"| node_eda
node_eda -->|"informs"| node_engineering
node_engineering -->|"creates features"| node_preprocessing
node_preprocessing -->|"prepares data"| node_split
node_split -->|"trains"| node_logistic
node_split -->|"trains"| node_tree
node_split -->|"trains"| node_forest
node_logistic -->|"evaluated by"| node_evaluation
node_tree -->|"evaluated by"| node_evaluation
node_forest -->|"evaluated by"| node_evaluation
node_evaluation -->|"scores models"| node_comparison
node_comparison -->|"selects"| node_best
node_best -->|"analyzed for"| node_importance
node_best -->|"predicts approval"| node_decision

click node_dataset "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/data/loan_data.csv"
click node_ingestion "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_ingestion.py"
click node_cleaning "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py"
click node_eda "https://github.com/tulsip26-hub/loan-prediction-model_classification/tree/main/src"
click node_engineering "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py"
click node_preprocessing "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py"
click node_split "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_logistic "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_tree "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_forest "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_evaluation "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_comparison "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_best "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py"
click node_importance "https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.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_dataset,node_ingestion,node_cleaning,node_eda,node_analyst toneBlue
class node_engineering,node_preprocessing,node_split toneAmber
class node_logistic,node_tree,node_forest,node_evaluation,node_comparison,node_best,node_importance toneMint
class node_decision toneIndigo
```

## Components

### Data analysis

- [Loan dataset](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/data/loan_data.csv): `data/loan_data.csv`
- [Data ingestion](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_ingestion.py): `src/data_ingestion.py`
- [Data cleaning](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py): `src/data_preprocessing.py`
- [Exploratory analysis](https://github.com/tulsip26-hub/loan-prediction-model_classification/tree/main/src): `src`

### Feature preparation

- [Feature engineering](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py): `src/data_preprocessing.py`
- [Data preprocessing](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/data_preprocessing.py): `src/data_preprocessing.py`
- [Train-test split](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`

### Modeling and assessment

- [Logistic regression](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`
- [Decision tree](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`
- [Random forest](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`
- [Model evaluation](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`
- [Model comparison](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`
- [Best model](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`
- [Feature importance](https://github.com/tulsip26-hub/loan-prediction-model_classification/blob/main/src/model_build.py): `src/model_build.py`

### Other components

- **Project user**
- **Approval prediction**

## Connections

- Project user → Loan dataset: provides data
- Loan dataset → Data ingestion: loads
- Data ingestion → Data cleaning: supplies data
- Data cleaning → Exploratory analysis: analyzes
- Exploratory analysis → Feature engineering: informs
- Feature engineering → Data preprocessing: creates features
- Data preprocessing → Train-test split: prepares data
- Train-test split → Logistic regression: trains
- Train-test split → Decision tree: trains
- Train-test split → Random forest: trains
- Logistic regression → Model evaluation: evaluated by
- Decision tree → Model evaluation: evaluated by
- Random forest → Model evaluation: evaluated by
- Model evaluation → Model comparison: scores models
- Model comparison → Best model: selects
- Best model → Feature importance: analyzed for
- Best model → Approval prediction: predicts approval
