# omar-basheer/pii-identification-model architecture

> Architecture diagram of the GitHub repository omar-basheer/pii-identification-model, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omar-basheer/pii-identification-model
- Repository: https://github.com/omar-basheer/pii-identification-model

## Overview

##### Main Components
- Data Input: Represent the raw student essays as the primary data source. This could be a dataset imported from a CSV, database, or directly from Kaggle.
- Data Preprocessing: A component for text cleaning, tokenization, and formatting data for model consumption.
- Model Training & Evaluation: This is where your Bi-LSTM model is defined and trained. Although the provided file tree only shows a notebook (PII_Milestone3.ipynb), assume that within it are key processes like model definition, training routines, and evaluation metrics.
- Model Inference: Even if not explicitly separated in your current files, include a component that represents how the model can be used to identify PII in new essays.
- Experimentation/Visualization: Given that you’re working in a Jupyter Notebook, a component showing exploratory data analysis or experiment visualizations (metrics, loss curves, etc.) is helpful.

##### Out Relationships and Interactions
- From Data Preprocessing, show the flow into the Model Training & Evaluation component.
- Finally, link Model Inference to the end-user or a downstream application where predictions (PII identified) are returned.

##### Architectural Patterns and Design Principles
- Iterative Development: Indicate loops for hyperparameter tuning and model evaluation.
- Modularization: Show that each component (data handling, preprocessing, model building) is designed to stand alone, which can facilitate future extensions (like deploying the model as a microservice).

##### Relevant Technologies and Libraries
- Mention that the Bi-LSTM model might be implemented using popular ML frameworks such as TensorFlow/Keras or PyTorch (if applicable).
- Data preprocessing might utilise libraries such as Numpy, Pandas, or text-specific libraries (e.g., NLTK or spaCy).
- If experiment tracking or visualization is involved, reference tools like matplotlib or seaborn.

## Diagram (Mermaid)

```mermaid
flowchart TD
    DataInput["Data Input"]:::data
    DataPreprocess["Data Preprocessing"]:::data
    ModelTraining["Model Training & Evaluation (Bi-LSTM)"]:::model
    ModelInference["Model Inference"]:::inference
    Visualization["Experimentation/Visualization"]:::viz

    DataInput -->|"to"| DataPreprocess
    DataPreprocess -->|"to"| ModelTraining
    ModelTraining -->|"to"| ModelInference
    ModelTraining -->|"visualizes"| Visualization
    Visualization -->|"feedback"| ModelTraining
    ModelTraining -->|"iterate"| ModelTraining

    click DataInput "https://github.com/omar-basheer/pii-identification-model/blob/main/PII_Milestone3.ipynb"
    click DataPreprocess "https://github.com/omar-basheer/pii-identification-model/blob/main/PII_Milestone3.ipynb"
    click ModelTraining "https://github.com/omar-basheer/pii-identification-model/blob/main/PII_Milestone3.ipynb"
    click ModelInference "https://github.com/omar-basheer/pii-identification-model/blob/main/PII_Milestone3.ipynb"
    click Visualization "https://github.com/omar-basheer/pii-identification-model/blob/main/PII_Milestone3.ipynb"

    classDef data fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef model fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
    classDef inference fill:#ABEBC6,stroke:#196F3D,stroke-width:2px;
    classDef viz fill:#F5CBA7,stroke:#D35400,stroke-width:2px;
```
