# farah-belghith2710/projet_fm architecture

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

- Interactive diagram: https://gitdiagram.com/farah-belghith2710/projet_fm
- Repository: https://github.com/farah-belghith2710/projet_fm

## Overview

This repository is a comparative bearing-failure prognostics study: vibration records become signal features, health indicators and remaining-useful-life predictions, then reliability and maintenance economics results. The principal workflow is split between feature extraction and a results pipeline; a Streamlit dashboard presents the precomputed outputs. Major documented capabilities also include complementary statistical/XAI analyses and report figures. Edges follow the shown calls and README workflow; some result-file and dashboard wiring is documented rather than visible in sampled implementation excerpts.

Main entry points: [`2_lancer_pipeline.py`](https://github.com/farah-belghith2710/projet_fm/blob/main/2_lancer_pipeline.py) (Results pipeline), [`dashboard/commun.py`](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/commun.py) (Shared dashboard tools), [`4_analyses_complementaires.py`](https://github.com/farah-belghith2710/projet_fm/blob/main/4_analyses_complementaires.py) (Complementary analyses), [`results`](https://github.com/farah-belghith2710/projet_fm/tree/main/results) (Analysis results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Signal preparation"]
  node_config["Study configuration<br/>[config.py]"]
  node_reader["Signal reader<br/>[data.py]"]
  node_filter["Signal filtering<br/>[preprocessing.py]"]
  node_extract["Feature extraction<br/>[features.py]"]
end

subgraph group_analysis["Health and reliability"]
  node_health["Health indicators<br/>[health.py]"]
  node_reliability["Population reliability<br/>[reliability.py]"]
end

subgraph group_models["RUL modeling"]
  node_wiener["Bayesian Wiener<br/>[rul_wiener.py]"]
  node_ml["Classical ML<br/>[rul_ml.py]"]
  node_deep["Deep learning<br/>[rul_deep.py]"]
end

subgraph group_outputs["Results and decisions"]
  node_pipeline["Results pipeline"]
  node_evaluation["Model evaluation<br/>[evaluation.py]"]
  node_results[("Analysis results")]
  node_complements["Complementary analyses"]
  node_economy["Maintenance economics<br/>[economie.py]"]
  node_figures["Report figures"]
end

subgraph group_dashboard["Interactive dashboard"]
  node_app["Dashboard app<br/>[app.py]"]
  node_common["Shared dashboard tools<br/>[commun.py]"]
  node_data_page["Data and reliability<br/>[donnees.py]"]
  node_health_page["Health page<br/>[sante.py]"]
  node_rul_page["Prognosis page<br/>[pronostic.py]"]
  node_compare_page["Model comparison<br/>[comparaison.py]"]
  node_economy_page["Economics page<br/>[economie.py]"]
  node_home_page["Overview page<br/>[accueil.py]"]
  node_tests_page["Challenge page<br/>[tests.py]"]
end

node_analyst(("Researcher"))
node_raw[("PRONOSTIA signals")]
node_processed[("Processed data")]

node_analyst -.->|"provides records"| node_raw
node_raw -.->|"supplies signals"| node_reader
node_reader -->|"uses settings"| node_config
node_reader -.->|"filters signals"| node_filter
node_filter -.->|"prepares signals"| node_extract
node_extract -->|"uses settings"| node_config
node_extract -.->|"writes features"| node_processed
node_analyst -.->|"runs analysis"| node_pipeline
node_pipeline -.->|"reads features"| node_processed
node_pipeline -->|"computes health"| node_health
node_pipeline -->|"computes reliability"| node_reliability
node_pipeline -->|"runs Wiener model"| node_wiener
node_pipeline -->|"runs ML models"| node_ml
node_pipeline -->|"runs deep models"| node_deep
node_pipeline -->|"evaluates predictions"| node_evaluation
node_pipeline -.->|"writes outputs"| node_results
node_analyst -.->|"runs analyses"| node_complements
node_complements -->|"calls reliability methods"| node_reliability
node_complements -->|"calls health stage"| node_health
node_complements -.->|"compares strategies"| node_economy
node_complements -.->|"reads and extends"| node_results
node_results -.->|"provides data"| node_figures
node_analyst -.->|"opens dashboard"| node_app
node_app -.->|"uses shared tools"| node_common
node_common -.->|"loads outputs"| node_results
node_data_page -->|"uses shared tools"| node_common
node_health_page -->|"uses shared tools"| node_common
node_rul_page -->|"uses shared tools"| node_common
node_compare_page -->|"uses shared tools"| node_common
node_economy_page -->|"uses shared tools"| node_common
node_home_page -->|"uses shared tools"| node_common
node_tests_page -->|"uses shared tools"| node_common
node_economy_page -->|"uses cost model"| node_economy

click node_config "https://github.com/farah-belghith2710/projet_fm/blob/main/src/config.py"
click node_reader "https://github.com/farah-belghith2710/projet_fm/blob/main/src/data.py"
click node_filter "https://github.com/farah-belghith2710/projet_fm/blob/main/src/preprocessing.py"
click node_extract "https://github.com/farah-belghith2710/projet_fm/blob/main/src/features.py"
click node_processed "https://github.com/farah-belghith2710/projet_fm/tree/main/data/processed"
click node_pipeline "https://github.com/farah-belghith2710/projet_fm/blob/main/2_lancer_pipeline.py"
click node_health "https://github.com/farah-belghith2710/projet_fm/blob/main/src/health.py"
click node_reliability "https://github.com/farah-belghith2710/projet_fm/blob/main/src/reliability.py"
click node_wiener "https://github.com/farah-belghith2710/projet_fm/blob/main/src/rul_wiener.py"
click node_ml "https://github.com/farah-belghith2710/projet_fm/blob/main/src/rul_ml.py"
click node_deep "https://github.com/farah-belghith2710/projet_fm/blob/main/src/rul_deep.py"
click node_evaluation "https://github.com/farah-belghith2710/projet_fm/blob/main/src/evaluation.py"
click node_results "https://github.com/farah-belghith2710/projet_fm/tree/main/results"
click node_complements "https://github.com/farah-belghith2710/projet_fm/blob/main/4_analyses_complementaires.py"
click node_economy "https://github.com/farah-belghith2710/projet_fm/blob/main/src/economie.py"
click node_figures "https://github.com/farah-belghith2710/projet_fm/blob/main/3_figures_rapport.py"
click node_app "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/app.py"
click node_common "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/commun.py"
click node_data_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/donnees.py"
click node_health_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/sante.py"
click node_rul_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/pronostic.py"
click node_compare_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/comparaison.py"
click node_economy_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/economie.py"
click node_home_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/accueil.py"
click node_tests_page "https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/tests.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_reader,node_filter,node_extract toneBlue
class node_health,node_reliability,node_raw,node_processed toneAmber
class node_wiener,node_ml,node_deep toneMint
class node_pipeline,node_evaluation,node_results,node_complements,node_economy,node_figures toneRose
class node_app,node_common,node_data_page,node_health_page,node_rul_page,node_compare_page,node_economy_page,node_home_page,node_tests_page,node_analyst toneIndigo
```

## Components

### Signal preparation

- [Study configuration](https://github.com/farah-belghith2710/projet_fm/blob/main/src/config.py): `src/config.py`
- [Signal reader](https://github.com/farah-belghith2710/projet_fm/blob/main/src/data.py): `src/data.py`
- [Signal filtering](https://github.com/farah-belghith2710/projet_fm/blob/main/src/preprocessing.py): `src/preprocessing.py`
- [Feature extraction](https://github.com/farah-belghith2710/projet_fm/blob/main/src/features.py): `src/features.py`

### Health and reliability

- [Health indicators](https://github.com/farah-belghith2710/projet_fm/blob/main/src/health.py): `src/health.py`
- [Population reliability](https://github.com/farah-belghith2710/projet_fm/blob/main/src/reliability.py): `src/reliability.py`

### RUL modeling

- [Bayesian Wiener](https://github.com/farah-belghith2710/projet_fm/blob/main/src/rul_wiener.py): `src/rul_wiener.py`
- [Classical ML](https://github.com/farah-belghith2710/projet_fm/blob/main/src/rul_ml.py): `src/rul_ml.py`
- [Deep learning](https://github.com/farah-belghith2710/projet_fm/blob/main/src/rul_deep.py): `src/rul_deep.py`

### Results and decisions

- [Results pipeline](https://github.com/farah-belghith2710/projet_fm/blob/main/2_lancer_pipeline.py): `2_lancer_pipeline.py`
- [Model evaluation](https://github.com/farah-belghith2710/projet_fm/blob/main/src/evaluation.py): `src/evaluation.py`
- [Analysis results](https://github.com/farah-belghith2710/projet_fm/tree/main/results): `results`
- [Complementary analyses](https://github.com/farah-belghith2710/projet_fm/blob/main/4_analyses_complementaires.py): `4_analyses_complementaires.py`
- [Maintenance economics](https://github.com/farah-belghith2710/projet_fm/blob/main/src/economie.py): `src/economie.py`
- [Report figures](https://github.com/farah-belghith2710/projet_fm/blob/main/3_figures_rapport.py): `3_figures_rapport.py`

### Interactive dashboard

- [Dashboard app](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/app.py): `dashboard/app.py`
- [Shared dashboard tools](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/commun.py): `dashboard/commun.py`
- [Data and reliability](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/donnees.py): `dashboard/pages/donnees.py`
- [Health page](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/sante.py): `dashboard/pages/sante.py`
- [Prognosis page](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/pronostic.py): `dashboard/pages/pronostic.py`
- [Model comparison](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/comparaison.py): `dashboard/pages/comparaison.py`
- [Economics page](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/economie.py): `dashboard/pages/economie.py`
- [Overview page](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/accueil.py): `dashboard/pages/accueil.py`
- [Challenge page](https://github.com/farah-belghith2710/projet_fm/blob/main/dashboard/pages/tests.py): `dashboard/pages/tests.py`

### Other components

- **Researcher**
- **PRONOSTIA signals**
- [Processed data](https://github.com/farah-belghith2710/projet_fm/tree/main/data/processed): `data/processed`

## Connections

- Researcher → PRONOSTIA signals: provides records (evidence: `README.md`)
- PRONOSTIA signals → Signal reader: supplies signals (evidence: `README.md`)
- Signal reader → Study configuration: uses settings (evidence: `src/data.py`)
- Signal reader → Signal filtering: filters signals (evidence: `1_extraire_features.py`)
- Signal filtering → Feature extraction: prepares signals (evidence: `1_extraire_features.py`)
- Feature extraction → Study configuration: uses settings (evidence: `src/features.py`)
- Feature extraction → Processed data: writes features (evidence: `README.md`)
- Researcher → Results pipeline: runs analysis (evidence: `README.md`)
- Results pipeline → Processed data: reads features (evidence: `README.md`)
- Results pipeline → Health indicators: computes health (evidence: `2_lancer_pipeline.py`)
- Results pipeline → Population reliability: computes reliability (evidence: `2_lancer_pipeline.py`)
- Results pipeline → Bayesian Wiener: runs Wiener model (evidence: `2_lancer_pipeline.py`)
- Results pipeline → Classical ML: runs ML models (evidence: `2_lancer_pipeline.py`)
- Results pipeline → Deep learning: runs deep models (evidence: `2_lancer_pipeline.py`)
- Results pipeline → Model evaluation: evaluates predictions (evidence: `2_lancer_pipeline.py`)
- Results pipeline → Analysis results: writes outputs (evidence: `README.md`)
- Researcher → Complementary analyses: runs analyses (evidence: `README.md`)
- Complementary analyses → Population reliability: calls reliability methods (evidence: `4_analyses_complementaires.py`)
- Complementary analyses → Health indicators: calls health stage (evidence: `4_analyses_complementaires.py`)
- Complementary analyses → Maintenance economics: compares strategies (evidence: `4_analyses_complementaires.py`)
- Complementary analyses → Analysis results: reads and extends (evidence: `README.md`)
- Analysis results → Report figures: provides data (evidence: `README.md`)
- Researcher → Dashboard app: opens dashboard (evidence: `README.md`)
- Dashboard app → Shared dashboard tools: uses shared tools (evidence: `README.md`)
- Shared dashboard tools → Analysis results: loads outputs (evidence: `README.md`)
- Data and reliability → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/donnees.py`)
- Health page → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/sante.py`)
- Prognosis page → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/pronostic.py`)
- Model comparison → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/comparaison.py`)
- Economics page → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/economie.py`)
- Overview page → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/accueil.py`)
- Challenge page → Shared dashboard tools: uses shared tools (evidence: `dashboard/pages/tests.py`)
- Economics page → Maintenance economics: uses cost model (evidence: `dashboard/pages/economie.py`)
