# kidhiyonprabu-hub/feature-independence-analysis architecture

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

- Interactive diagram: https://gitdiagram.com/kidhiyonprabu-hub/feature-independence-analysis
- Repository: https://github.com/kidhiyonprabu-hub/feature-independence-analysis

## Overview

This is a Streamlit app for exploring associations between categorical features in an uploaded CSV. The user uploads a dataset, chooses a target feature, and the app tests eligible features with chi-square statistics and Bonferroni-adjusted p-values. Results include a chart and table, plus a selected-feature view of observed and expected counts. The excerpts show the main workflow and reporting, but omit some implementation lines; the graph therefore keeps those responsibilities within the single sampled source file.

Main entry points: [`app.py`](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py) (Summary results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Dataset input"]
  node_csv_upload["CSV upload<br/>[app.py]"]
  node_csv_read["CSV parsing<br/>[app.py]"]
  node_data_validation["Data validation<br/>[app.py]"]
end

subgraph group_analysis["Association analysis"]
  node_target_choice["Target selection<br/>[app.py]"]
  node_feature_analysis["Feature analysis<br/>[app.py]"]
  node_chi_square["Chi-square test<br/>[app.py]"]
  node_association_metrics["Association metrics<br/>[app.py]"]
end

subgraph group_results["Results and interpretation"]
  node_summary_results["Summary results<br/>[app.py]"]
  node_chart["Association chart<br/>[app.py]"]
  node_results_table["Results table<br/>[app.py]"]
  node_feature_detail["Feature details<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"uploads CSV"| node_csv_upload
node_csv_upload -->|"parses file"| node_csv_read
node_csv_read -->|"validates data"| node_data_validation
node_data_validation -->|"offers columns"| node_target_choice
node_target_choice -->|"analyzes target"| node_feature_analysis
node_feature_analysis -->|"tests features"| node_chi_square
node_chi_square -->|"computes metrics"| node_association_metrics
node_association_metrics -->|"summarizes results"| node_summary_results
node_summary_results -->|"renders chart"| node_chart
node_summary_results -->|"renders table"| node_results_table
node_results_table -->|"selects feature"| node_feature_detail

click node_csv_upload "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_csv_read "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_data_validation "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_target_choice "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_feature_analysis "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_chi_square "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_association_metrics "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_summary_results "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_chart "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_results_table "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py"
click node_feature_detail "https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.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_csv_upload,node_csv_read,node_data_validation,node_user toneBlue
class node_target_choice,node_feature_analysis,node_chi_square,node_association_metrics toneAmber
class node_summary_results,node_chart,node_results_table,node_feature_detail toneMint
```

## Components

### Dataset input

- [CSV upload](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [CSV parsing](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Data validation](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`

### Association analysis

- [Target selection](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Feature analysis](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Chi-square test](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Association metrics](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`

### Results and interpretation

- [Summary results](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Association chart](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Results table](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`
- [Feature details](https://github.com/kidhiyonprabu-hub/feature-independence-analysis/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → CSV upload: uploads CSV (evidence: `app.py`)
- CSV upload → CSV parsing: parses file (evidence: `app.py`)
- CSV parsing → Data validation: validates data (evidence: `app.py`)
- Data validation → Target selection: offers columns (evidence: `app.py`)
- Target selection → Feature analysis: analyzes target (evidence: `app.py`)
- Feature analysis → Chi-square test: tests features (evidence: `app.py`)
- Chi-square test → Association metrics: computes metrics (evidence: `app.py`)
- Association metrics → Summary results: summarizes results (evidence: `app.py`)
- Summary results → Association chart: renders chart (evidence: `app.py`)
- Summary results → Results table: renders table (evidence: `app.py`)
- Results table → Feature details: selects feature (evidence: `app.py`)
