# yukikihan/mfb architecture

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

- Interactive diagram: https://gitdiagram.com/yukikihan/mfb
- Repository: https://github.com/yukikihan/mfb

## Overview

##### Project type and purpose
- This is a data‐science/ML research pipeline implemented in Python via Jupyter notebooks.
- Its goal is to predict short‐term Bitcoin price movements using a multimodal fusion (MFB) model that leverages time‐lagged sentiment from tweets and news plus traditional market indicators.

##### File structure
- Top level: several `.ipynb` notebooks for each experiment stage, a `utils.py` helper, a `LICENSE` and `README.md`.
- A `dataset/` directory containing raw data (`crypto/price.csv`, `ti.csv`) and processed outputs (`processed/*.csv`).
- The notebooks are numbered by workflow step: Data Standardization, Correlation Analysis, Feature Validation, Data Split, Baselines & MFB on tweets/news, Optimizer Comparison, Final Price Prediction.

##### README for additional insights
- Workflow steps are clearly enumerated (data collection → preprocessing → correlation → feature optimization → split → training & evaluation → forecasting).
- External data sources: Kaggle tweets, News RESTful API, CoinMarketCap.
- Core technology: Python, VADER sentiment, custom MFB model, PyCharm for IDE.

##### Elements
- Rectangles for processing modules (notebooks)
- Hexagons or clouds for external APIs
- Parallelograms for output reports/forecasts

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Layer 1: Data Ingestion"
        Tweets["Tweets API"]:::external
        News["News API"]:::external
        PriceAPI["Crypto Price API"]:::external
        RawStore[(Raw Data Store<br/>dataset/crypto/)]:::datastore
        Tweets --> RawStore
        News --> RawStore
        PriceAPI --> RawStore
    end

    subgraph "Layer 2: Preprocessing & Feature Engineering"
        Standardize["Data Standardization<br>(Data Standardization.ipynb)"]:::process
        Utils["Utilities<br>(utils.py)"]:::process
        ProcessedStore[(Processed Data Store<br/>dataset/processed/)]:::datastore
        RawStore --> Standardize --> ProcessedStore
        Utils -.-> Standardize
        Correlation["Correlation Analysis<br>(Correlation Analysis.ipynb)"]:::process
        FeatureOpt["Feature Validation<br>(Feature Validation.ipynb)"]:::process
        ProcessedStore --> Correlation --> FeatureOpt --> ProcessedStore
        Utils -.-> Correlation
        Utils -.-> FeatureOpt
    end

    subgraph "Layer 3: Modeling & Comparison"
        Split["Train/Test Split<br>(Split_data.ipynb)"]:::process
        TweetsModel["MFB & Baselines on Tweets<br>(MFB and baselines on tweets.ipynb)"]:::model
        NewsModel["MFB & Baselines on News<br>(MFB and baselines on news.ipynb)"]:::model
        Optimizer["MFB Optimizer Comparison<br>(MFB Optimizer Comparison.ipynb)"]:::model
        TrainData[(Train/Test Datasets)]:::datastore
        RawStore --> Split
        ProcessedStore --> Split --> TrainData
        TrainData --> TweetsModel --> Metrics1[(Performance Metrics)]:::output
        TrainData --> NewsModel --> Metrics2[(Performance Metrics)]:::output
        Metrics1 & Metrics2 --> Optimizer --> BestModel[(Best Model)]:::model
        Utils -.-> Split
        Utils -.-> TweetsModel
        Utils -.-> NewsModel
        Utils -.-> Optimizer
    end

    subgraph "Layer 4: Prediction & Deployment"
        LiveData[(Live Data)]:::external
        Predict["MFB Price Prediction<br>(MFB Price Prediction on Bitcoin.ipynb)"]:::process
        Forecast[/Forecast Output/]:::output
        LiveData --> Predict --> Forecast
        BestModel --> Predict
        Utils -.-> Predict
    end

    click RawStore "https://github.com/yukikihan/mfb/tree/master/dataset/crypto/"
    click Standardize "https://github.com/yukikihan/mfb/blob/master/Data Standardization.ipynb"
    click Utils "https://github.com/yukikihan/mfb/blob/master/utils.py"
    click ProcessedStore "https://github.com/yukikihan/mfb/tree/master/dataset/processed/"
    click Correlation "https://github.com/yukikihan/mfb/blob/master/Correlation Analysis.ipynb"
    click FeatureOpt "https://github.com/yukikihan/mfb/blob/master/Feature Validation.ipynb"
    click Split "https://github.com/yukikihan/mfb/blob/master/Split_data.ipynb"
    click TweetsModel "https://github.com/yukikihan/mfb/blob/master/MFB and baselines on tweets.ipynb"
    click NewsModel "https://github.com/yukikihan/mfb/blob/master/MFB and baselines on news.ipynb"
    click Optimizer "https://github.com/yukikihan/mfb/blob/master/MFB Optimizer Comparison.ipynb"
    click Predict "https://github.com/yukikihan/mfb/blob/master/MFB Price Prediction on Bitcoin.ipynb"

    classDef external fill:#f9f,stroke:#333,stroke-width:1px;
    classDef datastore fill:#bbf,stroke:#333,stroke-width:1px;
    classDef process fill:#bfb,stroke:#333,stroke-width:1px;
    classDef model fill:#fbf,stroke:#333,stroke-width:1px;
    classDef output fill:#ffb,stroke:#333,stroke-width:1px;
```
