# tiepvupsu/ebookmlcb architecture

> Architecture diagram of the GitHub repository tiepvupsu/ebookmlcb, 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/tiepvupsu/ebookmlcb
- Repository: https://github.com/tiepvupsu/ebookmlcb

## Overview

This repository is source code accompanying the Vietnamese ebook “Machine Learning cơ bản,” not a single integrated application. Its principal use is for a reader to explore chapter-organized examples that illustrate machine-learning methods and mathematical concepts. The examples cover supervised learning, neural networks, clustering, recommendation, dimensionality reduction, and optimization; many are standalone scripts. The README establishes the relationship to the ebook, but the sampled sources do not show a shared runtime or a single end-to-end data workflow.

Main entry points: [`Chapters/02_LinearAlgebra/30_prob/python`](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/02_LinearAlgebra/30_prob/python) (Probability examples), [`Chapters/03_SimpleML/3_linearregression`](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/03_SimpleML/3_linearregression) (Linear regression), [`ebookML_src/src/kmeans_animation.py`](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/kmeans_animation.py) (K-means clustering), [`Chapters/08_ConvexOptimization/16_convexity`](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/08_ConvexOptimization/16_convexity) (Convexity examples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fundamentals["Math and fundamentals"]
  node_probability["Probability examples"]
  node_gradient_checks["Gradient checks<br/>[check_grad.py]"]
end

subgraph group_supervised["Supervised learning"]
  node_linear_regression["Linear regression"]
  node_knn["Nearest neighbors"]
  node_logistic_regression["Logistic regression<br/>[log_reg.py]"]
end

subgraph group_neural["Neural networks"]
  node_perceptron["Perceptron"]
  node_softmax["Softmax classification<br/>[mysoftmax.py]"]
  node_multiclass_models["Multiclass models"]
  node_mlp_dropout["MLP and dropout"]
end

subgraph group_unsupervised["Unsupervised learning"]
  node_kmeans["K-means clustering"]
  node_kmeans_visualization["Network visualization<br/>[display_network.py]"]
  node_matrix_factorization["Matrix factorization<br/>[mf.py]"]
  node_pca_visualization["PCA visualization<br/>[display_network.py]"]
end

subgraph group_optimization["Optimization"]
  node_convexity["Convexity examples"]
  node_convex_solvers["Convex optimization"]
  node_duality["Convex duality<br/>[dualfunc.py]"]
end

node_reader(("Ebook reader"))

node_reader -->|"explores examples"| node_probability
node_reader -->|"explores examples"| node_linear_regression
node_reader -->|"explores examples"| node_kmeans
node_reader -->|"explores examples"| node_convexity

click node_probability "https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/02_LinearAlgebra/30_prob/python"
click node_gradient_checks "https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/check_grad.py"
click node_linear_regression "https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/03_SimpleML/3_linearregression"
click node_knn "https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/multiclasssvm/cs231n/classifiers/k_nearest_neighbor.py"
click node_logistic_regression "https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/logistic_regression/log_reg.py"
click node_perceptron "https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/05_NeuralNetworks/09_perceptron"
click node_softmax "https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/softmax_regression/mysoftmax.py"
click node_multiclass_models "https://github.com/tiepvupsu/ebookmlcb/tree/master/ebookML_src/src/multiclasssvm/cs231n/classifiers"
click node_mlp_dropout "https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/05_NeuralNetworks/14_mlp"
click node_kmeans "https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/kmeans_animation.py"
click node_kmeans_visualization "https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/kmeans/display_network.py"
click node_matrix_factorization "https://github.com/tiepvupsu/ebookmlcb/blob/master/Chapters/06_RecommendationSystems/25_mf/python/mf.py"
click node_convexity "https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/08_ConvexOptimization/16_convexity"
click node_convex_solvers "https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/08_ConvexOptimization/17_convexopt"
click node_duality "https://github.com/tiepvupsu/ebookmlcb/blob/master/Chapters/08_ConvexOptimization/18_duality/python/dualfunc.py"
click node_pca_visualization "https://github.com/tiepvupsu/ebookmlcb/blob/master/Chapters/07_DimemsionalityReduction/28_pca2/python/display_network.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_probability,node_gradient_checks toneBlue
class node_linear_regression,node_knn,node_logistic_regression toneAmber
class node_perceptron,node_softmax,node_multiclass_models,node_mlp_dropout toneMint
class node_kmeans,node_kmeans_visualization,node_matrix_factorization,node_pca_visualization toneRose
class node_convexity,node_convex_solvers,node_duality,node_reader toneIndigo
```

## Components

### Math and fundamentals

- [Probability examples](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/02_LinearAlgebra/30_prob/python): `Chapters/02_LinearAlgebra/30_prob/python`
- [Gradient checks](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/check_grad.py): `ebookML_src/src/check_grad.py`

### Supervised learning

- [Linear regression](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/03_SimpleML/3_linearregression): `Chapters/03_SimpleML/3_linearregression`
- [Nearest neighbors](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/multiclasssvm/cs231n/classifiers/k_nearest_neighbor.py): `ebookML_src/src/multiclasssvm/cs231n/classifiers/k_nearest_neighbor.py`
- [Logistic regression](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/logistic_regression/log_reg.py): `ebookML_src/src/logistic_regression/log_reg.py`

### Neural networks

- [Perceptron](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/05_NeuralNetworks/09_perceptron): `Chapters/05_NeuralNetworks/09_perceptron`
- [Softmax classification](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/softmax_regression/mysoftmax.py): `ebookML_src/src/softmax_regression/mysoftmax.py`
- [Multiclass models](https://github.com/tiepvupsu/ebookmlcb/tree/master/ebookML_src/src/multiclasssvm/cs231n/classifiers): `ebookML_src/src/multiclasssvm/cs231n/classifiers`
- [MLP and dropout](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/05_NeuralNetworks/14_mlp): `Chapters/05_NeuralNetworks/14_mlp`

### Unsupervised learning

- [K-means clustering](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/kmeans_animation.py): `ebookML_src/src/kmeans_animation.py`
- [Network visualization](https://github.com/tiepvupsu/ebookmlcb/blob/master/ebookML_src/src/kmeans/display_network.py): `ebookML_src/src/kmeans/display_network.py`
- [Matrix factorization](https://github.com/tiepvupsu/ebookmlcb/blob/master/Chapters/06_RecommendationSystems/25_mf/python/mf.py): `Chapters/06_RecommendationSystems/25_mf/python/mf.py`
- [PCA visualization](https://github.com/tiepvupsu/ebookmlcb/blob/master/Chapters/07_DimemsionalityReduction/28_pca2/python/display_network.py): `Chapters/07_DimemsionalityReduction/28_pca2/python/display_network.py`

### Optimization

- [Convexity examples](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/08_ConvexOptimization/16_convexity): `Chapters/08_ConvexOptimization/16_convexity`
- [Convex optimization](https://github.com/tiepvupsu/ebookmlcb/tree/master/Chapters/08_ConvexOptimization/17_convexopt): `Chapters/08_ConvexOptimization/17_convexopt`
- [Convex duality](https://github.com/tiepvupsu/ebookmlcb/blob/master/Chapters/08_ConvexOptimization/18_duality/python/dualfunc.py): `Chapters/08_ConvexOptimization/18_duality/python/dualfunc.py`

### Other components

- **Ebook reader**

## Connections

- Ebook reader → Probability examples: explores examples
- Ebook reader → Linear regression: explores examples
- Ebook reader → K-means clustering: explores examples
- Ebook reader → Convexity examples: explores examples
