Lihang-code is a code implementation repository that provides Python implementations of algorithms and methods from a foundational machine learning textbook.
The repository addresses the need for practical, working code examples to accompany theoretical machine learning instruction. It implements the algorithms and methods covered in the textbook, spanning both supervised and unsupervised learning approaches. The implementations are organized chapter by chapter, with each chapter corresponding to a specific learning method or algorithm covered in the source material.
This repository is suited for machine learning students and practitioners seeking to understand how classical statistical learning methods work in practice. It serves as a reference implementation for algorithms including perceptrons, k-nearest neighbors, naive Bayes, decision trees, logistic regression, support vector machines, boosting methods, expectation-maximization, hidden Markov models, and conditional random fields, as well as unsupervised methods like clustering, principal component analysis, and latent Dirichlet allocation. The implementations are presented as Jupyter Notebooks, making them accessible for interactive learning and experimentation.
The project maintains a straightforward structure with code organized to follow the textbook's progression through supervised learning methods in its first section and unsupervised learning methods in its second section. Development activity shows ongoing maintenance with code organization and refinement, drawing on contributions from multiple sources and community members who have shared their own implementations and notes.