This repository is a step-by-step study resource for learning classical Machine Learning with Python. It is designed to teach both what to do and why each step works.
The existing 31 numbered chapters and their original datasets are retained. The notebooks are intended to be read in order, executed from top to bottom, and revisited while solving the exercises.
- Read the learning goals and the introduction before running code.
- Look up every new technical term in the chapter glossary or the inline explanation.
- Run the code cells in order. Do not skip a cell just because its output looks familiar.
- Compare the output with the explanation immediately below it. Ask: what did the code receive, what did it calculate, and what does the result tell me?
- Change one value or parameter and run the cell again. Predict the result first.
- Complete the exercises without looking at the solution immediately.
- Explain the concept aloud in your own words. If you cannot explain why a method is used, revisit its intuition and assumptions.
| Stage | Chapters | What you learn |
|---|---|---|
| Python and data foundations | 01–04 | Python skills, NumPy arrays, Pandas tables, visualizations |
| Data preparation | 05–08 | Cleaning, exploratory analysis, feature engineering, safe data splitting |
| Supervised learning | 09–17 | Regression and classification algorithms |
| Unsupervised learning | 18–20 | Clustering and dimensionality reduction |
| Model reliability | 21–25 | Regularization, validation, tuning, metrics, imbalanced data |
| Ensembles and practical ML | 26–31 | Combining models, boosting, XGBoost, model persistence, complete workflows |
- Python for ML
- NumPy
- Pandas
- Matplotlib and Seaborn
- Data Cleaning
- Exploratory Data Analysis
- Feature Engineering
- Train-Test Split
- Linear Regression
- Multiple Linear Regression
- Polynomial Regression
- Logistic Regression
- Decision Tree
- Random Forest
- Support Vector Machine
- K-Nearest Neighbors
- Naive Bayes
- K-Means Clustering
- Hierarchical Clustering
- Principal Component Analysis
- Regularization
- Cross Validation
- Hyperparameter Tuning
- Model Evaluation Metrics
- Imbalanced Data Handling
- Ensemble Learning
- Bagging and Boosting
- Gradient Boosting
- XGBoost
- Model Saving and Loading
- End-to-End ML Projects
- Feature: an input measurement the model uses, such as house area or a patient's age.
- Target / label: the value the model is asked to predict.
- Training: the process of adjusting a model using examples.
- Inference: using a trained model to make predictions on new data.
- Loss: a numerical measure of how wrong a model's predictions are during learning.
- Metric: a measure used to evaluate model performance, such as MAE or precision.
- Generalization: how well a model works on examples it did not train on.
- Overfitting: learning training examples too specifically, including noise, so performance on new data suffers.
- Data leakage: allowing information into training that would not legitimately be available when predicting in the real world.
- Hyperparameter: a configuration chosen before or around training, such as tree depth or learning rate.
Use Python 3.10 or 3.11 for a predictable learning environment unless a particular library's current installation guide recommends otherwise.
python -m venv .venv
# Windows PowerShell:
.venv\Scripts\Activate.ps1
# macOS / Linux:
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
jupyter notebookOpen a notebook and run its cells from top to bottom. Many notebook datasets use paths relative to their chapter folder, so start Jupyter from the repository root and check the notebook's dataset path if your environment reports a file-not-found error.
- Keep the existing dataset and notebook outputs as the reference for the examples.
- A printed metric is not automatically good or bad: interpret it in the context of the target, dataset and baseline.
- Never fit preprocessing steps using the test set. Fit them on training data and apply the learned transformation to validation/test data.
- For classification, do not rely on accuracy alone when classes are imbalanced.
- Set random seeds when supported so that experiments are easier to reproduce.
- Google Machine Learning Crash Course
- scikit-learn User Guide
- NumPy documentation
- Pandas documentation
- GeeksforGeeks Machine Learning
- StatQuest
These resources supplement the repository; the notebooks should remain understandable without having to follow an external tutorial for every step.
Open study-tracker.html in a browser to record chapter progress. Progress is stored by the tracker in the browser you use.