# matildecaleiras2005-afk/pratical_assigment architecture

> Architecture diagram of the GitHub repository matildecaleiras2005-afk/pratical_assigment, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matildecaleiras2005-afk/pratical_assigment
- Repository: https://github.com/matildecaleiras2005-afk/pratical_assigment

## Overview

This is a weather-stream classification experiment: it obtains hourly weather for two cities, derives a warm-up wind threshold, prepares Portimão features and T6 labels, then compares online classifiers with prequential evaluation. Results are written as metrics and learning/recall plots. The graph follows calls shown in the sampled source; the README is empty, and no additional capabilities are documented.

Main entry points: [`src/main.py`](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py) (Experiment orchestration), [`src/data_loader.py`](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py) (Weather loading and cache), [`src/models.py`](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/models.py) (Online model factory), [`src/config.py`](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/config.py) (Experiment configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_weather["Weather data"]
  node_config["Experiment configuration<br/>[config.py]"]
  node_meteo["Open-Meteo API"]
  node_loader["Weather loading and cache<br/>[data_loader.py]"]
  node_rawdata[("Raw JSON cache")]
end

subgraph group_preparation["Feature preparation"]
  node_threshold["Warm-up threshold<br/>[data_loader.py]"]
  node_representation["T6 feature preparation<br/>[data_loader.py]"]
end

subgraph group_evaluation["Online evaluation"]
  node_main["Experiment orchestration<br/>[main.py]"]
  node_factory["Online model factory<br/>[models.py]"]
  node_models["Online classifiers<br/>[models.py]"]
  node_metrics["Prequential metrics<br/>[main.py]"]
  node_csv["Metrics CSV<br/>[main.py]"]
  node_plots["Learning and recall plots<br/>[main.py]"]
end

node_operator(("Experiment runner"))

node_operator -->|"runs"| node_main
node_main -->|"uses settings"| node_config
node_main -->|"loads weather"| node_loader
node_loader -->|"uses cache settings"| node_config
node_loader -->|"reads or writes"| node_rawdata
node_loader -->|"requests weather"| node_meteo
node_main -->|"calculates threshold"| node_threshold
node_main -->|"prepares features"| node_representation
node_main -->|"creates models"| node_factory
node_factory -->|"instantiates"| node_models
node_main -->|"evaluates online"| node_metrics
node_metrics -->|"predicts and learns"| node_models
node_main -->|"writes metrics"| node_csv
node_main -->|"saves curves"| node_plots

click node_main "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py"
click node_config "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/config.py"
click node_loader "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py"
click node_rawdata "https://github.com/matildecaleiras2005-afk/pratical_assigment/tree/master/data/raw"
click node_threshold "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py"
click node_representation "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py"
click node_factory "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/models.py"
click node_models "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/models.py"
click node_metrics "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py"
click node_csv "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py"
click node_plots "https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_meteo,node_loader,node_rawdata toneBlue
class node_threshold,node_representation toneAmber
class node_main,node_factory,node_models,node_metrics,node_csv,node_plots toneMint
class node_operator toneIndigo
```

## Components

### Weather data

- [Experiment configuration](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/config.py): `src/config.py`
- **Open-Meteo API**
- [Weather loading and cache](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py): `src/data_loader.py`
- [Raw JSON cache](https://github.com/matildecaleiras2005-afk/pratical_assigment/tree/master/data/raw): `data/raw`

### Feature preparation

- [Warm-up threshold](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py): `src/data_loader.py`
- [T6 feature preparation](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/data_loader.py): `src/data_loader.py`

### Online evaluation

- [Experiment orchestration](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py): `src/main.py`
- [Online model factory](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/models.py): `src/models.py`
- [Online classifiers](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/models.py): `src/models.py`
- [Prequential metrics](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py): `src/main.py`
- [Metrics CSV](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py): `src/main.py`
- [Learning and recall plots](https://github.com/matildecaleiras2005-afk/pratical_assigment/blob/master/src/main.py): `src/main.py`

### Other components

- **Experiment runner**

## Connections

- Experiment runner → Experiment orchestration: runs (evidence: `src/main.py`)
- Experiment orchestration → Experiment configuration: uses settings (evidence: `src/main.py`)
- Experiment orchestration → Weather loading and cache: loads weather (evidence: `src/main.py`)
- Weather loading and cache → Experiment configuration: uses cache settings (evidence: `src/data_loader.py`)
- Weather loading and cache → Raw JSON cache: reads or writes (evidence: `src/data_loader.py`)
- Weather loading and cache → Open-Meteo API: requests weather (evidence: `src/data_loader.py`)
- Experiment orchestration → Warm-up threshold: calculates threshold (evidence: `src/main.py`)
- Experiment orchestration → T6 feature preparation: prepares features (evidence: `src/main.py`)
- Experiment orchestration → Online model factory: creates models (evidence: `src/main.py`)
- Online model factory → Online classifiers: instantiates (evidence: `src/models.py`)
- Experiment orchestration → Prequential metrics: evaluates online (evidence: `src/main.py`)
- Prequential metrics → Online classifiers: predicts and learns (evidence: `src/main.py`)
- Experiment orchestration → Metrics CSV: writes metrics (evidence: `src/main.py`)
- Experiment orchestration → Learning and recall plots: saves curves (evidence: `src/main.py`)
