# ginoshun/steam-game-recommendation-system architecture

> Architecture diagram of the GitHub repository ginoshun/steam-game-recommendation-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ginoshun/steam-game-recommendation-system
- Repository: https://github.com/ginoshun/steam-game-recommendation-system

## Overview

##### Project Type and Purpose
- This is a machine learning-based recommendation system focused on Steam games.
- The system leverages various models (LSTM, ResNet, NCF) to process user data and game information, and to generate personalized game recommendations.
- It is driven by experiments including different training approaches (with balanced focal loss vs. unbalanced) and provides model evaluation and outcome reporting.

##### Analyzing the File Structure
- Top-level directories include:
- model/: Contains both “balanced(best)” models and “unbalanced(old)” models, representing different experiments.
- outcome/: Stores the results including plots, evaluations, and performance metrics for each type of model (LSTM, ResNet, NCF).
- The file structure shows a clear separation of concerns – models (trained weights), notebooks (workflow scripts), and outcomes (evaluation results).

##### Core Components
a. Data Preparation & Ingestion:
- Notebook component (prepare.ipynb) that visualizes and readies the dataset (sourced from Kaggle).
- headers.txt may be used for API calls or data collection.

b. Model Training and Experimentation:
- Notebook: train.ipynb for overall training orchestration.
- Separate model directories for different experiments:
- model/balanced(best) with the best models using focal loss balancing.
- model/unbalanced(old) representing earlier, unbalanced training.
- This component illustrates the experimentation with various architectures: LSTM, ResNet, and NCF.

c. Model Evaluation and Analysis:
- Notebook: model_evaluation.ipynb is responsible for computing evaluation metrics (accuracy, confusion matrices, ROC curves) for each model.
- outcome/ directory shows subcomponents for each model type (LSTM, NCF, ResNet) depicting related performance outcomes.

##### Interactions and Data Flow
- Data flows from the data source (Kaggle dataset) → Data Preparation (prepare.ipynb) → Model Training (train.ipynb) which outputs trained models stored in the model/ directory.
- After training, evaluation processes are executed (model_evaluation.ipynb) reading the trained .h5 models and generating performance outcomes stored in outcome/.

##### Architectural Patterns and Design Principles
- The project follows a typical machine learning workflow pattern where each stage (data preprocessing, training, evaluation) is modularized.
- There is a clear separation between experimental configurations (balanced vs. unbalanced) which aids in model selection and performance benchmarking.
- Each ML model type (LSTM, ResNet, NCF) is treated as a separate “component” under the training and evaluation phase.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Source
    A1["Steam/Kaggle Dataset"]:::data

    %% Data Ingestion & Preprocessing
    subgraph "Data Ingestion & Preprocessing"
        B1["Data Preparation (prepare.ipynb)"]:::notebook
        B2["Headers (headers.txt)"]:::notebook
    end

    %% Model Training Module
    subgraph "Model Training Module"
        C1["Training (train.ipynb)"]:::notebook
    end

    %% Trained Models
    subgraph "Trained Models"
        D1["Trained Models (Balanced)"]:::directory
        D2["Trained Models (Unbalanced)"]:::directory
    end

    %% Model Evaluation & Analysis
    subgraph "Model Evaluation & Analysis"
        E1["Evaluation (model_evaluation.ipynb)"]:::notebook
        E2["Outcome Results (outcome/)"]:::directory
    end

    %% Diagram Visualization
    subgraph "Visualization"
        F1["Architecture Visualization (diagram.ipynb)"]:::notebook
    end

    %% Connections
    A1 --> B1
    A1 --> B2
    B1 --> C1
    B2 --> C1
    C1 --> D1
    C1 --> D2
    D1 --> E1
    D2 --> E1
    E1 --> E2
    E1 --> F1

    %% Click Events
    click B1 "https://github.com/ginoshun/steam-game-recommendation-system/blob/main/notebook/prepare.ipynb"
    click B2 "https://github.com/ginoshun/steam-game-recommendation-system/blob/main/headers.txt"
    click C1 "https://github.com/ginoshun/steam-game-recommendation-system/blob/main/notebook/train.ipynb"
    click D1 "https://github.com/ginoshun/steam-game-recommendation-system/tree/main/model/balanced(best)"
    click D2 "https://github.com/ginoshun/steam-game-recommendation-system/tree/main/model/unbalanced(old)"
    click E1 "https://github.com/ginoshun/steam-game-recommendation-system/blob/main/notebook/model_evaluation.ipynb"
    click E2 "https://github.com/ginoshun/steam-game-recommendation-system/tree/main/outcome/"
    click F1 "https://github.com/ginoshun/steam-game-recommendation-system/blob/main/notebook/diagram.ipynb"
    
    %% Styles
    classDef data fill:#FFFACD,stroke:#DAA520,stroke-width:2px;
    classDef notebook fill:#ADD8E6,stroke:#00008B,stroke-width:2px;
    classDef directory fill:#90EE90,stroke:#006400,stroke-width:2px;
```
