# barissglc/ai-classifier-lab architecture

> Architecture diagram of the GitHub repository barissglc/ai-classifier-lab, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/barissglc/ai-classifier-lab
- Repository: https://github.com/barissglc/ai-classifier-lab

## Overview

##### Main Components

a) Frontend Layer (Streamlit UI):
- Sub-components for:
- Dataset Selection Interface
- Parameter Control Panel (Sidebar)
- Visualization Area (PCA plots, heatmaps)

b) Application Layer:
- Main Application Logic (app.py)
- Machine Learning Components:
- Classifier Models (KNN, SVM, Random Forest)
- Data Preprocessing (PCA, scaling)
- Dataset Management

c) Data Layer:
- Scikit-learn Built-in Datasets:
- Iris
- Wine
- Breast Cancer

##### Component Relationships

- User Interface → Application Layer (parameter updates)
- Application Layer → ML Components (model training and prediction)
- ML Components → Data Layer (dataset loading)
- ML Components → User Interface (visualization results)

##### Technology Stack Indicators

Use clear labels to indicate:
- Streamlit (Frontend Framework)
- Scikit-learn (ML Framework)
- Matplotlib/Seaborn (Visualization Libraries)
- Python (Core Language)

##### Deployment Context

A container showing:
- Docker Container Environment
- Port Mapping (8501:8501)
- Container Resources

##### Docker Integration
- How the application is containerized
- Port mappings and volume mounts

##### Development Environment
- .devcontainer configuration
- Development tools integration

##### Dependencies
- Library dependencies from requirements.txt
- Version compatibility

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Docker["Docker Container Environment"]
        subgraph Frontend["Frontend Layer"]
            UI[Streamlit Web Interface]:::frontend
            DS["Dataset Selection"]:::frontend
            PP["Parameter Control Panel"]:::frontend
            VA["Visualization Area"]:::frontend
        end

        subgraph AppLayer["Application Layer"]
            AL["Main Application Logic"]:::app
            subgraph MLComponents["Machine Learning Components"]
                CLS["Classifier Models"]:::ml
                DP["Data Preprocessing"]:::ml
                DM["Dataset Management"]:::ml
            end
        end

        subgraph DataLayer["Data Layer"]
            DB1[(Iris Dataset)]:::data
            DB2[(Wine Dataset)]:::data
            DB3[(Breast Cancer Dataset)]:::data
        end
    end

    %% Relationships
    UI --> DS
    UI --> PP
    UI --> VA
    DS --> AL
    PP --> AL
    AL --> MLComponents
    CLS --> VA
    DP --> VA
    DM --> DataLayer
    DataLayer --> MLComponents

    %% Click Events
    click AL "https://github.com/barissglc/ai-classifier-lab/blob/main/app.py"
    click Docker "https://github.com/barissglc/ai-classifier-lab/tree/main/Dockerfile"
    click Docker "https://github.com/barissglc/ai-classifier-lab/blob/main/.devcontainer/devcontainer.json"
    click Docker "https://github.com/barissglc/ai-classifier-lab/blob/main/requirements.txt"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef app fill:#2ecc71,stroke:#27ae60,color:white
    classDef ml fill:#f1c40f,stroke:#f39c12,color:black
    classDef data fill:#9b59b6,stroke:#8e44ad,color:white
    classDef container fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Legend
    subgraph Legend
        F[Frontend Component]:::frontend
        A[Application Component]:::app
        M[ML Component]:::ml
        D[(Data Source)]:::data
    end
```
