# winstonchu498/machine_learning_examples architecture

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

- Interactive diagram: https://gitdiagram.com/winstonchu498/machine_learning_examples
- Repository: https://github.com/winstonchu498/machine_learning_examples

## Overview

This repository is a collection of independent machine-learning course examples, not a single application. The learner’s broad workflow is to choose a course folder, run an example, and examine its model or result; individual scripts cover training, inference, visualization, and evaluation. The graph maps the major documented subject areas and shows only a few source-supported runtime relationships. Many examples were not sampled, so their internal wiring is intentionally omitted.

Main entry points: [`rl2/a3c/main.py`](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/main.py) (A3C runner), [`rl3/a2c/main.py`](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/main.py) (A2C runner), [`rl2/a3c/worker.py`](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/worker.py) (A3C worker), [`supervised_class/app.py`](https://github.com/winstonchu498/machine_learning_examples/blob/master/supervised_class/app.py) (Prediction API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["ML foundations"]
  node_supervised["Supervised models"]
  node_linear_logistic["Regression models"]
  node_svm["Support vector machines"]
  node_ensemble["Ensemble methods"]
  node_unsupervised["Clustering and embeddings"]
  node_bayesian["Bayesian methods"]
end

subgraph group_deep_learning["Deep learning"]
  node_ann["Neural networks"]
  node_keras_examples["Keras examples"]
end

subgraph group_language_vision["Language and vision"]
  node_cnn["Convolutional networks"]
  node_advanced_cnn["Advanced vision"]
  node_nlp["NLP examples"]
  node_advanced_nlp["Advanced NLP"]
  node_rnn["Recurrent networks"]
  node_hmm["Hidden Markov models"]
end

subgraph group_decision_systems["Decision systems"]
  node_rl["Reinforcement learning"]
  node_a3c_main["A3C runner<br/>[main.py]"]
  node_a3c_worker["A3C worker<br/>[worker.py]"]
  node_a3c_networks["A3C networks<br/>[nets.py]"]
  node_a2c_main["A2C runner<br/>[main.py]"]
  node_a2c_learner["A2C learner<br/>[a2c.py]"]
  node_vector_env["Parallel environments<br/>[subproc_vec_env.py]"]
end

subgraph group_applications["Applied ML"]
  node_recommenders["Recommender systems"]
  node_ab_client["A/B test client<br/>[client.py]"]
  node_prediction_api["Prediction API<br/>[app.py]"]
end

node_learner(("Course learner"))
node_ab_service(("Ad test service"))
node_prediction_user(("Prediction caller"))
node_serialized_model["Serialized model"]

node_learner -->|"explores examples"| node_supervised
node_learner -->|"explores examples"| node_linear_logistic
node_learner -->|"explores examples"| node_svm
node_learner -->|"explores examples"| node_ensemble
node_learner -->|"explores examples"| node_unsupervised
node_learner -->|"explores examples"| node_bayesian
node_learner -->|"explores examples"| node_ann
node_learner -->|"explores examples"| node_keras_examples
node_learner -->|"explores examples"| node_cnn
node_learner -->|"explores examples"| node_advanced_cnn
node_learner -->|"explores examples"| node_nlp
node_learner -->|"explores examples"| node_advanced_nlp
node_learner -->|"explores examples"| node_rnn
node_learner -->|"explores examples"| node_hmm
node_learner -->|"explores examples"| node_rl
node_learner -->|"explores examples"| node_recommenders
node_a3c_main -->|"creates workers"| node_a3c_worker
node_a3c_main -->|"creates global networks"| node_a3c_networks
node_a3c_worker -->|"creates local networks"| node_a3c_networks
node_a2c_main -->|"creates environments"| node_vector_env
node_a2c_main -->|"starts learning"| node_a2c_learner
node_ab_client -->|"requests ads and reports clicks"| node_ab_service
node_prediction_user -->|"posts features"| node_prediction_api
node_prediction_api -->|"loads model"| node_serialized_model

click node_supervised "https://github.com/winstonchu498/machine_learning_examples/tree/master/supervised_class"
click node_linear_logistic "https://github.com/winstonchu498/machine_learning_examples/tree/master/linear_regression_class"
click node_svm "https://github.com/winstonchu498/machine_learning_examples/tree/master/svm_class"
click node_ensemble "https://github.com/winstonchu498/machine_learning_examples/tree/master/supervised_class2"
click node_unsupervised "https://github.com/winstonchu498/machine_learning_examples/tree/master/unsupervised_class"
click node_bayesian "https://github.com/winstonchu498/machine_learning_examples/tree/master/bayesian_ml"
click node_ann "https://github.com/winstonchu498/machine_learning_examples/tree/master/ann_class2"
click node_keras_examples "https://github.com/winstonchu498/machine_learning_examples/tree/master/keras_examples"
click node_cnn "https://github.com/winstonchu498/machine_learning_examples/tree/master/cnn_class"
click node_advanced_cnn "https://github.com/winstonchu498/machine_learning_examples/tree/master/cnn_class2"
click node_nlp "https://github.com/winstonchu498/machine_learning_examples/tree/master/nlp_class"
click node_advanced_nlp "https://github.com/winstonchu498/machine_learning_examples/tree/master/nlp_class3"
click node_rnn "https://github.com/winstonchu498/machine_learning_examples/tree/master/rnn_class"
click node_hmm "https://github.com/winstonchu498/machine_learning_examples/tree/master/hmm_class"
click node_rl "https://github.com/winstonchu498/machine_learning_examples/tree/master/rl"
click node_a3c_main "https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/main.py"
click node_a3c_worker "https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/worker.py"
click node_a3c_networks "https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/nets.py"
click node_a2c_main "https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/main.py"
click node_a2c_learner "https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/a2c.py"
click node_vector_env "https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/subproc_vec_env.py"
click node_recommenders "https://github.com/winstonchu498/machine_learning_examples/tree/master/recommenders"
click node_ab_client "https://github.com/winstonchu498/machine_learning_examples/blob/master/ab_testing/client.py"
click node_prediction_api "https://github.com/winstonchu498/machine_learning_examples/blob/master/supervised_class/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_supervised,node_linear_logistic,node_svm,node_ensemble,node_unsupervised,node_bayesian toneBlue
class node_ann,node_keras_examples toneAmber
class node_cnn,node_advanced_cnn,node_nlp,node_advanced_nlp,node_rnn,node_hmm toneMint
class node_rl,node_a3c_main,node_a3c_worker,node_a3c_networks,node_a2c_main,node_a2c_learner,node_vector_env toneRose
class node_recommenders,node_ab_client,node_prediction_api,node_learner,node_ab_service,node_prediction_user,node_serialized_model toneIndigo
```

## Components

### ML foundations

- [Supervised models](https://github.com/winstonchu498/machine_learning_examples/tree/master/supervised_class): `supervised_class`
- [Regression models](https://github.com/winstonchu498/machine_learning_examples/tree/master/linear_regression_class): `linear_regression_class`
- [Support vector machines](https://github.com/winstonchu498/machine_learning_examples/tree/master/svm_class): `svm_class`
- [Ensemble methods](https://github.com/winstonchu498/machine_learning_examples/tree/master/supervised_class2): `supervised_class2`
- [Clustering and embeddings](https://github.com/winstonchu498/machine_learning_examples/tree/master/unsupervised_class): `unsupervised_class`
- [Bayesian methods](https://github.com/winstonchu498/machine_learning_examples/tree/master/bayesian_ml): `bayesian_ml`

### Deep learning

- [Neural networks](https://github.com/winstonchu498/machine_learning_examples/tree/master/ann_class2): `ann_class2`
- [Keras examples](https://github.com/winstonchu498/machine_learning_examples/tree/master/keras_examples): `keras_examples`

### Language and vision

- [Convolutional networks](https://github.com/winstonchu498/machine_learning_examples/tree/master/cnn_class): `cnn_class`
- [Advanced vision](https://github.com/winstonchu498/machine_learning_examples/tree/master/cnn_class2): `cnn_class2`
- [NLP examples](https://github.com/winstonchu498/machine_learning_examples/tree/master/nlp_class): `nlp_class`
- [Advanced NLP](https://github.com/winstonchu498/machine_learning_examples/tree/master/nlp_class3): `nlp_class3`
- [Recurrent networks](https://github.com/winstonchu498/machine_learning_examples/tree/master/rnn_class): `rnn_class`
- [Hidden Markov models](https://github.com/winstonchu498/machine_learning_examples/tree/master/hmm_class): `hmm_class`

### Decision systems

- [Reinforcement learning](https://github.com/winstonchu498/machine_learning_examples/tree/master/rl): `rl`
- [A3C runner](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/main.py): `rl2/a3c/main.py`
- [A3C worker](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/worker.py): `rl2/a3c/worker.py`
- [A3C networks](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl2/a3c/nets.py): `rl2/a3c/nets.py`
- [A2C runner](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/main.py): `rl3/a2c/main.py`
- [A2C learner](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/a2c.py): `rl3/a2c/a2c.py`
- [Parallel environments](https://github.com/winstonchu498/machine_learning_examples/blob/master/rl3/a2c/subproc_vec_env.py): `rl3/a2c/subproc_vec_env.py`

### Applied ML

- [Recommender systems](https://github.com/winstonchu498/machine_learning_examples/tree/master/recommenders): `recommenders`
- [A/B test client](https://github.com/winstonchu498/machine_learning_examples/blob/master/ab_testing/client.py): `ab_testing/client.py`
- [Prediction API](https://github.com/winstonchu498/machine_learning_examples/blob/master/supervised_class/app.py): `supervised_class/app.py`

### Other components

- **Course learner**
- **Ad test service**
- **Prediction caller**
- **Serialized model**

## Connections

- Course learner → Supervised models: explores examples
- Course learner → Regression models: explores examples
- Course learner → Support vector machines: explores examples
- Course learner → Ensemble methods: explores examples
- Course learner → Clustering and embeddings: explores examples
- Course learner → Bayesian methods: explores examples
- Course learner → Neural networks: explores examples
- Course learner → Keras examples: explores examples
- Course learner → Convolutional networks: explores examples
- Course learner → Advanced vision: explores examples
- Course learner → NLP examples: explores examples
- Course learner → Advanced NLP: explores examples
- Course learner → Recurrent networks: explores examples
- Course learner → Hidden Markov models: explores examples
- Course learner → Reinforcement learning: explores examples
- Course learner → Recommender systems: explores examples
- A3C runner → A3C worker: creates workers
- A3C runner → A3C networks: creates global networks
- A3C worker → A3C networks: creates local networks
- A2C runner → Parallel environments: creates environments
- A2C runner → A2C learner: starts learning
- A/B test client → Ad test service: requests ads and reports clicks
- Prediction caller → Prediction API: posts features
- Prediction API → Serialized model: loads model
