# fortune678/allison-cicchetti-sleep-model- architecture

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

- Interactive diagram: https://gitdiagram.com/fortune678/allison-cicchetti-sleep-model-
- Repository: https://github.com/fortune678/allison-cicchetti-sleep-model-

## Overview

This is a single-script mammal sleep analysis and prediction project. Its workflow loads a referenced CSV, cleans and transforms the data, compares linear regression with decision-tree validation, then fits a final tree and reports feature importance. The README also describes dataset provenance and model interpretation; the available script is the only indexed source, so the graph reflects its implemented workflow and does not imply a deployed prediction service.

Main entry points: [`mammal_sleep.py`](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py) (Engineer features)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_analyst(("Analyst"))
node_sleep_csv["Sleep dataset"]
node_load["Load data<br/>[mammal_sleep.py]"]
node_clean["Clean records<br/>[mammal_sleep.py]"]
node_features["Engineer features<br/>[mammal_sleep.py]"]
node_linear["Linear baseline<br/>[mammal_sleep.py]"]
node_tree_tuning["Tune decision tree<br/>[mammal_sleep.py]"]
node_final_tree["Fit final tree<br/>[mammal_sleep.py]"]
node_importance["Report importance<br/>[mammal_sleep.py]"]

node_analyst -->|"runs script"| node_load
node_sleep_csv -->|"provides rows"| node_load
node_load -->|"passes data"| node_clean
node_clean -->|"passes records"| node_features
node_features -->|"supplies features"| node_linear
node_features -->|"supplies features"| node_tree_tuning
node_features -->|"supplies features"| node_final_tree
node_linear -->|"prints MAE"| node_analyst
node_tree_tuning -->|"prints MAE"| node_analyst
node_final_tree -->|"provides importances"| node_importance
node_importance -->|"prints rankings"| node_analyst

click node_load "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py"
click node_clean "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py"
click node_features "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py"
click node_linear "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py"
click node_tree_tuning "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py"
click node_final_tree "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py"
click node_importance "https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.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_analyst,node_sleep_csv toneIndigo
class node_load,node_clean,node_features,node_linear,node_tree_tuning,node_final_tree,node_importance toneTeal
```

## Components

### Other components

- **Analyst**
- **Sleep dataset**
- [Load data](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`
- [Clean records](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`
- [Engineer features](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`
- [Linear baseline](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`
- [Tune decision tree](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`
- [Fit final tree](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`
- [Report importance](https://github.com/fortune678/allison-cicchetti-sleep-model-/blob/main/mammal_sleep.py): `mammal_sleep.py`

## Connections

- Analyst → Load data: runs script (evidence: `mammal_sleep.py`)
- Sleep dataset → Load data: provides rows (evidence: `mammal_sleep.py`)
- Load data → Clean records: passes data (evidence: `mammal_sleep.py`)
- Clean records → Engineer features: passes records (evidence: `mammal_sleep.py`)
- Engineer features → Linear baseline: supplies features (evidence: `mammal_sleep.py`)
- Engineer features → Tune decision tree: supplies features (evidence: `mammal_sleep.py`)
- Engineer features → Fit final tree: supplies features (evidence: `mammal_sleep.py`)
- Linear baseline → Analyst: prints MAE (evidence: `mammal_sleep.py`)
- Tune decision tree → Analyst: prints MAE (evidence: `mammal_sleep.py`)
- Fit final tree → Report importance: provides importances (evidence: `mammal_sleep.py`)
- Report importance → Analyst: prints rankings (evidence: `mammal_sleep.py`)
