# snehagummadi/brain-tumor-detection architecture

> Architecture diagram of the GitHub repository snehagummadi/brain-tumor-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/snehagummadi/brain-tumor-detection
- Repository: https://github.com/snehagummadi/brain-tumor-detection

## Overview

##### Project type and purpose
- This is a standalone machine-learning analysis pipeline (a class project) written in Julia (single entry script tumor.jl).
- Its goal is to ingest MRI scan data, run two classification algorithms (a shallow neural network and logistic regression), compare their performance, and produce evaluation metrics.

##### File structure
- Top level:
- tumor.jl – the main Julia script containing data loading, preprocessing, model definitions, training loops, evaluation, and result output.
- README.md – project description, model comparison summary, and presentation link.
- No external “frontend” or “backend” directories — this is a batch-processing/analysis tool.

##### README for additional insights
- Confirms the two algorithms under comparison and that the input is MRI scans.
- No further architectural hints (e.g., no web service, no database).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Input/Output
    DataStorage["Raw MRI Scan Dataset"]:::data
    Doc["README.md\n(Project Description)"]:::doc

    %% Processing Stages
    Preprocess["Data Preprocessing\n(normalization, resizing,\ntrain/test split)"]:::process
    Features["Feature Extraction"]:::process

    %% Model Training
    subgraph ParallelModels
        direction TB
        LR["Logistic Regression Training\n(hyperparameters)"]:::model
        NN["Shallow Neural Network Training\n(hyperparameters)"]:::model
    end

    %% Evaluation and Reporting
    Eval["Model Evaluation\n(Accuracy, Precision, Recall, ROC)"]:::evaluation
    Report["Result Reporting\n(CSV, Plots, Console)"]:::data

    %% Data Flow
    DataStorage -->|"raw images"| Preprocess
    Preprocess -->|"normalized images"| Features
    Features -->|"feature matrix"| LR
    Features -->|"feature matrix"| NN
    LR -->|"trained LR model"| Eval
    NN -->|"trained NN model"| Eval
    Eval -->|"evaluation results"| Report

    %% Documentation Link
    Doc --- DataStorage

    %% Click Events
    click Preprocess "https://github.com/snehagummadi/brain-tumor-detection/blob/main/tumor.jl"
    click Features "https://github.com/snehagummadi/brain-tumor-detection/blob/main/tumor.jl"
    click LR "https://github.com/snehagummadi/brain-tumor-detection/blob/main/tumor.jl"
    click NN "https://github.com/snehagummadi/brain-tumor-detection/blob/main/tumor.jl"
    click Eval "https://github.com/snehagummadi/brain-tumor-detection/blob/main/tumor.jl"
    click Report "https://github.com/snehagummadi/brain-tumor-detection/blob/main/tumor.jl"
    click Doc "https://github.com/snehagummadi/brain-tumor-detection/blob/main/README.md"

    %% Styling
    classDef data fill:#bbdefb,stroke:#0d47a1,color:#0d47a1;
    classDef process fill:#c8e6c9,stroke:#1b5e20,color:#1b5e20;
    classDef model fill:#ffe0b2,stroke:#ef6c00,color:#e65100;
    classDef evaluation fill:#e1bee7,stroke:#6a1b9a,color:#4a148c;
    classDef doc fill:#f5f5f5,stroke:#9e9e9e,color:#424242;
```
