Run working Python code alongside each chapter of Li Hang's Statistical Learning Methods textbook to see the theory in action.
Test classic ML algorithms like SVM, Naive Bayes, and AdaBoost on the MNIST handwritten digit dataset.
Read the companion CSDN blog posts to understand both the theory and the implementation together in Chinese.
AdaBoost chapter requires compiling a C++ component alongside the Python code before running.
This repository contains Python implementations of every algorithm covered in "Statistical Learning Methods," a well-known Chinese textbook on machine learning written by Li Hang. The project works through the book chapter by chapter, translating each method from the theoretical text into runnable code. The algorithms covered span a broad range of classic machine learning techniques. These include the perceptron (a basic binary classifier), K-nearest neighbors (a method that classifies new points by looking at nearby training examples), Naive Bayes (a probability-based classifier), decision trees, logistic regression, maximum entropy models, support vector machines, AdaBoost (a method that combines many weak classifiers into a stronger one), and hidden Markov models (used for sequence data like speech or text). There is also an extra implementation of a softmax classifier that goes beyond the book itself. Most implementations are tested on the MNIST dataset, which is a standard collection of handwritten digit images commonly used to verify that a machine learning algorithm is working correctly. One algorithm (AdaBoost) also includes a version that mixes Python with C++ for performance reasons. Each chapter entry in the README links to a companion blog post on CSDN (a Chinese developer platform) where the author walks through the implementation in more detail. The posts are written in Chinese and explain both the theory and the code. The repository is primarily a learning resource for people working through Li Hang's textbook who want to see the algorithms in working code alongside the mathematical explanations in the book.
← wendesi on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.