# andykang98/drop-mooc-prediction architecture

> Architecture diagram of the GitHub repository andykang98/drop-mooc-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andykang98/drop-mooc-prediction
- Repository: https://github.com/andykang98/drop-mooc-prediction

## Overview

Drop-MOOC-Prediction is a batch machine-learning project that predicts whether MOOC enrollments will become dropouts. Its documented workflow loads course, enrollment, event-log, and label data; derives and transforms behavioral features; then trains classifiers and reports test metrics. The graph separates feature families and model strategies while keeping their shared implementation paths. Relationships are limited to calls visible in the excerpts or workflow statements in the README; unsampled implementation details are not inferred.

Main entry points: [`preprocess.py`](https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py) (Preprocessor), [`main.py`](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py) (Prediction runner), [`read_data.py`](https://github.com/andykang98/drop-mooc-prediction/blob/master/read_data.py) (Dataset loaders), [`data`](https://github.com/andykang98/drop-mooc-prediction/tree/master/data) (KDD data files)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Data inputs"]
  node_datafiles["KDD data files"]
  node_loaders["Dataset loaders<br/>[read_data.py]"]
end

subgraph group_features["Feature engineering"]
  node_preprocessor["Preprocessor<br/>[preprocess.py]"]
  node_activity["Event counts<br/>[preprocess.py]"]
  node_sessions["Weekly sessions<br/>[preprocess.py]"]
  node_coverage["Study coverage<br/>[preprocess.py]"]
  node_transform["Feature transform<br/>[preprocess.py]"]
end

subgraph group_prediction["Prediction and evaluation"]
  node_runner["Prediction runner<br/>[main.py]"]
  node_randomforest["Random forest<br/>[main.py]"]
  node_logistic["Logistic regression<br/>[main.py]"]
  node_xgboost["XGBoost<br/>[main.py]"]
  node_voting["Voting classifier<br/>[main.py]"]
  node_metrics["Test metrics<br/>[main.py]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_runner
node_datafiles -->|"loaded by"| node_loaders
node_runner -->|"creates"| node_preprocessor
node_preprocessor -->|"loads data"| node_loaders
node_preprocessor -->|"extracts"| node_activity
node_preprocessor -->|"extracts"| node_sessions
node_preprocessor -->|"extracts"| node_coverage
node_preprocessor -->|"transforms"| node_transform
node_runner -->|"runs"| node_randomforest
node_runner -->|"runs"| node_logistic
node_runner -->|"runs"| node_xgboost
node_runner -->|"runs"| node_voting
node_randomforest -->|"reports"| node_metrics
node_logistic -->|"reports"| node_metrics
node_xgboost -->|"reports"| node_metrics
node_voting -->|"reports"| node_metrics

click node_datafiles "https://github.com/andykang98/drop-mooc-prediction/tree/master/data"
click node_loaders "https://github.com/andykang98/drop-mooc-prediction/blob/master/read_data.py"
click node_runner "https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py"
click node_preprocessor "https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py"
click node_activity "https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py"
click node_sessions "https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py"
click node_coverage "https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py"
click node_transform "https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py"
click node_randomforest "https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py"
click node_logistic "https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py"
click node_xgboost "https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py"
click node_voting "https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py"
click node_metrics "https://github.com/andykang98/drop-mooc-prediction/blob/master/main.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_datafiles,node_loaders toneBlue
class node_preprocessor,node_activity,node_sessions,node_coverage,node_transform toneAmber
class node_runner,node_randomforest,node_logistic,node_xgboost,node_voting,node_metrics toneMint
class node_operator toneIndigo
```

## Components

### Data inputs

- [KDD data files](https://github.com/andykang98/drop-mooc-prediction/tree/master/data): `data`
- [Dataset loaders](https://github.com/andykang98/drop-mooc-prediction/blob/master/read_data.py): `read_data.py`

### Feature engineering

- [Preprocessor](https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py): `preprocess.py`
- [Event counts](https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py): `preprocess.py`
- [Weekly sessions](https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py): `preprocess.py`
- [Study coverage](https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py): `preprocess.py`
- [Feature transform](https://github.com/andykang98/drop-mooc-prediction/blob/master/preprocess.py): `preprocess.py`

### Prediction and evaluation

- [Prediction runner](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py): `main.py`
- [Random forest](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py): `main.py`
- [Logistic regression](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py): `main.py`
- [XGBoost](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py): `main.py`
- [Voting classifier](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py): `main.py`
- [Test metrics](https://github.com/andykang98/drop-mooc-prediction/blob/master/main.py): `main.py`

### Other components

- **Operator**

## Connections

- Operator → Prediction runner: runs (evidence: `README.md`)
- KDD data files → Dataset loaders: loaded by (evidence: `README.md`)
- Prediction runner → Preprocessor: creates (evidence: `main.py`)
- Preprocessor → Dataset loaders: loads data (evidence: `preprocess.py`)
- Preprocessor → Event counts: extracts (evidence: `preprocess.py`)
- Preprocessor → Weekly sessions: extracts (evidence: `preprocess.py`)
- Preprocessor → Study coverage: extracts (evidence: `preprocess.py`)
- Preprocessor → Feature transform: transforms (evidence: `preprocess.py`)
- Prediction runner → Random forest: runs (evidence: `main.py`)
- Prediction runner → Logistic regression: runs (evidence: `main.py`)
- Prediction runner → XGBoost: runs (evidence: `main.py`)
- Prediction runner → Voting classifier: runs (evidence: `main.py`)
- Random forest → Test metrics: reports (evidence: `main.py`)
- Logistic regression → Test metrics: reports (evidence: `main.py`)
- XGBoost → Test metrics: reports (evidence: `main.py`)
- Voting classifier → Test metrics: reports (evidence: `main.py`)
