Study machine learning algorithms alongside the textbook by running working code examples.
Prepare for machine learning job interviews by reviewing algorithm implementations and mathematical concepts.
Verify your own algorithm implementations by comparing them against reference code.
This repository contains Python code implementations of the algorithms described in "Statistical Learning Methods" (统计学习方法), a well-known Chinese machine learning textbook by Li Hang. The book is considered an essential reference for machine learning, covering fundamental supervised and unsupervised learning algorithms with mathematical rigor, and is frequently cited in Chinese university courses and tech industry interview preparation. The code is organized chapter by chapter, with Jupyter Notebooks implementing each algorithm from scratch. Topics covered include the perceptron, k-nearest neighbors, naive Bayes, decision trees, logistic regression, support vector machines (SVM), boosting methods, the EM algorithm, hidden Markov models, conditional random fields, clustering, singular value decomposition, principal component analysis, latent semantic analysis, Markov Chain Monte Carlo, and the PageRank algorithm. The second edition of the book is the one matched by this code. Someone would use this repository as a companion to studying the textbook, running the notebook implementations to see how each algorithm works in practice, verifying their own understanding, or preparing for machine learning job interviews in the Chinese tech industry.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.