gitmyhub

lihang_book_algorithm

Python ★ 5.8k updated 7y ago

致力于将李航博士《统计学习方法》一书中所有算法实现一遍

Python implementations of every machine learning algorithm in Li Hang's Statistical Learning Methods textbook, chapter by chapter, tested on the MNIST dataset, a hands-on companion for students working through the book.

PythonC++setup: moderatecomplexity 3/5

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.

Where it fits