Learn how machine learning algorithms work from the ground up so you can effectively troubleshoot your models and improve their performance. Fully understanding how machine learning algorithms function is essential for any serious ML engineer. InMachine Learning Algorithms in Depth you'll explore practical implementations of dozens of ML algorithms including Monte Carlo Stock Price Simulation Image Denoising using Mean-Field Variational Inference EM algorithm for Hidden Markov Models Imbalanced Learning, Active Learning and Ensemble Learning Bayesian Optimization for Hyperparameter Tuning Dirichlet Process K-Means for Clustering Applications Stock Clusters based on Inverse Covariance Estimation Energy Minimization using Simulated Annealing Image Search based on ResNet Convolutional Neural Network Anomaly Detection in Time-Series using Variational Autoencoders Machine Learning Algorithms in Depth dives into the design and underlying principles of some of the most exciting machine learning (ML) algorithms in the world today. With a particular emphasis on probabilistic algorithms, you'll learn the fundamentals of Bayesian inference and deep learning. You'll also explore the core data structures and algorithmic paradigms for machine learning. Each algorithm is fully explored with both math and practical implementations so you can see how they work and how they're put into action. About the technology Learn how machine learning algorithms work from the ground up so you can effectively troubleshoot your models and improve their performance. This book guides you from the core mathematical foundations of the most important ML algorithms to their Python implementations, with a particular focus on probability-based methods. About the book Machine Learning Algorithms in Depth dissects and explains dozens of algorithms across a variety of applications, including finance, computer vision, and NLP. Each algorithm is mathematically derived, followed by its hands-on Python implementation along with insightful code annotations and informative graphics. You'll especially appreciate author Vadim Smolyakov's clear interpretations of Bayesian algorithms for Monte Carlo and Markov models. What's inside Monte Carlo stock price simulation EM algorithm for hidden Markov models Imbalanced learning, active learning, and ensemble learning Bayesian optimization for hyperparameter tuning Anomaly detection in time-series About the reader For machine learning practitioners familiar with linear algebra, probability, and basic calculus. About the author Vadim Smolyakov is a data scientist in the Enterprise & Security DI R&D team at Microsoft brief contents contents preface acknowledgments about this book Who should read this book How this book is organized About the code liveBook discussion forum about the author about the cover illustration Part 1—Introducing ML algorithms 1 Machine learning algorithms 1.1 Types of ML algorithms 1.2 Why learn algorithms from scratch? 1.3 Mathematical background 1.4 Bayesian inference and deep learning 1.4.1 Two main camps of Bayesian inference: MCMC and VI 1.4.2 Modern deep learning algorithms 1.5 Implementing algorithms 1.5.1 Data structures 1.5.2 Problem-solving paradigms 2 Markov chain Monte Carlo 2.1 Introduction to Markov chain Monte Carlo 2.1.1 Posterior distribution of coin flips 2.1.2 Markov chain for page rank 2.2 Estimating pi 2.3 Binomial tree model 2.4 Self-avoiding random walk 2.5 Gibbs sampling 2.6 Metropolis-Hastings sampling 2.7 Importance sampling 2.8 Exercises 3 Variational inference 3.1 KL variational inference 3.2 Mean-field approximation 3.3 Image denoising in an Ising model 3.4 MI maximization 3.5 Exercises 4 Software implementation 4.1 Data structures 4.1.1 Linear 4.1.2 Nonlinear 4.1.3 Probabilistic 4.2 Problem-solving paradigms 4.2.1 Complete search 4.2.2 Greedy 4.2.3 Divide and conquer 4.2.4 Dynamic programming 4.3 ML research: Sampling methods and variational inference 4.4 Exercises Part 2—Super vised learning 5 Classification algorithms 5.1 Introduction to classification 5.2 Perceptron 5.3 Support vector machine 5.4 Logistic regression 5.5 Naive Bayes 5.6 Decision tree (CART) 5.7 Exercises 6 Regression algorithms 6.1 Introduction to regression 6.2 Bayesian linear regression 6.3 Hierarchical Bayesian regression 6.4 KNN regression 6.5 Gaussian process regression 6.6 Exercises 7 Selected super vised learning algorithms 7.1 Markov models 7.1.1 Page rank algorithm 7.1.2 Hidden Markov models 7.2 Imbalanced learning 7.2.1 Undersampling strategies 7.2.2 Oversampling strategies 7.3 Active learning 7.3.1 Query strategies 7.4 Model selection: Hyperparameter tuning 7.4.1 Bayesian optimization 7.5 Ensemble methods 7.5.1 Bagging 7.5.2 Boosting 7.5.3 Stacking 7.6 ML research: Supervised learning algorithms 7.7 Exercises Part 3—Unsuper vised learning 8 Fundamental unsuper vised learning algorithms 8.1 Dirichlet process K-means 8.2 Gaussian mixture models 8.2.1 Expectation maximization (EM) algorithm 8.3 Dimensionality reduction 8.3.1 Principal component analysis 8.3.2 t-SNE manifold learning on images 8.4 Exercises 9 Selected unsuper vised learning algorithms 9.1 Latent Dirichlet allocation 9.1.1 Variational Bayes 9.2 Density estimators 9.2.1 Kernel density estimator 9.2.2 Tangent portfolio optimization 9.3 Structure learning 9.3.1 Chow-Liu algorithm 9.3.2 Inverse covariance estimation 9.4 Simulated annealing 9.5 Genetic algorithm 9.6 ML research: Unsupervised learning 9.7 Exercises Part 4—Deep learning 10 Fundamental deep learning algorithms 10.1 Multilayer perceptron 10.2 Convolutional neural nets 10.2.1 LeNet on MNIST 10.2.2 ResNet image search 10.3 Recurrent neural nets 10.3.1 LSTM sequence classification 10.3.2 Multi-input model 10.4 Neural network optimizers 10.5 Exercises 11 Advanced deep learning algorithms 11.1 Autoencoders 11.1.1 VAE anomaly detection in time series 11.2 Amortized variational inference 11.2.1 Mixture density networks 11.3 Attention and transformers 11.4 Graph neural networks 11.5 ML research: Deep learning 11.6 Exercises appendix A—Further reading and resources A.1 Competitive programming A.2 Recommended books A.3 Research conferences A.3.1 Machine learning A.3.2 Computer vision A.3.3 Natural language processing A.3.4 Theoretical computer science appendix B—Answers to exercises index Numerics A B C D E F G H I J K L M N O P Q R S T U V W Develop a mathematical intuition for how machine learning algorithms work so you can improve model performance and effectively troubleshoot complex ML problems. In Machine Learning Algorithm s in Depth youll explore practical implementations of dozens of ML algorithms Machine Learning Algorithms in Depth dives into the design and underlying principles of some of the most exciting machine learning (ML) algorithms in the world today. With a particular emphasis on probability-based algorithms, youll learn the fundamentals of Bayesian inference and deep learning. Youll also explore the core data structures and algorithmic paradigms for machine learning. Each algorithm is fully explored with both math and practical implementations so you can see how they work and how theyre put into action. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the technology Fully understanding how machine learning algorithms function is essential for any serious ML engineer. This vital knowledge lets you modify algorithms to your specific needs, understand the tradeoffs when picking an algorithm for a project, and better interpret and explain your results to your stakeholders. This unique guide will take you from relying on one-size-fits-all ML libraries to developing your own algorithms to solve your business needs. About the book Machine Learning Algorithms in Depth dives deep into the how and the why of machine learning algorithms. For each category of algorithm, youll go from math-first principles to a hands-on implementation in Python. Youll explore dozens of examples from across all the fields of machine learning, including finance, computer vision, NLP, and more. Each example is accompanied by worked-out derivations and details, as well as insightful code samples and graphics. By the time youre done reading, youll know how major algorithms work under the hoodand be a better machine learning practitioner for it. About the reader For intermediate machine learning practitioners familiar with linear algebra, probability, and basic calculus. About the author Vadim Smolyakov is a data scientist in the Enterprise & Security DI R&D team at Microsoft. He is a former PhD student in AI at MIT CSAIL with research interests in Bayesian inference and deep learning. Prior to joining Microsoft, Vadim developed machine learning solutions in the e-commerce space. Learn how machine learning algorithms work from the ground up so you can effectively troubleshoot your models and improve their performance. Fully understanding how machine learning algorithms function is essential for any serious ML engineer. In Machine Learning Algorithms in Depth you’ll explore practical implementations of dozens of ML algorithms including: • Monte Carlo Stock Price Simulation• Image Denoising using Mean-Field Variational Inference• EM algorithm for Hidden Markov Models• Imbalanced Learning, Active Learning and Ensemble Learning• Bayesian Optimization for Hyperparameter Tuning• Dirichlet Process K-Means for Clustering Applications• Stock Clusters based on Inverse Covariance Estimation• Energy Minimization using Simulated Annealing• Image Search based on ResNet Convolutional Neural Network• Anomaly Detection in Time-Series using Variational Autoencoders Machine Learning Algorithms in Depth dives into the design and underlying principles of some of the most exciting machine learning (ML) algorithms in the world today. With a particular emphasis on probabilistic algorithms, you’ll learn the fundamentals of Bayesian inference and deep learning. You’ll also explore the core data structures and algorithmic paradigms for machine learning. Each algorithm is fully explored with both math and practical implementations so you can see how they work and how they’re put into action.