This guide is for learners who want to understand machine learning from the ground up before diving into large frameworks, production systems, or advanced notebooks.
For each algorithm:
- Write down the learning objective in plain language.
- Identify the model parameters and what they mean.
- Trace the
fit()method line by line. - Trace the
predict()method line by line. - Run the script and inspect the saved plot in the local
results/folder. - Change one hyperparameter and explain what changed.
Do not try to cover the entire repository in one pass. Start with the simple supervised implementations first.
- Goal: Understand parameters, prediction as
Xw + b, and fitting with a closed-form solution. - Files:
learn/Supervised/LinearRegression/linearregression.pylearn/Supervised/LinearRegression/README.md
- Run:
python learn/Supervised/LinearRegression/linearregression.py
- Goal: Move from regression to classification using the sigmoid function and gradient descent.
- Files:
learn/Supervised/LogisticRegression/logisticregression.pylearn/Supervised/LogisticRegression/README.md
- Run:
python learn/Supervised/LogisticRegression/logisticregression.py
- Goal: Learn probabilistic classification, class priors, Gaussian likelihoods, and why log-probabilities matter.
- Files:
learn/Supervised/NaiveBayes/naive_bayes.pylearn/Supervised/NaiveBayes/README.md
- Run:
python learn/Supervised/NaiveBayes/naive_bayes.py
- Goal: Understand lazy learning, distance-based reasoning, and why no real parameter fitting happens.
- Files:
learn/Supervised/knn/knn.pylearn/Supervised/knn/README.md
- Run:
python learn/Supervised/knn/knn.py
- Goal: Learn recursive partitioning, entropy, information gain, and stopping conditions.
- Files:
learn/Supervised/DecisionTree/decisiontree.pylearn/Supervised/DecisionTree/README.md
- Run:
python learn/Supervised/DecisionTree/decisiontree.py
- Goal: Understand margins, hinge loss, and the tradeoff between fit and regularization.
- Files:
learn/Supervised/svm/svm.pylearn/Supervised/svm/README.md
- Run:
python learn/Supervised/svm/svm.py
- Goal: Learn how stronger models are built from simpler trees.
- Files:
learn/Supervised/ensemble/random_forest.pylearn/Supervised/ensemble/gbm.pylearn/Supervised/ensemble/test_gbm.py
- Run:
python learn/Supervised/ensemble/test_gbm.py
- Goal: Learn centroid-based clustering, inertia, and the effect of initialization.
- Files:
learn/Unsupervised/kmeans/kmeans.pylearn/Unsupervised/kmeans/README.md
- Run:
python learn/Unsupervised/kmeans/kmeans.py
- Goal: Learn linear dimensionality reduction through covariance, eigenvectors, and reconstruction.
- Files:
learn/Unsupervised/pca/pca.pylearn/Unsupervised/pca/README.md
- Run:
python learn/Unsupervised/pca/pca.py
- Goal: Learn the Bellman update, bootstrapping, and the difference between off-policy and on-policy control.
- Files:
learn/Reinforcement_Learning/envs/grid_env.pylearn/Reinforcement_Learning/TD/qlearning.pylearn/Reinforcement_Learning/TD/sarsa.pylearn/Reinforcement_Learning/TD/README.md
- Run:
python learn/Reinforcement_Learning/TD/qlearning.pypython learn/Reinforcement_Learning/TD/sarsa.py
- Goal: Move from value-based RL to policy gradients and actor-critic updates.
- Files:
learn/Reinforcement_Learning/policygrad/reinforce.pylearn/Reinforcement_Learning/policygrad/actorcritic/a2c.pylearn/Reinforcement_Learning/policygrad/README.md
- Run:
python learn/Reinforcement_Learning/policygrad/reinforce.pypython learn/Reinforcement_Learning/policygrad/actorcritic/a2c.py
- Goal: See how the ideas above show up in more realistic workflows without jumping straight into cloud notebooks.
- Files:
Use_Cases/README.mdUse_Cases/learning_with_less/README.mdUse_Cases/SparkImageProcessing/README.mdUse_Cases/RealTimeDataProcessing/README.md
- Run:
python Use_Cases/learning_with_less/run.py --dataset_source digits --mode supervised --epochs 2python Use_Cases/SparkImageProcessing/convert_to_gray_opencv.py
- Large notebooks in
learn/NLP/and cloud-specific notebook folders underUse_Cases/ - Infrastructure-heavy workflows you cannot run locally yet
- Kafka, Spark, SageMaker, and external-API demos until you finish the beginner path
- Agent demos and DSPy scripts that require external keys
Those are useful later, but they are not the right starting point if your goal is intuition. When you are ready for applied examples, start with Use_Cases/learning_with_less/ and Use_Cases/SparkImageProcessing/ before the multi-service workflows.
- What quantity is being optimized?
- Where is the model storing what it learned?
- Which assumptions does the model make about the data?
- What happens if the assumptions are violated?
- Which part of the code is math, and which part is engineering scaffolding?
- Add train/test splits to the foundational scripts.
- Print a loss curve for logistic regression.
- Add Gini impurity as an alternative split criterion for the tree.
- Compare Naive Bayes and logistic regression on the same dataset.
- Add feature scaling before running KNN or SVM and compare the boundary.
This repository mixes polished learning examples with exploratory work and production-oriented material. The beginner path above is the safest place to start if your goal is understanding before scale, and the curated Use_Cases/README.md is the next step after that.