# githyan/energy-projections-for-customers-and-weights architecture

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

- Interactive diagram: https://gitdiagram.com/githyan/energy-projections-for-customers-and-weights
- Repository: https://github.com/githyan/energy-projections-for-customers-and-weights

## Overview

This repository contains a Python ANFIS implementation, alongside an energy-projection notebook and an Excel dataset. The available README gives only the project title, and the notebook and dataset contents were not sampled, so their roles and connections to the code cannot be verified. The shown implementation builds a five-stage fuzzy-inference model and exposes fitting and membership-function plotting; the graph focuses on those evidenced runtime components.

Main entry points: [`anfis.py`](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py) (ANFIS model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_anfis["ANFIS runtime"]
  node_parameters["FIS parameters<br/>[anfis.py]"]
  node_model["ANFIS model<br/>[anfis.py]"]
  node_fuzzy["Fuzzy memberships<br/>[anfis.py]"]
  node_rules["Rule firing<br/>[anfis.py]"]
  node_normalize["Rule normalization<br/>[anfis.py]"]
  node_defuzz["Defuzzification<br/>[anfis.py]"]
  node_sum["Output summation<br/>[anfis.py]"]
  node_training["Model fitting<br/>[anfis.py]"]
  node_plotting["Membership plotting<br/>[anfis.py]"]
end

node_model -->|"applies memberships"| node_fuzzy
node_model -->|"builds rules"| node_rules
node_model -->|"normalizes rules"| node_normalize
node_model -->|"defuzzifies"| node_defuzz
node_model -->|"sums output"| node_sum
node_training -->|"fits model"| node_model
node_plotting -->|"reads weights"| node_model

click node_parameters "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_model "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_fuzzy "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_rules "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_normalize "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_defuzz "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_sum "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_training "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py"
click node_plotting "https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.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_parameters,node_model,node_fuzzy,node_rules,node_normalize,node_defuzz,node_sum,node_training,node_plotting toneBlue
```

## Components

### ANFIS runtime

- [FIS parameters](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [ANFIS model](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Fuzzy memberships](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Rule firing](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Rule normalization](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Defuzzification](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Output summation](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Model fitting](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`
- [Membership plotting](https://github.com/githyan/energy-projections-for-customers-and-weights/blob/Main/anfis.py): `anfis.py`

## Connections

- ANFIS model → Fuzzy memberships: applies memberships (evidence: `anfis.py`)
- ANFIS model → Rule firing: builds rules (evidence: `anfis.py`)
- ANFIS model → Rule normalization: normalizes rules (evidence: `anfis.py`)
- ANFIS model → Defuzzification: defuzzifies (evidence: `anfis.py`)
- ANFIS model → Output summation: sums output (evidence: `anfis.py`)
- Model fitting → ANFIS model: fits model (evidence: `anfis.py`)
- Membership plotting → ANFIS model: reads weights (evidence: `anfis.py`)
