How eriklindernoren/ml-from-scratch works
ML From Scratch is a Python library of transparent implementations of supervised, unsupervised, deep-learning, and reinforcement-learning algorithms. The user-facing workflow is to select an algorithm, provide data (or an environment for reinforcement learning), train or run it, and obtain predictions, clusters, rules, or generated data. The graph preserves documented algorithm families and the sampled neural-network and utility layers. Several family implementations were not sampled, so their internal connections are not inferred.
Main entry points: data_manipulation.py Data manipulation · loss_functions.py Loss functions · supervised_learning Supervised algorithms · unsupervised_learning Unsupervised algorithms
Components 26
Supervised Learning
- Supervised algorithms
mlfromscratch/supervised_learning - Decision trees
mlfromscratch/supervised_learning/decision_tree.py - Boosting models
mlfromscratch/supervised_learning - Other supervised models
mlfromscratch/supervised_learning
Unsupervised Learning
- Unsupervised algorithms
mlfromscratch/unsupervised_learning - Association mining
mlfromscratch/unsupervised_learning/apriori.py - FP-growth
mlfromscratch/unsupervised_learning/fp_growth.py - Density clustering
mlfromscratch/unsupervised_learning/dbscan.py - Gaussian mixtures
mlfromscratch/unsupervised_learning/gaussian_mixture_model.py - Genetic algorithm
mlfromscratch/unsupervised_learning/genetic_algorithm.py - Medoid clustering
mlfromscratch/unsupervised_learning/partitioning_around_medoids.py - Other unsupervised models
mlfromscratch/unsupervised_learning - Other deep models
mlfromscratch/unsupervised_learning
Deep Learning
- Neural network
mlfromscratch/deep_learning/neural_network.py - Network layers
mlfromscratch/deep_learning/layers.py - Activations
mlfromscratch/deep_learning/activation_functions.py - Loss functions
mlfromscratch/deep_learning/loss_functions.py - Optimizers
mlfromscratch/deep_learning/optimizers.py
Reinforcement Learning
- Deep Q-network
mlfromscratch/reinforcement_learning/deep_q_network.py
Shared Utilities
- Data manipulation
mlfromscratch/utils/data_manipulation.py - Data operations
mlfromscratch/utils/data_operation.py - Plotting helpers
mlfromscratch/utils/misc.py
Other components
- Library user
- Training data
- Model results
- Gym environment
Connections 24
- Library user → Supervised algorithms: selects model
README.md - Library user → Unsupervised algorithms: selects model
README.md - Library user → Neural network: trains network
README.md - Library user → Deep Q-network: trains agent
README.md - Training data → Supervised algorithms: provides examples
- Training data → Unsupervised algorithms: provides examples
- Supervised algorithms → Model results: produces predictions
- Unsupervised algorithms → Model results: produces patterns
- Neural network → Model results: produces predictions
- Decision trees → Data manipulation: calls helpers
mlfromscratch/supervised_learning/decision_tree.py - Boosting models → Decision trees: uses trees
mlfromscratch/supervised_learning/gradient_boosting.py - Boosting models → Loss functions: uses loss
mlfromscratch/supervised_learning/gradient_boosting.py - Association mining → Model results: returns rules
mlfromscratch/unsupervised_learning/apriori.py - Density clustering → Data manipulation: imports utilities
mlfromscratch/unsupervised_learning/dbscan.py - Gaussian mixtures → Data manipulation: imports utilities
mlfromscratch/unsupervised_learning/gaussian_mixture_model.py - Medoid clustering → Data manipulation: imports utilities
mlfromscratch/unsupervised_learning/partitioning_around_medoids.py - Network layers → Activations: imports functions
mlfromscratch/deep_learning/layers.py - Loss functions → Activations: imports function
mlfromscratch/deep_learning/loss_functions.py - Loss functions → Data manipulation: imports accuracy
mlfromscratch/deep_learning/loss_functions.py - Optimizers → Data manipulation: imports helpers
mlfromscratch/deep_learning/optimizers.py - Deep Q-network → Gym environment: steps environment
mlfromscratch/reinforcement_learning/deep_q_network.py - Data manipulation → Data operations: reexports operations
mlfromscratch/utils/__init__.py - Plotting helpers → Data operations: computes covariance
mlfromscratch/utils/misc.py - Plotting helpers → Data manipulation: standardizes data
mlfromscratch/utils/misc.py