# oneline47/dm_closure-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/oneline47/dm_closure-prediction
- Repository: https://github.com/oneline47/dm_closure-prediction

## Overview

This repository is an analytical project for early detection of small-business closure risk, not a deployed application. Its documented workflow combines merchant, sales, and commercial-district data; exploratory analysis and feature design; statistical checks; quarterly model training and risk interpretation; and proposed merchant-facing guidance. The README also describes merchant-type clustering and a proposed Closure Danger Monitor. The tree shows notebooks and data assets, but no source excerpts were available, so relationships below rely only on documented README statements; the monitor is a proposal, not evidenced implementation.

Main entry points: [`src`](https://github.com/oneline47/dm_closure-prediction/tree/main/src) (Feature engineering), [`src/2025빅콘테스트_제출용.ipynb`](https://github.com/oneline47/dm_closure-prediction/blob/main/src/2025%EB%B9%85%EC%BD%98%ED%85%8C%EC%8A%A4%ED%8A%B8_%EC%A0%9C%EC%B6%9C%EC%9A%A9.ipynb) (Risk scoring), [`data`](https://github.com/oneline47/dm_closure-prediction/tree/main/data) (Merchant datasets), [`notebooks/1_EDA.ipynb`](https://github.com/oneline47/dm_closure-prediction/blob/main/notebooks/1_EDA.ipynb) (Exploratory analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data inputs"]
  node_merchant_data[("Merchant datasets")]
  node_external_data[("External context")]
end

subgraph group_analysis["Analysis and modeling"]
  node_eda["Exploratory analysis<br/>[1_EDA.ipynb]"]
  node_feature_design["Feature engineering"]
  node_feature_tests["Feature validation"]
  node_quarter_models["Quarterly models"]
end

subgraph group_decision["Risk decisions"]
  node_risk_scoring["Risk scoring"]
  node_risk_explanations["Risk explanations"]
  node_merchant_segments["Merchant segments"]
  node_closure_monitor["Closure monitor"]
end

node_merchant(("Merchant"))
node_financial_partner(("Financial partner"))

node_merchant_data -->|"analyzed in"| node_eda
node_external_data -->|"fills missingness"| node_feature_design
node_eda -->|"informs features"| node_feature_design
node_feature_design -->|"tests features"| node_feature_tests
node_feature_design -->|"supplies features"| node_quarter_models
node_quarter_models -->|"predicts risk"| node_risk_scoring
node_risk_scoring -->|"explained by"| node_risk_explanations
node_risk_scoring -.->|"provides score"| node_closure_monitor
node_risk_explanations -.->|"guides diagnosis"| node_closure_monitor
node_merchant_data -->|"supports clustering"| node_merchant_segments
node_closure_monitor -.->|"offers guidance"| node_merchant
node_closure_monitor -.->|"supports decisions"| node_financial_partner

click node_merchant_data "https://github.com/oneline47/dm_closure-prediction/tree/main/data"
click node_external_data "https://github.com/oneline47/dm_closure-prediction/tree/main/data"
click node_eda "https://github.com/oneline47/dm_closure-prediction/blob/main/notebooks/1_EDA.ipynb"
click node_feature_design "https://github.com/oneline47/dm_closure-prediction/tree/main/src"
click node_feature_tests "https://github.com/oneline47/dm_closure-prediction/blob/main/notebooks/stat_diff_check.ipynb"
click node_quarter_models "https://github.com/oneline47/dm_closure-prediction/tree/main/src"
click node_risk_scoring "https://github.com/oneline47/dm_closure-prediction/blob/main/src/2025%EB%B9%85%EC%BD%98%ED%85%8C%EC%8A%A4%ED%8A%B8_%EC%A0%9C%EC%B6%9C%EC%9A%A9.ipynb"
click node_risk_explanations "https://github.com/oneline47/dm_closure-prediction/tree/main/src"
click node_merchant_segments "https://github.com/oneline47/dm_closure-prediction/tree/main/src"

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_merchant_data,node_external_data toneBlue
class node_eda,node_feature_design,node_feature_tests,node_quarter_models toneAmber
class node_risk_scoring,node_risk_explanations,node_merchant_segments,node_closure_monitor toneMint
class node_merchant,node_financial_partner toneIndigo
```

## Components

### Data inputs

- [Merchant datasets](https://github.com/oneline47/dm_closure-prediction/tree/main/data): `data`
- [External context](https://github.com/oneline47/dm_closure-prediction/tree/main/data): `data`

### Analysis and modeling

- [Exploratory analysis](https://github.com/oneline47/dm_closure-prediction/blob/main/notebooks/1_EDA.ipynb): `notebooks/1_EDA.ipynb`
- [Feature engineering](https://github.com/oneline47/dm_closure-prediction/tree/main/src): `src`
- [Feature validation](https://github.com/oneline47/dm_closure-prediction/blob/main/notebooks/stat_diff_check.ipynb): `notebooks/stat_diff_check.ipynb`
- [Quarterly models](https://github.com/oneline47/dm_closure-prediction/tree/main/src): `src`

### Risk decisions

- [Risk scoring](https://github.com/oneline47/dm_closure-prediction/blob/main/src/2025%EB%B9%85%EC%BD%98%ED%85%8C%EC%8A%A4%ED%8A%B8_%EC%A0%9C%EC%B6%9C%EC%9A%A9.ipynb): `src/2025빅콘테스트_제출용.ipynb`
- [Risk explanations](https://github.com/oneline47/dm_closure-prediction/tree/main/src): `src`
- [Merchant segments](https://github.com/oneline47/dm_closure-prediction/tree/main/src): `src`
- **Closure monitor**

### Other components

- **Merchant**
- **Financial partner**

## Connections

- Merchant datasets → Exploratory analysis: analyzed in (evidence: `README.md`)
- External context → Feature engineering: fills missingness (evidence: `README.md`)
- Exploratory analysis → Feature engineering: informs features (evidence: `README.md`)
- Feature engineering → Feature validation: tests features (evidence: `README.md`)
- Feature engineering → Quarterly models: supplies features (evidence: `README.md`)
- Quarterly models → Risk scoring: predicts risk (evidence: `README.md`)
- Risk scoring → Risk explanations: explained by (evidence: `README.md`)
- Risk scoring → Closure monitor: provides score (evidence: `README.md`)
- Risk explanations → Closure monitor: guides diagnosis (evidence: `README.md`)
- Merchant datasets → Merchant segments: supports clustering (evidence: `README.md`)
- Closure monitor → Merchant: offers guidance (evidence: `README.md`)
- Closure monitor → Financial partner: supports decisions (evidence: `README.md`)
