# yasirbarlas/protein-secondary-structure-prediction architecture

> Architecture diagram of the GitHub repository yasirbarlas/protein-secondary-structure-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yasirbarlas/protein-secondary-structure-prediction
- Repository: https://github.com/yasirbarlas/protein-secondary-structure-prediction

## Overview

##### Project Identification
- Type & Purpose: This is an academic/data-science project aimed at comparing three machine learning approaches—k-nearest neighbours, random forests, and neural networks—for predicting the secondary structure of proteins. The project uses notebooks for exploratory data analysis (EDA) and to experiment with various ML algorithms.
- Indicators: The README clearly describes the domain (bioinformatics & protein structure prediction) and notes that the repository supports coursework. The file tree is organized around experiments with different ML methods.

##### Analyzing the File Structure
- Top-Level Components:
- README.md: Provides the project’s overview, background, and methodology.
- background: Contains an EDA notebook to explore and preprocess data.
- datasets: Holds the raw and pre-processed CSV files with protein sequences.
- k-nearest-neighbours: Contains notebooks for building k-NN models.
- random-forests: Contains notebooks for training various random forest configurations.
- neural-networks: Contains notebooks for neural network models (with oversampling and without oversampling).
- Architectural Patterns: The project uses the "notebook-driven" approach often seen in academic and experimental data science projects. It’s structured into directories that separate experimental pipelines for each ML method. There’s clear separation of concerns: data storage (datasets), data preprocessing (background), and modeling experiments (separate folders per algorithm).

##### Putting It All Together
- “Data Sources” to an “EDA & Preprocessing” block (background/eda-data-processing.ipynb).
- Surround the ML modeling components with annotations that indicate the use of specific technology stacks (numpy, scikit-learn, TensorFlow) and any hardware specifics (e.g., GPU for neural nets).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Project Documentation
    Doc["Project Documentation"]:::doc

    %% Data Ingestion Subgraph
    subgraph "Data Ingestion"
        CSV1["prot-seq-16-to-150.csv"]:::ingestion
        CSV2["prot-seq-filtered.csv"]:::ingestion
    end

    %% EDA & Preprocessing Node
    D2["EDA & Preprocessing"]:::eda

    %% ML Modeling Subgraph
    subgraph "ML Modeling"
        KNN["k-Nearest Neighbours Model"]:::mlKNN
        RF["Random Forests Model"]:::mlRF
        NN["Neural Networks Model"]:::mlNN
    end

    %% Evaluation & Results Node
    Eval["Evaluation & Results"]:::eval

    %% Connections
    Doc --> CSV1
    CSV1 --> D2
    CSV2 --> D2
    D2 --> KNN
    D2 --> RF
    D2 --> NN
    KNN --> Eval
    RF --> Eval
    NN --> Eval

    %% Click Events
    click Doc "https://github.com/yasirbarlas/protein-secondary-structure-prediction/blob/main/README.md"
    click CSV1 "https://github.com/yasirbarlas/protein-secondary-structure-prediction/blob/main/datasets/prot-seq-16-to-150.csv"
    click CSV2 "https://github.com/yasirbarlas/protein-secondary-structure-prediction/blob/main/datasets/prot-seq-filtered.csv"
    click D2 "https://github.com/yasirbarlas/protein-secondary-structure-prediction/blob/main/background/eda-data-processing.ipynb"
    click KNN "https://github.com/yasirbarlas/protein-secondary-structure-prediction/blob/main/k-nearest-neighbours/knn_model.ipynb"
    click RF "https://github.com/yasirbarlas/protein-secondary-structure-prediction/tree/main/random-forests"
    click NN "https://github.com/yasirbarlas/protein-secondary-structure-prediction/tree/main/neural-networks"

    %% Styles
    classDef doc fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
    classDef ingestion fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef eda fill:#ABEBC6,stroke:#229954,stroke-width:2px;
    classDef mlKNN fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef mlRF fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
    classDef mlNN fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef eval fill:#D7BDE2,stroke:#8E44AD,stroke-width:2px;
```
