# ram200509/land-cover-classification-using-ml-algorithms architecture

> Architecture diagram of the GitHub repository ram200509/land-cover-classification-using-ml-algorithms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ram200509/land-cover-classification-using-ml-algorithms
- Repository: https://github.com/ram200509/land-cover-classification-using-ml-algorithms

## Overview

This is a batch land-cover classification workflow: satellite raster values are sampled at labeled training points, the resulting dataset is cleaned, several classifiers are trained and evaluated, and a comparison table is saved. The graph separates extraction, dataset preparation, and modeling/results. The README documents QGIS-digitized samples and the model/evaluation capabilities; source excerpts show the script-level data flow. Paths in the scripts are machine-specific.

Main entry points: [`extract_values.py`](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/extract_values.py) (Raster Sampler), [`clean_dataset.py`](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/clean_dataset.py) (Label Cleaner), [`train_models.py`](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py) (Feature Preparation), [`data/training_dataset.csv`](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/data/training_dataset.csv) (Training Dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extract["Feature Extraction"]
  node_extractor["Raster Sampler<br/>[extract_values.py]"]
  node_raw_data["Training Dataset"]
end

subgraph group_data["Dataset Preparation"]
  node_cleaner["Label Cleaner<br/>[clean_dataset.py]"]
  node_clean_data["Cleaned Dataset"]
end

subgraph group_model["Modeling and Results"]
  node_preparation["Feature Preparation<br/>[train_models.py]"]
  node_classifiers["Five Classifiers<br/>[train_models.py]"]
  node_evaluation["Model Evaluation<br/>[train_models.py]"]
  node_comparison["Model Comparison"]
end

node_researcher(("Researcher"))
node_gis_inputs["GIS Samples and Rasters"]

node_researcher -->|"runs extraction"| node_extractor
node_gis_inputs -->|"samples rasters"| node_extractor
node_extractor -->|"writes samples"| node_raw_data
node_researcher -->|"runs cleaning"| node_cleaner
node_raw_data -->|"reads rows"| node_cleaner
node_cleaner -->|"writes cleaned data"| node_clean_data
node_researcher -->|"runs training"| node_preparation
node_clean_data -->|"loads features"| node_preparation
node_preparation -->|"provides splits"| node_classifiers
node_classifiers -->|"returns predictions"| node_evaluation
node_evaluation -->|"saves metrics"| node_comparison

click node_extractor "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/extract_values.py"
click node_raw_data "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/data/training_dataset.csv"
click node_cleaner "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/clean_dataset.py"
click node_clean_data "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/data/training_dataset_cleaned.csv"
click node_preparation "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py"
click node_classifiers "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py"
click node_evaluation "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py"
click node_comparison "https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/results/model_comparison.csv"

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_extractor,node_raw_data toneBlue
class node_cleaner,node_clean_data toneAmber
class node_preparation,node_classifiers,node_evaluation,node_comparison toneMint
class node_researcher,node_gis_inputs toneIndigo
```

## Components

### Feature Extraction

- [Raster Sampler](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/extract_values.py): `extract_values.py`
- [Training Dataset](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/data/training_dataset.csv): `data/training_dataset.csv`

### Dataset Preparation

- [Label Cleaner](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/clean_dataset.py): `clean_dataset.py`
- [Cleaned Dataset](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/data/training_dataset_cleaned.csv): `data/training_dataset_cleaned.csv`

### Modeling and Results

- [Feature Preparation](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py): `train_models.py`
- [Five Classifiers](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py): `train_models.py`
- [Model Evaluation](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/train_models.py): `train_models.py`
- [Model Comparison](https://github.com/ram200509/land-cover-classification-using-ml-algorithms/blob/main/results/model_comparison.csv): `results/model_comparison.csv`

### Other components

- **Researcher**
- **GIS Samples and Rasters**

## Connections

- Researcher → Raster Sampler: runs extraction (evidence: `extract_values.py`)
- GIS Samples and Rasters → Raster Sampler: samples rasters (evidence: `extract_values.py`)
- Raster Sampler → Training Dataset: writes samples (evidence: `extract_values.py`)
- Researcher → Label Cleaner: runs cleaning (evidence: `clean_dataset.py`)
- Training Dataset → Label Cleaner: reads rows (evidence: `clean_dataset.py`)
- Label Cleaner → Cleaned Dataset: writes cleaned data (evidence: `clean_dataset.py`)
- Researcher → Feature Preparation: runs training (evidence: `train_models.py`)
- Cleaned Dataset → Feature Preparation: loads features (evidence: `train_models.py`)
- Feature Preparation → Five Classifiers: provides splits (evidence: `train_models.py`)
- Five Classifiers → Model Evaluation: returns predictions (evidence: `train_models.py`)
- Model Evaluation → Model Comparison: saves metrics (evidence: `train_models.py`)
