finds.dev← search

// the find

fengdu78/lihang-code

★ 19,590 · Jupyter Notebook · updated Aug 2023

《统计学习方法》的代码实现

Notebook implementations of every algorithm from Li Hang's 'Statistical Learning Methods' (second edition), a widely-used Chinese ML textbook covering classical supervised and unsupervised methods from perceptron to LDA. This is a companion code repo, not a library — one notebook per chapter, meant to be read alongside the book. Primarily useful for students working through the text or preparing for Chinese tech company interviews where this book is a standard reference.

Every chapter has a corresponding notebook, so coverage is complete and the mapping to the book is exact. The implementations are from-scratch NumPy/Python, which actually helps you understand what's happening inside SVM or HMM rather than just calling sklearn. The repo has accumulated 19k stars which means issues and corrections have been crowd-sourced over years. CRF, HMM, and MCMC chapters are the ones where a clean reference implementation is genuinely hard to find elsewhere.

Last commit was August 2023 and the repo shows no signs of active maintenance — dependency versions are unpinned so notebooks may or may not run on current Python/NumPy. The implementations prioritize pedagogical clarity over correctness edge cases; the SVM SMO implementation in particular is a simplified version that won't match the book's proofs exactly. No tests anywhere, so you can't verify whether a notebook's output is actually correct. The README is entirely in Chinese with no English summary, which limits the audience despite the algorithms being universal.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →