# axwell01/occupancy-detection architecture

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

- Interactive diagram: https://gitdiagram.com/axwell01/occupancy-detection
- Repository: https://github.com/axwell01/occupancy-detection

## Overview

This repository documents a residential occupancy-detection research workflow: use indoor temperature, CO₂, and humidity data to predict occupied versus empty apartments. The README lays out the stages from data preparation through model comparison and real-life application; notebooks and result files are present in the tree. No implementation source was provided, so the graph reflects documented stages rather than verified code calls. Workflow links are supported by the README’s project steps.

Main entry points: [`data/processed`](https://github.com/axwell01/occupancy-detection/tree/main/data/processed) (Processed time series), [`README.md`](https://github.com/axwell01/occupancy-detection/blob/main/README.md) (Hyperparameter tuning), [`notebooks/logistic_regression.ipynb`](https://github.com/axwell01/occupancy-detection/blob/main/notebooks/logistic_regression.ipynb) (Logistic regression), [`notebooks/shallow_nn.ipynb`](https://github.com/axwell01/occupancy-detection/blob/main/notebooks/shallow_nn.ipynb) (Shallow neural network)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_variable_selection["Variable selection<br/>[README.md]"]
  node_preprocessing["Data preprocessing<br/>[README.md]"]
  node_resampling["Data resampling<br/>[README.md]"]
  node_processed_data[("Processed time series")]
end

subgraph group_models["Modeling"]
  node_logistic["Logistic regression"]
  node_shallow["Shallow neural network<br/>[shallow_nn.ipynb]"]
  node_deep["Deep neural network<br/>[deep_nn.ipynb]"]
  node_tuning["Hyperparameter tuning<br/>[README.md]"]
end

subgraph group_evaluation["Evaluation"]
  node_validation["Cross-validation<br/>[README.md]"]
  node_comparison["Model comparison<br/>[README.md]"]
  node_best_model["Best model<br/>[README.md]"]
  node_results["Model result tables"]
end

subgraph group_research["Research outputs"]
  node_applications["Real-life applications<br/>[README.md]"]
  node_literature["Literature comparison<br/>[README.md]"]
end

node_sensors(("Environmental sensors"))

node_sensors -->|"inform variables"| node_variable_selection
node_variable_selection -->|"select inputs"| node_preprocessing
node_preprocessing -->|"prepare data"| node_resampling
node_resampling -->|"produce time series"| node_processed_data
node_processed_data -->|"train on data"| node_logistic
node_processed_data -->|"train on data"| node_shallow
node_processed_data -->|"train on data"| node_deep
node_logistic -->|"tune model"| node_tuning
node_shallow -->|"tune model"| node_tuning
node_deep -->|"tune model"| node_tuning
node_tuning -->|"evaluate models"| node_validation
node_validation -->|"compare performance"| node_comparison
node_comparison -->|"select model"| node_best_model
node_best_model -->|"consider application"| node_applications
node_best_model -->|"compare literature"| node_literature

click node_variable_selection "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_preprocessing "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_resampling "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_processed_data "https://github.com/axwell01/occupancy-detection/tree/main/data/processed"
click node_logistic "https://github.com/axwell01/occupancy-detection/blob/main/notebooks/logistic_regression.ipynb"
click node_shallow "https://github.com/axwell01/occupancy-detection/blob/main/notebooks/shallow_nn.ipynb"
click node_deep "https://github.com/axwell01/occupancy-detection/blob/main/notebooks/deep_nn.ipynb"
click node_tuning "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_validation "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_comparison "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_best_model "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_applications "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_literature "https://github.com/axwell01/occupancy-detection/blob/main/README.md"
click node_results "https://github.com/axwell01/occupancy-detection/tree/main/results"

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_variable_selection,node_preprocessing,node_resampling,node_processed_data toneBlue
class node_logistic,node_shallow,node_deep,node_tuning toneAmber
class node_validation,node_comparison,node_best_model,node_results toneMint
class node_applications,node_literature toneRose
class node_sensors toneIndigo
```

## Components

### Data preparation

- [Variable selection](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Data preprocessing](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Data resampling](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Processed time series](https://github.com/axwell01/occupancy-detection/tree/main/data/processed): `data/processed`

### Modeling

- [Logistic regression](https://github.com/axwell01/occupancy-detection/blob/main/notebooks/logistic_regression.ipynb): `notebooks/logistic_regression.ipynb`
- [Shallow neural network](https://github.com/axwell01/occupancy-detection/blob/main/notebooks/shallow_nn.ipynb): `notebooks/shallow_nn.ipynb`
- [Deep neural network](https://github.com/axwell01/occupancy-detection/blob/main/notebooks/deep_nn.ipynb): `notebooks/deep_nn.ipynb`
- [Hyperparameter tuning](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`

### Evaluation

- [Cross-validation](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Model comparison](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Best model](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Model result tables](https://github.com/axwell01/occupancy-detection/tree/main/results): `results`

### Research outputs

- [Real-life applications](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`
- [Literature comparison](https://github.com/axwell01/occupancy-detection/blob/main/README.md): `README.md`

### Other components

- **Environmental sensors**

## Connections

- Environmental sensors → Variable selection: inform variables (evidence: `README.md`)
- Variable selection → Data preprocessing: select inputs (evidence: `README.md`)
- Data preprocessing → Data resampling: prepare data (evidence: `README.md`)
- Data resampling → Processed time series: produce time series (evidence: `README.md`)
- Processed time series → Logistic regression: train on data (evidence: `README.md`)
- Processed time series → Shallow neural network: train on data (evidence: `README.md`)
- Processed time series → Deep neural network: train on data (evidence: `README.md`)
- Logistic regression → Hyperparameter tuning: tune model (evidence: `README.md`)
- Shallow neural network → Hyperparameter tuning: tune model (evidence: `README.md`)
- Deep neural network → Hyperparameter tuning: tune model (evidence: `README.md`)
- Hyperparameter tuning → Cross-validation: evaluate models (evidence: `README.md`)
- Cross-validation → Model comparison: compare performance (evidence: `README.md`)
- Model comparison → Best model: select model (evidence: `README.md`)
- Best model → Real-life applications: consider application (evidence: `README.md`)
- Best model → Literature comparison: compare literature (evidence: `README.md`)
