# shaiknawazshareef/random-forest-classification-using-machine-learning architecture

> Architecture diagram of the GitHub repository shaiknawazshareef/random-forest-classification-using-machine-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shaiknawazshareef/random-forest-classification-using-machine-learning
- Repository: https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning

## Overview

This is a small, script-driven car-acceptability classification project. The user runs the script, which loads and inspects the CSV, splits the data, encodes categorical inputs, and trains and evaluates a random forest. It then visualizes feature importance and repeats the experiment without the doors feature, reporting a confusion matrix and classification report. These responsibilities are implemented in one Python file, so the graph separates workflow stages rather than implying a larger service architecture.

Main entry points: [`random_forest_classifier.py`](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py) (Workflow Orchestrator), [`car_evaluation.csv`](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/car_evaluation.csv) (Car Evaluation CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Dataset"]
  node_csv["Car Evaluation CSV<br/>[car_evaluation.csv]"]
end

subgraph group_workflow["Classification Workflow"]
  node_main["Workflow Orchestrator"]
  node_loader["Load and Inspect"]
  node_encoder["Ordinal Encoding"]
  node_split["Train-Test Split"]
  node_forest["Random Forest"]
end

subgraph group_analysis["Evaluation and Analysis"]
  node_importance["Feature Importance"]
  node_comparison["Without Doors"]
  node_metrics["Evaluation Metrics"]
  node_plot["Importance Plot"]
end

node_user(("Project Runner"))

node_user -->|"runs"| node_main
node_main -->|"calls"| node_loader
node_loader -->|"reads"| node_csv
node_main -->|"splits data"| node_split
node_main -->|"encodes features"| node_encoder
node_main -->|"trains and predicts"| node_forest
node_main -->|"computes"| node_importance
node_main -->|"renders"| node_plot
node_main -->|"runs"| node_comparison
node_comparison -->|"splits data"| node_split
node_comparison -->|"encodes features"| node_encoder
node_comparison -->|"trains and predicts"| node_forest
node_comparison -->|"computes"| node_metrics

click node_csv "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/car_evaluation.csv"
click node_main "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_loader "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_encoder "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_split "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_forest "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_importance "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_comparison "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_metrics "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py"
click node_plot "https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.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 toneBlue
class node_main,node_loader,node_encoder,node_split,node_forest toneAmber
class node_importance,node_comparison,node_metrics,node_plot toneMint
class node_user toneIndigo
```

## Components

### Dataset

- [Car Evaluation CSV](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/car_evaluation.csv): `car_evaluation.csv`

### Classification Workflow

- [Workflow Orchestrator](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Load and Inspect](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Ordinal Encoding](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Train-Test Split](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Random Forest](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`

### Evaluation and Analysis

- [Feature Importance](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Without Doors](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Evaluation Metrics](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`
- [Importance Plot](https://github.com/shaiknawazshareef/random-forest-classification-using-machine-learning/blob/main/random_forest_classifier.py): `random_forest_classifier.py`

### Other components

- **Project Runner**

## Connections

- Project Runner → Workflow Orchestrator: runs (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Load and Inspect: calls (evidence: `random_forest_classifier.py`)
- Load and Inspect → Car Evaluation CSV: reads (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Train-Test Split: splits data (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Ordinal Encoding: encodes features (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Random Forest: trains and predicts (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Feature Importance: computes (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Importance Plot: renders (evidence: `random_forest_classifier.py`)
- Workflow Orchestrator → Without Doors: runs (evidence: `random_forest_classifier.py`)
- Without Doors → Train-Test Split: splits data (evidence: `random_forest_classifier.py`)
- Without Doors → Ordinal Encoding: encodes features (evidence: `random_forest_classifier.py`)
- Without Doors → Random Forest: trains and predicts (evidence: `random_forest_classifier.py`)
- Without Doors → Evaluation Metrics: computes (evidence: `random_forest_classifier.py`)
