# mansigawde/instagram-fake-spammer-genuine-account- architecture

> Architecture diagram of the GitHub repository mansigawde/instagram-fake-spammer-genuine-account-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mansigawde/instagram-fake-spammer-genuine-account-
- Repository: https://github.com/mansigawde/instagram-fake-spammer-genuine-account-

## Overview

This repository is a script for training and evaluating an Instagram fake/spam account classifier, not a deployed reporting service. The workflow reads train.csv, prepares features and labels, splits the data, trains a random-forest model, evaluates predictions, and saves the model. It also displays classification metrics, confusion-matrix, feature-importance, ROC, and precision-recall plots. The only runtime source is main.py; test.csv and the presentation/PDF are not used by the shown code. Evidence is limited to that source excerpt.

Main entry points: [`main.py`](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py) (Training script), [`train.csv`](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/train.csv) (Training data), [`rf_model.joblib`](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/rf_model.joblib) (Saved model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Training and evaluation"]
  node_training_data["Training data<br/>[train.csv]"]
  node_script["Training script<br/>[main.py]"]
  node_features["Feature preparation<br/>[main.py]"]
  node_split["Train-test split<br/>[main.py]"]
  node_classifier["Random forest<br/>[main.py]"]
  node_predictions["Test predictions<br/>[main.py]"]
  node_evaluation["Model evaluation<br/>[main.py]"]
  node_visualizations["Evaluation plots<br/>[main.py]"]
  node_artifact["Saved model<br/>[rf_model.joblib]"]
end

node_operator(("Script operator"))

node_operator -.->|"runs"| node_script
node_script -->|"reads"| node_training_data
node_script -->|"prepares"| node_features
node_features -->|"splits"| node_split
node_split -->|"trains"| node_classifier
node_classifier -->|"predicts"| node_predictions
node_predictions -->|"evaluates"| node_evaluation
node_classifier -->|"provides probabilities"| node_evaluation
node_script -->|"saves"| node_artifact
node_script -->|"displays"| node_visualizations

click node_training_data "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/train.csv"
click node_script "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_features "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_split "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_classifier "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_predictions "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_evaluation "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_visualizations "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py"
click node_artifact "https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/rf_model.joblib"

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_training_data,node_script,node_features,node_split,node_classifier,node_predictions,node_evaluation,node_visualizations,node_artifact toneBlue
class node_operator toneIndigo
```

## Components

### Training and evaluation

- [Training data](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/train.csv): `train.csv`
- [Training script](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Feature preparation](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Train-test split](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Random forest](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Test predictions](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Model evaluation](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Evaluation plots](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/main.py): `main.py`
- [Saved model](https://github.com/mansigawde/instagram-fake-spammer-genuine-account-/blob/main/rf_model.joblib): `rf_model.joblib`

### Other components

- **Script operator**

## Connections

- Script operator → Training script: runs
- Training script → Training data: reads (evidence: `main.py`)
- Training script → Feature preparation: prepares (evidence: `main.py`)
- Feature preparation → Train-test split: splits (evidence: `main.py`)
- Train-test split → Random forest: trains (evidence: `main.py`)
- Random forest → Test predictions: predicts (evidence: `main.py`)
- Test predictions → Model evaluation: evaluates (evidence: `main.py`)
- Random forest → Model evaluation: provides probabilities (evidence: `main.py`)
- Training script → Saved model: saves (evidence: `main.py`)
- Training script → Evaluation plots: displays (evidence: `main.py`)
