# areenaalmeshaly/employee-attrition-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/areenaalmeshaly/employee-attrition-prediction
- Repository: https://github.com/areenaalmeshaly/employee-attrition-prediction

## Overview

This is an employee-attrition classification project, with a script-driven workflow from the IBM HR CSV through validation, feature creation, encoding, Logistic Regression training, and threshold-based evaluation. The main script also records parameters, metrics, and a model with MLflow. The README documents notebook-based EDA and additional feature ideas, but the sampled runtime modules do not show those notebook stages or the README-described features; the graph focuses on the evidenced script workflow. MLflow is shown as an integration; its tracking-store wiring is not established by the excerpts.

Main entry points: [`main.py`](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/main.py) (Workflow runner), [`data/IBM Data.csv`](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/data/IBM%20Data.csv) (IBM HR data), [`src/load_data.py`](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/load_data.py) (CSV loader), [`src/validate_data.py`](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/validate_data.py) (Data validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data preparation"]
  node_main["Workflow runner<br/>[main.py]"]
  node_csv["IBM HR data<br/>[IBM Data.csv]"]
  node_loader["CSV loader<br/>[load_data.py]"]
  node_validator["Data validation<br/>[validate_data.py]"]
  node_engineer["Feature creation"]
  node_encoder["Category encoding<br/>[features.py]"]
end

subgraph group_modeling["Modeling"]
  node_trainer["Logistic training<br/>[train.py]"]
  node_evaluator["Threshold evaluation<br/>[evaluate_model.py]"]
end

subgraph group_tracking["Experiment tracking"]
  node_mlflow["MLflow tracking"]
end

node_user(("Project operator"))

node_user -->|"runs"| node_main
node_main -->|"calls"| node_loader
node_main -->|"selects input"| node_csv
node_main -->|"validates data"| node_validator
node_main -->|"creates features"| node_engineer
node_main -->|"encodes categories"| node_encoder
node_main -->|"trains model"| node_trainer
node_main -->|"evaluates scores"| node_evaluator
node_main -->|"logs run"| node_mlflow

click node_main "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/main.py"
click node_csv "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/data/IBM%20Data.csv"
click node_loader "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/load_data.py"
click node_validator "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/validate_data.py"
click node_engineer "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/feature_engineering.py"
click node_encoder "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/features.py"
click node_trainer "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/train.py"
click node_evaluator "https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/evaluate_model.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_main,node_csv,node_loader,node_validator,node_engineer,node_encoder toneBlue
class node_trainer,node_evaluator toneAmber
class node_mlflow toneMint
class node_user toneIndigo
```

## Components

### Data preparation

- [Workflow runner](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/main.py): `main.py`
- [IBM HR data](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/data/IBM%20Data.csv): `data/IBM Data.csv`
- [CSV loader](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/load_data.py): `src/load_data.py`
- [Data validation](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/validate_data.py): `src/validate_data.py`
- [Feature creation](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Category encoding](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/features.py): `src/features.py`

### Modeling

- [Logistic training](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/train.py): `src/train.py`
- [Threshold evaluation](https://github.com/areenaalmeshaly/employee-attrition-prediction/blob/main/src/evaluate_model.py): `src/evaluate_model.py`

### Experiment tracking

- **MLflow tracking**

### Other components

- **Project operator**

## Connections

- Project operator → Workflow runner: runs (evidence: `main.py`)
- Workflow runner → CSV loader: calls (evidence: `main.py`)
- Workflow runner → IBM HR data: selects input (evidence: `main.py`)
- Workflow runner → Data validation: validates data (evidence: `main.py`)
- Workflow runner → Feature creation: creates features (evidence: `main.py`)
- Workflow runner → Category encoding: encodes categories (evidence: `main.py`)
- Workflow runner → Logistic training: trains model (evidence: `main.py`)
- Workflow runner → Threshold evaluation: evaluates scores (evidence: `main.py`)
- Workflow runner → MLflow tracking: logs run (evidence: `main.py`)
