Machine Learning with PyTorch and Scikit-Learn: Develop machine learning and deep learning models with Python
Original price was: $54,99.$18,99Current price is: $18,99.
- 100% Satisfaction Guaranteed!
- Immediate Digital Delivery
- Download Risk-Free
✔️ Digital file type(s): 𝟏𝐏𝐃𝐅
This book of the bestselling and widely acclaimed Python Machine Learning series is a comprehensive guide to machine and deep learning using PyTorch’s simple to code framework.
Purchase of the print or Kindle book includes a free eBook in PDF format.
Key Features
- Learn applied machine learning with a solid foundation in theory
- Clear, intuitive explanations take you deep into the theory and practice of Python machine learning
- Fully updated and expanded to cover PyTorch, transformers, XGBoost, graph neural networks, and best practices
Book Description
Machine Learning with PyTorch and Scikit-Learn is a comprehensive guide to machine learning and deep learning with PyTorch. It acts as both a step-by-step tutorial and a reference you’ll keep coming back to as you build your machine learning systems.
Packed with clear explanations, visualizations, and examples, the book covers all the essential machine learning techniques in depth. While some books teach you only to follow instructions, with this machine learning book, we teach the principles allowing you to build models and applications for yourself.
Why PyTorch?
PyTorch is the Pythonic way to learn machine learning, making it easier to learn and simpler to code with. This book explains the essential parts of PyTorch and how to create models using popular libraries, such as PyTorch Lightning and PyTorch Geometric.
You will also learn about generative adversarial networks (GANs) for generating new data and training intelligent agents with reinforcement learning. Finally, this new edition is expanded to cover the latest trends in deep learning, including graph neural networks and large-scale transformers used for natural language processing (NLP).
This PyTorch book is your companion to machine learning with Python, whether you’re a Python developer new to machine learning or want to deepen your knowledge of the latest developments.
What you will learn
- Explore frameworks, models, and techniques for machines to ‘learn’ from data
- Use scikit-learn for machine learning and PyTorch for deep learning
- Train machine learning classifiers on images, text, and more
- Build and train neural networks, transformers, and boosting algorithms
- Discover best practices for evaluating and tuning models
- Predict continuous target outcomes using regression analysis
- Dig deeper into textual and social media data using sentiment analysis
Who this book is for
If you have a good grasp of Python basics and want to start learning about machine learning and deep learning, then this is the book for you. This is an essential resource written for developers and data scientists who want to create practical machine learning and deep learning applications using scikit-learn and PyTorch.
Before you get started with this book, you’ll need a good understanding of calculus, as well as linear algebra.
Table of Contents
- Giving Computers the Ability to Learn from Data
- Training Simple Machine Learning Algorithms for Classification
- A Tour of Machine Learning Classifiers Using Scikit-Learn
- Building Good Training Datasets – Data Preprocessing
- Compressing Data via Dimensionality Reduction
- Learning Best Practices for Model Evaluation and Hyperparameter Tuning
- Combining Different Models for Ensemble Learning
- Applying Machine Learning to Sentiment Analysis
- Predicting Continuous Target Variables with Regression Analysis
- Working with Unlabeled Data – Clustering Analysis
- Implementing a Multilayer Artificial Neural Network from Scratch
(N.B. Please use the Look Inside option to see further chapters)
61 reviews for Machine Learning with PyTorch and Scikit-Learn: Develop machine learning and deep learning models with Python
You must be logged in to post a review.
Matthew Emerick –
I found a very interesting book and picked it up as quickly as I could. It’s a complete guide to machine learning that focuses on PyTorch rather than TensorFlow. I greatly appreciate that this book exists as it gives developers a choice of which library to learn about.
This is a great book for anyone wanting to get into machine learning as well as someone changing careers. I highly encourage both to check out this book.
While the book isn’t split up into sections, the divisions are clear. The first ten chapters discuss the fundamentals of machine learning, everything from basic definitions to cleaning data to a few projects. I always encourage people to do the projects and share them as a portfolio; this book makes it easier to do so.
Chapter 11 looks at a general neural network before moving on to using PyTorch in chapters 12 and 13. The remaining chapters use PyTorch to build projects that give the reader a wide variety of experience.
For the first time in any technical book that I’ve yet seen, the final section of the final chapter includes a book summary to help reinforce what the reader has learned. I appreciate this and hope more authors include this in the future.
This really is a good book. I will be recommending this to anyone who wants a hands-on approach to learning machine learning.
Dr. Howard B. Bandy –
Dr. Sebastian Raschka, his co-authors, and the Packt staff have set a new high standard for quality with publication of their new book, ‘Machine Learning with PyTorch and Scikit-Learn.’
The text is slightly over 700 pages. Chapters 1 through 10 cover the basics of machine learning — building good data sets, determining hyperparameters, supervised learning, unsupervised learning, training, validation, testing, metrics, and ensembling.
In Chapter 11 we build a neural network from scratch. The mathematics is presented, as are clear descriptions and Python code for the forward and backward passes. The program is used to model the MNIST dataset and will then be referred to as the book progresses and more sophisticated models are developed.
Chapter 12 introduces PyTorch, and discusses the built-in support for multiprocessing including multiple CPU threads and multiple CUDA GPU units. A quick review of PyTorch’s tensor data structures, and its library of data manipulation routines follows. Fully disclosed (in crystal-clear Python code) examples illustrate classifying animals (cats and dogs), facial features (smiling or not), MNIST digits, linear regression, and Iris identification. A discussion of activation functions and predicting class probabilities in a multiclass model round out the chapter and the first half of the book.
Chapters 13 through 19 go into depth. Chapter-long topics include image classification using deep convolutional neural networks, modeling sequential data using recurrent neural networks, natural language processing using transformers, generative adversarial networks, graph neural networks, and reinforcement learning.
The typography is outstanding. Every page, chart, diagram, formula, and code segment is clear and crisp. Links to published and on-line references are provided. Throughout, detailed Python PyTorch source code and resulting output are provided.
This is the best computer book I have ever read. If you are at all interested in PyTorch, you will not be disappointed.
Blaine Bateman –
This book is full of good surprises. For example, a section on kernel methods in SVMs has the best explanation of “the kernel trick” I have read. Every topic is introduced from fundamentals up to working models, and if you take the time to do all the coding, you will learn the inner workings of machine learning models. Very appropriately, the first part of the book uses Scikit-Learn and doesn’t do much with neural networks. This makes sense as a huge number of problems don’t need neural networks as a solution. Then, later in the book, the kinds of problems that really need neural networks are introduced. Again with a full fundamental understanding first, neural networks, convolutions, attention mechanisms and more are detailed. Pytorch is used to build working models for image classification and a range of other challenges.
I would highly recommend this book for beginners to experienced practitioners as there is so much good, current material in a very approachable form, I think everyone will find value here.
hawkinflight –
I think the book is great in terms of covering the essential topics in the field of ML and Deep Learning. It covers three categories of ML: 1)supervised learning 2)unsupervised learning 3)reinforcement learning. It includes the hot topic of graph neural networks and the important advance of transformers in NLP.
The code accompanying the essentials lets you get hands-on practice with both scikit-learn and PyTorch. The book focuses on the basics and provides in numerous places links to additional information beyond the scope of the book. This is nice in that it keeps a tight focus, but also allows the reader to branch out.
At the very end of the book, the authors provide links to a subreddit community for ML, a daily updated list of the latest ML manuscripts uploaded to the arXiv preprint server, and a paper recommendation engine built on top of arXiv.
I personally look forward to further study of the chapter on Graph Neural Networks which can be used for text classification, recommender systems, traffic forecasting, and drug discovery. Links to papers on the arXiv are given. The PyTorch Geometric library is introduced as a way to manage graph data for deep learning as well as implementing different kinds of graph layers to use in deep learning models. A tutorial is given which shows how to implement GNNs for molecular property prediction. The QM9 dataset of 133k+ small organic molecules and the TorchDrug library for working with molecules are both mentioned. Pointers to advanced GNN literature are given, including papers on “attention methods” that have been developed for GNNs and for graph transformers. Attention methods provide additional contexts.
This book is well-written. It covers methods known for awhile such as linear regression and k-means clustering, as well as cutting edge approaches, all based on scikit-learn and PyTorch. I think it’s a very useful resource and can be very helpful in getting started on solving real-world problems.
Richard Hackathorn –
This textbook is for the serious life-long learners of machine learning. There are at least two ways to ‘consume’ this book.
For the expert in ML, this is a textbook to study as a clear comprehensive ML overview and then to dive into sections of interest or ignorance. The concepts are grounded in code examples and are well cited (with links) to sources. Further, this textbook is appropriate if you are TensorFlow-centric and want to broaden into cutting-edge ML models/tools coded in PyTorch.
For a new learner to ML, this is a textbook to DO (not just READ) with hands-on and brain-engaged. If you realize that ML is a key life-long skill for your career, consider this textbook as part of a daily learning habit (10-30 min).
From personal experience, my advice to the new learner is as follows… First, clone the GitHub repository, setup your Python environment, and study the textbook, while working through the notebooks. Go on tangents and break the code. Do this methodically as part of your daily learning habit, but do not hesitate to jump ahead several chapters to prepare for tomorrow’s meeting. There is enough excellent material here for a full year of ML adventures.
I did a similar strategy with Raschka’s first textbook. About four years ago, I had finished Andrew Ng’s Deep Learning Specialization as a student in his first cohort. I knew the concepts well but could not do the actual application coding. I was surprised how my Python coding improved by following Raschka’s clean and elegant style. And Raschka’s code examples were meaty enough to be springboards into working applications.
Several textbook editions later, what is different about this new edition?
First, it moves you through scikit-Learn (a firm foundation) to PyTorch, instead of TensorFlow. PyTorch is a better stepping-stone, both conceptually and practically. With PyTorch, you will go further with less energy, while being able to convert your efforts into TensorFlow as needed. In addition, most of the cutting-edge ML/AI/DL research is in PyTorch. It is nice to read a recent arXiv paper, clone their repository, click on the Colab tutorial, and replicate their experiments, along with picking up a ton of new coding tricks & tips. I am excited to work through these PyTorch sections to hone my skills.
Second, there is a clear recognition of model tracking and tuning practices. This is often a gap in other ML textbooks and courses. Once you progress beyond the simple demo examples in a lecture, you realize that the real work is experiments, more experiments, and still more experiments, so that you must understand what the model architecture and hyperparameters are doing to your dataset. There is good coverage of scikit-Learn pipeline, grid search, model performance, and the like.
Third, ML/AI/DL practice is rapidly evolving. Every week new ML packages/services become available that could save much grief on your current project. What is refreshing about Raschka’s textbook series is that he constantly adding cutting-edge topics because he likes to stay current and to help us stay current. Hence, this edition contains recent ML treats as: transformers, self-supervised learning, autoencoders-to-GAN, graph neural networks, DBSCAN, t-SNE (with brief mention of UMAP), and PyTorch-Lightning.
Gabe Rigall –
BLUF: A thorough primer for machine learning enthusiasts with plenty of theory to underscore its many practical examples. A definite must-have for anyone looking to add PyTorch to their machine learning tool belt.
PROS:
– Extremely thorough (if not comprehensive). I really appreciate that this book doesn’t just thrust one into building models with PyTorch. It starts at the “beginning” and provides examples, theory, additional resources, and citations along the way.
– Theory. Those whose calculus and linear algebra courses ended many years ago will appreciate (if not remember exactly) the mathematical theory and notation that accompanies almost every paragraph. This book gives one the opportunity to “dig deeper” or stay in the shallows until the notation stops.
– Python. Rather than simply utilizing Scikit-Learn to illustrate concepts and introduce models, this book contains many sections where models (such as a Perceptron) are coded from the ground up so the reader can fully understand the underlying mechanics. Python enthusiasts will nerd out. Parents of small children might want to skip a few pages.
– Graphs, charts, and graphics. There are plenty of places where a drier text might have foregone the use of graphs. This text does not. It does however refrain from overusing them.
– PyTorch. This should be obvious from the title, but this text prioritizes PyTorch instead of TensorFlow. This is especially helpful for those looking for an alternative to Keras and TensorFlow as the PyTorch API is very user-friendly.
CONS:
– Almost too much code. This isn’t a true “con” but anyone wanting to emulate or follow along with the examples would do well to get the digital edition so they can copy and paste.
– Length and complexity. Anyone hoping for a “quick read” or a “quick start guide” will be disappointed. This book hovers somewhere between an undergraduate primer and a graduate-level text for length and readability. This is not to say that it’s difficult to read, merely that there are other “quick start” / “practical” texts out there that cater more to a lay audience.
Greg Hecht –
(Disclaimer: I was given a review copy by the publisher)
The book is an excellent practical guide to working with ML datasets, understanding ML algorithms, and ultimately building applied models. It’s well paced — quickly progressing through the core concepts and terminology, training classifiers with test data, providing a practical guide for preparing your own data for use in ML, covering PyTorch, and then finally complex neural nets for images, NLP and beyond.
As the title states, this is the PyTorch-specific edition of one of my favorites, “Python Machine Learning” (also by Raschka), which focuses on TensorFlow. Do you need both books? Probably not unless you’d like to do a side-by-side comparison of PyTorch vs TensorFlow. Most of the content is shared between the two, particularly in the foundational early chapters. So, both provide a solid intro to real-world uses of developing ML algorithms.
The book, and the math, ramps quickly so some of the concepts can get complex quickly. But what makes this book great is that the authors always explain each concept with a combination of equations, visuals, and ultimately, real-world code. This is helpful for building an understanding of how the algorithms work and how to use them.
Apart from the intro to PyTorch in chapters 12 and 13, the best chapters, in my opinion, cover common, real-world problems of dealing with messy data:
* Chapter 4: building a good dataset – too often we learn using perfectly polished data sets. And, then on the job we have to deal with problems in messy, poorly structured data. This chapter covers cleaning up data for use in ML.
* Chapter 5: dimensionality reduction – covers feature extraction and compression, figuring out what features in our data matter.
* Chapter 6: model evaluation and tuning – identifying problems with and tuning learning models.
* Chapter 10: working with unlabeled data – how to cluster data when it isn’t pre-labeled for you.
crystalattice –
At 700+ pages, this book is more like a text book than a normal office reference. But that’s not a bad thing.
The authors take time to explain things that might not be common knowledge, such as notational conventions, mathematical concepts, and terminology. Even “simple” concepts like dot products and matrix transposition are explained. For some people, these are useful refreshers; for others, it might be the first time they’ve seen them. Obviously these sidebars aren’t comprehensive, but should be sufficient to understand their context in the book.
There are lots of equations and plots to show what the calculations actually produce. When it comes to machine learning, it’s important to understand both, since you’re going to have to feed the calculations into the computer via source code, but you need to know what to expect in the outcome.
In addition to source code examples, screenshots are provided to show interactive sessions of input/output. That allows the reader to see what the computer output will actually look like as well as provide a chance to see how different input variables affect the output.
Beyond the basics of ML, ML-based frameworks like SciKit and PyTorch are extensively referenced. These provide additional features while helping streamline the ML programming process.
Overall, this is a very comprehensive book. If you are getting into machine learning, it is too much to skim through but definitely worth the time to sit down and understand. If you are already in the ML field, it would be a good reference to have on your bookshelf.
Justin H. –
As a DS it’s always hard to find a good book to reference back to train and support your coworkers. This book does a good mix of mixing in basic and intermediate concepts and builds it in blocks. Not only does it have the architecture of models but it also has the python code that accompanies it which a lot of other books don’t do. For example it goes through the concepts of BERT and then building your own sentiment classifier. Again it builds from the basics which is sklearn. This is really important as a lot of aspirational data scientists tend to want to jump into PyTorch and neural architectures without understanding the basics first. Generally the simplest most reproducible model is always a better solution. An example on the basics which I didn’t know myself was the book teaches you a trick to separate the hyperplane for SVM and it shows great visualization for it as well. Definitely recommend it as a buy as a great starter book that not only includes the basics but intermediate level ideas as well.
KingBubIII –
I was given an early copy of this product and found it extremely interesting and detailed. Thank you guys!
The amount of depth this goes into is really helpful. I am an intermediate programmer and I think all I will need is this to understand machine learning. It takes you through the basics of how computer cans learn. Then transitions to the type of data you’ll use. Then you can get into actually implementing your very own program. You do this by getting to know your tools your working with like PyTorch and Scikit-learn.
All and all there is 19 chapters and over 700 pages of well thought out and structured examples and concepts. Can’t wait to really get into the nitty gritty with this!
Ross Cheung –
Note: I received an advanced copy from the publisher, but I have read Sebastian Raschka’s previous machine learning book and am familiar with his work. Off the top of my head the most comparable previous work is Aurélien Géron’s “Hands-On Machine Learning with Scikit-Learn and Tensorflow”. Both books have a similar format; the first half is a general introduction to machine learning principles and “non-Deep Learning” machine learning models, while the second half is dedicated to Deep Learning with a modern framework, though Raschka’s book packs out at a whopping 800 pages.
For the past few years Geron’s book is a frequently recommended “first book” for people who are technically proficient but new to machine learning, for its all encompassing nature. How do these two books compare? First, Raschka’s professor background shows; while Geron’s book is a more friendly introduction, Raschka’s book makes sure to explain all of the fundamentals. As an academic myself I really like this, and urge anyone new to ML working through this book to really understand the fundamentals when coding; it will help with ML engineering and research, and with helping to stay afloat in a fast moving field.
Second, ML is a fast changing field, and a lot has happened since Geron’s book was published in 2017. Although the 2019 2nd edition is a timely update, we’ve been seeing PyTorch eclipse Tensorflow in popularity especially in ML research. We’ve also seen the PyTorch ecosystem grow and become more involved, and Raschka’s book makes sure to talk about the various PyTorch features.
In addition, the field of Deep Learning has changed a lot. In the past four years image classification has ceased to be a hard topic for DL, transformers have massively changed the landscape, and fields like GANs, Graph neural networks, and Reinforcement learning has ceased to be esoteric academic topics and are all seeing applications in industry, and a strength of Raschka’s book is addressing all of these.
Finally, some advice for people who are reading through this book and getting up to speed with Deep Learning: read and work through the code examples. Many books about Machine Learning skimp over the programming aspects and/or guide the reader to call libraries, and as a result users are frustrated when it comes time to implement and use models. Don’t neglect the coding aspects of getting ML models up and running. A strength of Raschka’s book are the code examples, which walk through how to implement the models. His codes for PyTorch resemble what is used in production, and are generally high quality.
Finally, if you’ve made it through this book, congrats! Go and use what you’ve learned for some fun projects, and also pair it with a good book or resource on deploying and monitoring your ML models.
zasdfgbnm –
If you are a beginner at machine learning, I highly recommend this book. This book is very well written, and I believe that after reading this book, you will get a fairly good and comprehensive understanding of the field. This book is suitable for both self-learning and being used as a textbook.
If you are a person who is already working in the machine learning community, but you think your knowledge is limited to a specific field and want to know more about the entire machine learning/deep learning field and get a better big picture of the field, I also recommend this book.
But if you already know machine learning well and want to get a deeper understanding of what you already know, then probably this book is not for you.
Here are the reasons why I think this book is well written:
First and foremost, this book is relatively wide and covers many useful materials. It not only teaches you basic concepts like “What is convolutional neural network?”, “How to implement a convolutional neural network in PyTorch?”, but it also teaches you many useful tricks, such as “You should write vectorized code instead of for loops.”, “How to deal with unbalanced data.”, etc. Some of these tricks are not commonly spelled out in other textbooks, but in my opinion, they are definitely useful and should be told to the reader.
Second, this book has lots of examples, I man both microscopically and macroscopically. Microscopically, there are many code examples. These examples will not only help you understand the concepts but also tell you how to implement these concepts. Macroscopically, this book also covers many real datasets and real problems and how to work with them. This is very helpful knowledge.
Third, this book has a lot of figures, flow charts, plots, etc. These figures are colored, made with very high quality, and most importantly, very helpful for understanding concepts.
Forth, although this book is 700+ pages long, when teaching scikit-learn and PyTorch, this book is not just a simple enumeration of the APIs of these libraries. It instead helps you build out a big picture of the things look like, so you can refer to official docs of these libraries when you need.
Stephan Miller –
When I worked on my first machine learning project, I used Java and was handed a book on machine learning by my boss and told to learn it. I spent months reading the book without learning much because it was all theory and math.
With this book, you don’t have to take the route I did. First, you get to use Python, which is a better language to learn machine learning with than Java, in my opinion. Plus, it teaches you the concepts behind machine learning algorithms without giving you all the theory and math that you really don’t need to know in most cases. And it gives you real-world projects using publically available data to experiment with the concepts introduced.
This book will teach you dimensionality reduction, model evaluation, hyper-parameter tuning, sentiment analysis, regression analysis, clustering analysis, artificial neural networks, parallelizing those networks for more performance, and more. You may not know what some of these terms mean now, but by the end of this comprehensive book, you will not only know these concepts but be able to use them in your own machine learning projects.
Guangping zhang –
As the book title means, this book is about machine learning (ML) and deep learning (DL), using the main libraries, scikit-learn and PyTorch.
Machine learning and deep learning resolved lots of problems, some solutions gave higher accuracy than a human being’s decision, ML looks like it has potential to resolve more and more difficult problems in the future. This book described ML in very detail from technical sides.
First it focused on data preparation and understanding, feature engineering (including feature selection), classification and ensemble learning, hyperparameter tuning using sckit-learn, this book used lots of pages on classification, NLP sentiment analysis, cluster analysis and regression problems.
Then the book switched to deep learning using PyTorch, it focused on modern DL achievements, such as CNN and transformer on image data, sequential data and graph structure data.
This book highlight many new achievements using multiple chapters, including image classification, NLP multiple tasks which have significant progress within recent couple years,
This book also contained lots of real codes for practice purposes.
Personally I recommend reading this book if you like to dive into the artificial intelligence field.
Aurimas Račas –
This book is exactly what it’s called. Machine learning with scikit-learn and Pytorch.
The first 10 chapters are all about scikit-learn, but it’s not a regurgitation of the documentation. It’s a well-balanced journey that includes maths underlying key algorithms (e.g. you’ll see definitions of optimization functions, discussions on what exactly ‘kernel trick’ in SVMs is, line-by-line implementations of some components such as gradient descent or impurity criteria that are there to help build the intuition), code examples that you can run, as well as best scikit-learn practices. All the content is accessible enough for someone just starting to learn about data science, but it’s probably most useful for those who have some experience already but aren’t yet familiar with how to use scikit-learn most productively (e.g. feature transformation pipelines, debugging models, assessing performance) and are interested in having a bigger picture on types of ML algorithms out there.
However, the book doesn’t cover each and every scikit-learn module available; it sticks with the most popular ones. If you were looking forward to learn about, say, Gaussian Processes, this book won’t help. At the same time, the authors mention other important ecosystem packages where relevant (e.g. you’ll find a paragraph on Bayesian optimization, on different gradient boosting models and etc.).
The second half of the book is a different beast. I’d call it an overview of key deep learning architectures with practical implementation examples in PyTorch. It focuses on intuition for the architectures and goes into enough detail that you’ll learn what a ‘forget gate’ is in LSTM, but doesn’t overwhelm you with maths. The PyTorch examples are awesome and if you follow along, you’ll build several NNs yourself. Importantly, it includes state-of-the-art architectures such as transformers and has practical examples on how to work with pre-trained models such as BERT.
All in all, I think it’s an awesome book. Practical, yet not ignoring the complexity, focused on intuition but not shying away from maths. It won’t make you an ML expert, but if you can follow everything in the book, that probably means you have strong foundations to go further.
Shakuntala –
Love this book as a clear, detailed resource for learning machine learning and deep learning implementations in PyTorch and Scikit-learn. PyTorch especially has many advantages over Tensorflow, but is more popular in the academic and scientific communities. More books like this one are a great way to broaden the audience for PyTorch and show its many use cases.
As someone who recently changed careers and got into ML engineering, this is an invaluable resource and has a lot of practical advice that I can actually use for my work. I am a hands-on learner and have always digested material better when given sample projects or case studies where I can practically apply a concept. I am so happy that this book focuses on project-based learning to help the user get comfortable and confident using PyTorch. Not to mention the many interesting and hot button topics in the AI field that this book covers, such as graph neural networks, recommender systems, NLP, etc.
The flow of the book is also intuitive, as each chapter builds on knowledge from the previous one to show more complicated examples. I would highly recommend this book to everyone even remotely interested in learning about machine learning and deep learning – beginners and experts alike can find a lot of value here.
Akshit shah –
The Sequence of this book is what makes this book stand out from others. I really liked the unbreakable flow and as well vast real-world topics that it has mentioned which are helpful with all the coding and diagrams to help readers understand deeply and retain the knowledge. Though the book has maths which is little advance for beginners, But I feel it is manageable
Andrew J. Schaub –
I’m a data scientist who works on multiple projects for multiple project managers. Each of these managers has their own preference in regards to deep learning frameworks, and I’ve noticed a trend over the past couple years of more and more managers moving away from Keras and towards PyTorch.
Who this book is for? Anyone with a basic grasp of Python. I found it suitable for entry-level AI/ML enthusiasts, as well as seasoned veterans who wanted a good reference on PyTorch and scikit-learn. Honestly, there is as lot of good material here for various types of projects. It is not ‘entry-level,’ and I’d say it’s more of a review of current trends and best practices in 2022.
I picked this book up to help give myself a stronger foundation in PyTorch. The PyTorch material is introduced in the second half of the book.
PROS:
1. AI/ML books tend to go one of two ways. Either they go heavy with the math/stats or heavy with the algorithms/software engineering principles. This is most likely the result of the author’s strengths. However, this book is written by a stats professor at Univ of Wisconsin, and current/former PhD students. Therefore, the book doesn’t shy from the math/stats but makes it very accessible.
2. For those who may not be interested in the math/stats, or who want real-world examples of how the math is implemented they do include some ‘data science from scratch’ style examples so I found that very useful. I have a computer science background, so I find it easier to look at the math, write some code, and play around with it to get a deeper understanding of what the math is doing.
3. This book is not simply repeating what is already on scikit-learn and PyTorch’s documentation. I would say Ch 12 and Ch 13 act as a guide in best practices of how to use the documentation. Gives some boilerplate code that I’ll be ‘borrowing.’
4. There are so many topics that I’d like to look into but maybe don’t have time. My work involves either looking at a lot of signals data or computer vision data, however I’d like to learn more about natural language processing (NLP) and graph neural networks. The author includes a couple chapters on these topics on their own, and so act as great introductions to those topics.
CONS:
1. Minor typos in the repository. However, the author is very responsive as I left a couple comments and they were quick to fix/update things.
2. This is not going to give you a comprehensive overview of all the types of supervised or unsupervised learning. There are other books out there for that. The book develops a foundation, and instead of being a brief survey of the field chooses to go really into depth in a few areas. So consider that when looking at books.
3. Organization can be a little odd. The order of the first 6 chapters makes sense to me, as it starts at first principles, and goes over how to build good datasets, how to evaluate your models, and best practices. The remainder of the book is more disjointed, and so you’ll probably find yourself starting with the first 6 chapters, and then depending on your project(s), moving on to the other chapters due to the relevancy. The PyTorch material picks up in the 2nd half of the book (Chapters 12 and 13).
4. If you are comfortable with scikit-learn and only wanted this book to learn PyTorch, and were maybe hoping the book would focus more on PyTorch (as it is listed first in the title), than you may be disappointed. Though, I would fall on that camp, and really I started at the PyTorch chapters and then jumped around to other chapters in the book for areas I was interested in. So I didn’t have any real issues in that regard.
tldr: Great book for learning scikit-learn and PyTorch. I highly recommend this to get a good foundation in the math/stats and algorithms. After getting a strong foundation in the first 6 chapters, you can get a pretty good in-depth look into relevant trends in the field in the remainder of the book. I would definitely recommend this book.
Yue W. –
This is an excellent hand book for machine learning and deep learning with pytorch and sk-learn.
First, this book is well organized, and easy to follow or check up for either self learning or practical reference. For advanced topics such as GNN, it starts with academic links, and also talks about recent development in the middle, which can benefit both the beginner by showing them more case study and the experienced scientist by cutting-edge following-up. It covers wide diversified topics, which are important for the contemporary applications. From supervised learning to unsupervised learning, from sequence modeling, natural language processing to graph neural network, all the popular topics are well introduced in this book.
Second, in each chapter, it goes gradually from fundamental concepts to implementation of advanced algorithms and applications. This makes everybody enjoy reading the book and gain a lot with pleasure.
Whats more, there are so many nice pictures to help you understand the concepts, algorithm and architecture.
My favorite in this book is the chapter of “Graph Neural Networks for Capturing Dependencies in Graph Structured Data”. It is so amazing that PyTorch can unify the graph data structure setup and the GNN architecture building. With PyTorch Geometric library and tons of existing PyTorch NN architecture, you will build up your magic GNN models easily and quickly.
customer –
Really liked to book and what it had to offer.
Good fundamentals and related examples – even better – the examples were on a public website (github) and not the publisher’s site.
Helena –
I would recommend this book for my friends who are new to machine learning.
Pros
1. The writing is clear and easy for beginners to understand.
2. It covers most the basics in machine learning field.
3. It gives examples which are easy to apply to real-world projects.
Cons
It does not dive deep to math behind the algorithms
Fabiano R. –
The book discusses both “classical” and very recent machine learning models, algorithms, related frameworks like Scikit Learn and Pytorch, and how those can be leveraged to put the theory into practice.
Speaking on theory, the authors usually present enough that the average user can have a reasonable understanding of underlying concepts before delving into code. I felt like beginners would benefit from some previous knowledge of some topics like vector and matrix operations, features and loss, even though they are present in the text.
Still, when the reader is faced with topics that might be beyond its scope (such as generating new training data to address class imbalance, for example), the book does an excellent job of pointing the reader in the right direction, be it a published paper, a research article, or the URL for a library’s reference.
I’ve read comments from people with theoretical knowledge, on the difficulty to translate that knowledge into practice and get a project started, and I think this book would be perfect in that scenario, as there are very clear explanations and code on how to process and treat datasets, train, evaluate and fine-tune models, use existing tools and libraries, and even readers who have practical experience might learn a thing or two… I sure did.
Another use-case where I think this book would be invaluable is for people preparing for technical interviews, since it’s very well organized and the theory is presented in such a concise manner, supported by actual working code.
Earlier I mentioned that the authors don’t usually go deep in theory, but when discussing Transformers, this was thankfully an exception… Its complex architecture merits more depth, and in my opinion they did a great job explaining its theory and how the different “components” interact, still had to look outside the book to understand some concepts but, again, the code was incredibly helpful and well written.
I’m planning to start a new project in a few weeks and I am looking forward to using this book as a reference and applying the lessons I learned by reading it.
Sujit Pal –
I read Prof Raschka’s original book on Python Machine Learning when it was published some years ago, and I thought of it as the unofficial quick start primer for Scikit-Learn, the comprehensive Machine Learning (ML) library for Python. This is the third edition of that book, co-authored with Yuxi (Hayden) Liu and Vahid Mirjalili, with more than 300 pages of additional content, including additions to the original material as well as completely new coverage of Pytorch, one of the most popular libraries for a trending new area of ML, Neural Networks or Deep Learning.
As with the original book, this book also provides clear and in-depth explanations behind each of the algorithms described, and the code examples and visualizations are intuitive and easy to understand. This edition also has several type-setting enhancements that make it even more enjoyable to read.
The book is roughly in two parts – the first deals with traditional ML using Scikit-Learn and the second covers neural ML using Pytorch. It looks like a lot of the Scikit-Learn material is carried over from the original book, so I skimmed through it, but I remember it being very high-quality content. There does seem to be some additional material (which I read), such as the chapters on Ensemble Learning.
The second part is all new and serves as a very good intermediate level tutorial on Pytorch. There is also a Tensorflow version of this book that I haven’t read, but where I assume the code examples are in Tensorflow instead. As with the Scikit-Learn chapters, the Pytorch chapters have similar high quality explanations and code. In addition to the coverage of basic neural architectures, both non-Transformer and Transformer based, the book also covers Adversarial Networks and Reinforcement Learning.
Overall, I think this is a very readable and useful book that will provide readers a lot of value for their money (and time). While both Scikit-Learn and Pytorch projects have extensive documentation, it is often difficult to decide which algorithm or operation to use for a particular problem. This book addresses this problem with its intuitive explanations and its coverage of the most important / useful algorithms for a given class of problem. While nothing beats experience, a dedicated reader can expect to become quite competent at Scikit-Learn and Pytorch after reading this book.
DISCLAIMER: I was asked by the publisher if I would like to review the book, and I was provided with a free copy of the book when I agreed.
DB –
If you have been curious about the topic of machine learning then this book is for you. Machine Learning with PyTorch and Scikit-Learn is a fountain of knowledge and will be my go-to book to recommend when learning machine learning concepts. I find that other books concentrate too heavily on the libraries and outcomes without explaining the background behind machine learning concepts. One example, books will often introduce artificial neural networks (ANN) as a “black-box”. People will disregard the mechanisms of the ANN as the math seems complicated; however, this book covers backpropagation and rolling your own implementation of an ANN. Another reason that I enjoy this book is that the authors have included more complicated machine learning methodologies like: transfer learning, parallelized neural networks w/PyTorch, Generative Adversarial Networks and best practices for turning. This book will add the necessary tools for anyone interested in ML.
Now, if you are trying to learn Python and the topic of machine learning at the same-time then I would advise for you to learn Python before reading this book, specifically object-oriented programming (OOP) in Python. Most of the programming examples use a form of OOP or functional programming; however, I would not consider it advanced or complicated. The programming material in this book is not overly complicated and the code is pretty self-descriptive but knowing your way around the Python scientific libraries will help you decipher variable names.
To get the best use out of this book, you will need to learn by doing. Follow the examples in the book and tweak the parameters to figure out both the libraries that are used and the ML technique. By following the examples, you will learn the necessary skills to apply the correct category of ML technique to your data.
Brian E –
Great, well-written book. Good for introduction as well as mathematics behind machine learning models. Includes current ML models as well which was really cool.
Ali Samare Filsoofi –
By studying this book, you will dive deep into the theory and also gain hands-on experience through many examples provided in each chapter.
Machine learning is a vast field, but this does an excellent job in covering all different aspects of Machine Learning such as classical methods, deep learning, natural language processing, computer vision, reinforcement learning, etc. It is very hard to find a book covering all three ML categories (supervised learning, unsupervised learning, semi-supervised learning), but this book does it very nicely. Studying this book helps you two learn scikit-learn and PyTorch, which are two fundamental libraries of machine learning.
If you want to become an expert in Machine Learning, this book is the perfect start for you.
Rustem –
This book does a great job at going through different ML problems and approaches and showing them from different angles – from business and technical perspectives to showing how Scikit Learn and PyTorch could be used with code examples. Book has a good balance of everything and doesn’t have long code examples while also providing good charts for the explanation.
The only part missing is some of the contemporary image problems like instance segmentation or object detection, but image classification is covered very well.
To finalize this is both a great book to have by your side when you need to refresh your memory on a particular topic, but it’s also pretty useful to go through on a high level to get an idea about different ML problems and how they could be solved. In the case of the latter, it’s best to go through it with your laptop so that you could check how the code works.
Evan Anderson –
Chapter 3 really helped with some understanding of topics i had yet to grasp with machine learning!
Daniel Sinclair –
As a physics student coming towards the end of my degree, I wish I had got my hands on this book before being confronted by neural nets and machine learning as a component of my modern computational techniques module.
Machine Learning with PyTorch and Scikit-Learn is a great book that can take give someone, with basic matrix algebra and basic python skills, the knowledge to get a solid handle on ML and DL and the enthusiasm to pursue ML and DL further.
It provides very visual, clear and attention grabbing explanations from neural net basics, all the way to advanced, current topics that are used to solve real-world problems in the current day. There are not massive blocks of boring text, everything is nicely organised and broken down into managagle steps.
All code examples and mathematical equations are clear, well colour coded and concise – each diagram would make an excellent addition to a standalone tutorial page on its relevant subject.
It truly allows you to carry out examples of all the essential topics of ML and DL, which as a near-beginner in the ML/DL space, was a realy confidence booster.
PyTorch has been gaining some serious traction in the academic and research community, so getting yoiur hands on this book to have a good understanding of the PyTorch essentials seems like a sensible thing to do!
Mark Saroufim –
I skimmed through this book in a 4h live stream which was honestly exhausting and not something I recommend. This book is long, it’s roughly 800 page aggregating basics of ML and data science, basics of sci-kit learn, basics of PyTorch and then finishes up with many from-scratch implementations of all your favorite models like transformers, cnns and also one of the best graph neural network chapters I’ve read.
The reason why this book is so long is that it’s for beginners, it’s plausible that with minimal to no experience in ML you can read this book and become competent enough to get an ML job in industry or academia. Few books can actually do this, the reality is books will either assume you know some numpy already or maybe some PyTorch or that you’ve read another longer statistics book like Murphey. Personally I’ve been in the ML field for about 10 years now and I forget that I’ve read many terrible references over the years before I got to where I am so for me today a book that aggregates so many different topics is more useful as a reference but if you’re a beginner you will not regret this book. Everything is explained in plain English, diagrams, code and math so depending on your background you will for sure enjoy the picture and then if you’re more of the manager type maybe the english is enough, if you’re from a stats background start with the formulas but if you’re a hacker then go with the code which are from scratch implementations of many popular algorithms.
The mark of a good book is one that compels you to action in the real world and I can honestly say this book inspired to get my stuff together and write minimal implementations that are heavily commented for all the core ML algorithms so I can refer to them over time whenever I forget some detail. Even if you’ve been in ML for ages, can you honestly say you could implement anything from scratch without googling?
I have some minor nits that would make the book shorter like using code diffs instead of examples but also others that would make it a bit longer. The book talks a lot about feature aggregation yet never mentions ranking and I’m looking forward to reading expanded editions on the GNN chapter and Reinforcement Learning chapter.
Overall this book will teach you how to write clean ML code with and without libraries and give enough intuition to hopefully recall everything in it – again not an easy undertaking considering it’s 800 pages.
FitDad –
Another great offering from Packt that gives a constructivist approach to learning the intricacies of building Machine Learning models with Python.
I am still an intermediate or beginner self-taught Python programmer and am comfortable using Pandas, Geopandas, and generally using Python to automate some basic workflows. However, before reading this book I had not ventured much into the realm of Machine Learning.
This book took me into the depths of technical and mathematical intricacies that undergird Machine Learning. It also greatly expanded my scope of knowledge in the field and has increased my interest in taking a class in linear algebra.
Overall, the visual examples in this text and the practical follow-along instructions greatly helped me solidify this new knowledge into robust mental models which I will continue to refine and develop as I learn more about applying the concepts of Machine Learning to my own research and work.
Pallavi K –
The book is well written and it has met its objectives written in the preface – fun and quick way of developing introduction to pytorch and appreciate the power of it.
I loved the book from chapters 13 and later as I am more interested in deep learning. The way pytorch is introduced and developed over the chapters is really fun.. Especially I loved the graph neural networks chapter. They typically introuce a topic and quick math and immediate coding- this would be the theme.. So math is not so deep and they gave enough references to further build on the subject.. this is more than enough.. they missed gans and timeseries applications, otherwise this book is complete. The initial chapters were all about classical ML, the treatment of the subject is pretty similar to most books in the market. I felt a bit bored!
Shopper J –
It requires some level of Python and OOB knowledge. It is good for intermediate ML engineers.
Vidushi –
Covers all the machine learning topics precisely along with the code. I have a decade of experience in ML and have gone through a lot of content/books but nothing comes close to as good as this book.
Om S –
This is one of the great book, easy to understand and cover every single thing which is needed to get going as Ml developer and data scientist.
All I would say is read and experience it. No need to look multiple blog and books just read this multiple times and clear basic concepts and you will be amazed that you did it. This is thick book and quality is great in terms of content. I am loving it.
Xavier Romero –
The book covers a wide range of useful terms in the never-ending machine learning landscape. The pages are on black and white style and the relevance of explained concepts are far from perfect.
James Brownlow –
I do some work with machine learning (in Python) and found a favorable review of this book… so I bought it. The best things about this book are:
1) It covers (700+ pages) everything one could possibly want to work with in ML. I went through chapter 2, hand coding the perceptron algorithm, from the book: mathematical detail from the most basic to ‘what one needs to understand the algorithm’ is all there. In a couple of hours I learned a lot about this ML method
2) The github repo for this book is phänomenal. Python script files and Jupyter files are there… and the Jupyter file can be run to recreate the examples in the chapters.
The book is a bargin. I cannot recommend it highly enough.
iPaul –
This is one of the best ML introduction books currently available. It starts simple and builds up to more complex examples.
Julian Schulze –
This book covers the most important topics in Machine Learning and shows how to use them in practice with a lot of code snippets and recommendations. Recommended for beginners, advanced and experienced people. Only critic is that a few topics could be explained in more detail.
In general, a highly recommended, great book.
Ham Sandwich –
This is an excellent primer through advanced topics on AI/ML in general, and using PyTorch and scikit-learn in specific.
The first half of the book is a ramp up for the uninitiated, and includes the usual Github repos of free code that follows the examples.
The rest of the book is focused on the use of PyTorch and scikit-learn, and the applications cover all the supervised and unsupervised methods which were covered in the first half of the book. I suppose the intro part is adequately covered by numerous other texts, but why not not get it in one place?
The innards of PyTorch are covered, but you don’t need to look at that for applications of use in just about everything ML-related. All in all, a good bang for the buck and wide coverage and up to date.
Marc Van der Veen –
It’s tough to explain how machine learning and especially deep learning works, and the authors do an excellent job of it by walking you through exercises and practical examples. I’ve found plenty of other books who may do a slightly better job at explaining the overall general concepts and the background, and fail dismally in the details. This one does a good job – certainly more than good enough – of the former, and a fantastic job of the latter. And if you really want to learn how to deploy machine learning and deep learning algorithms, you need to have someone show you the way who has enough attention to detail that what they say works, and that you don’t need to spend hours and hours figuring out how to make code work. This is not an easy task, and I commend the authors’ commitment and professionalism in the exercise of it.
Uriel –
Excelente libro
A –
Come sempre questa casa editrice propone libri con un buon compromesso tra teoria ed esempi. Consigliato per chi desidera approfondire tematiche di Machine Learning con python
Enrique Peraza –
Very good book for implementation if you are already familiar with adjacent subjects, such as pattern classification, stochastic processes, and linear algebra
Stephen Zhou –
This books is a thick one that has a great coverage on the topics. It is very practical, and balanced with code examples. Definitely a good buy if you need a reference book
Yogesh –
I had read Geron and ISLR before reading, so I can’t say how this book would be for beginners but it is definitely great for intermediate level. Covers more math than both and more range of topics.
Mahmoud abdelhamid –
The only drawback is the use of toy datasets. The author should have added a one mega project that includes the concepts covered in the book. Yet great book that will make a difference to beginners
i love this book everyone need this book –
everyone need this book i loved
Vadim –
I seldom write reviews. This book is a gem for the many reasons already aptly explained by others. I look forward to many more months studying various aspects and tangents.
SP –
Liked it, took it specially for pytorch coverage. Explanation is clear and detail..
Felix –
This book provides a perfect Balance between theory and practise as well covering a wide range of possible applications. One point of criticism would be the physical quality of the book (the Page were wavy and the print is in Black and white), however since there is a free eBook download that comes with the product thats not really an issue. Would recommend to anyone looking for a Sound introduction into machine learning
Phuong Tran –
good book to learn machine learning
Liilii –
Veryyyyyyyyy goood
Oleg Mikulchenko –
I prefer to have one book per one scientific topic. For ML, such one book is this book.
Clear explanations, reasoning aligned well with my personal understanding.
Jupyter notebooks, IMHO, are must requirements for any book in ML fields, here we have good compact notebooks for essential explanations and implementations.
Several topic are deep enough, e.g. for linear (by coefficients) regression Sebastian reviewed nonlinear (by factors) polynomial functions in scikit-learn, that not often presented in other books.
Reality is that Pytorch become the dominant framework in ML/DL/GPT/etc. , and Sebastian has switched to that in his latest book.
Seems like I’ve found my one book for now and will keep looking for new books from Sebastian.
Explorer –
A great book and covers a lot of topics. It does not go as deep on Pytorch as I had expected but it does cover a lot of ML topics. This does cover the Pytorch a lot and provides a good balance in contents – depth in one topic vs coverage of different topics.
Note that the contents are in black and white but a color version is available for free download once you buy the book.
I found the GitHub source codes helpful.
Mayank –
It covers so much,from pytorch basics to parallel computing to gnn(graph neural networks)
C. C Chin –
Not sure will ever get this far no idea pyTourch??lot of other books!!! ML newbie!!
Background information needled fast! Job interview AWS AI machine learning specalty exam and udemy classes
Using AWS sagemaker Studio to learn
Neal Davis exam and classes
Michael H AWS Sagemaker studio and Julian Simon Learning AWS Sagemaker and sybex mls-c01 exam
And other AWS machine learning books.
AWS health care machine learning as an example I could learn MLS exams using neal Davis exams mls-c01 exams
Hope to learn and talk ML AI machine learning specalty exam Udemy and exams udemy AWS MLS-C01 machine learning specalty Sagemaker studio books
Interview 2024-2025 Federal worker
ML newbie!
Update when used!!
Zain Khandwala –
I’m pretty well-read in the field (for context, I work in an AI leadership role at one of the country’s major banks and spent a few years building and running a graduate degree program in analytics). These days, many people prefer to keep up with advances in the field via blogs and other digital sources, partly since books tend to become outdated quickly, but I still prefer books as source material, even if that means my knowledge isn’t completely du jour (for one thing, I don’t really need it to be). That said, I find most such literature on these topics to be woefully incomplete and/or poorly written. Not so this one. While it can’t include *everything*, it covers an awful lot and does so articulately and usefully. I highly recommend it, both for newcomers and the experienced, and look forward to future publications from the author(s).
D. Grigsby –
This is a fantastic book. It’s huge, but the pages go quickly. I’m my case, I wanted to catch up from a few years away from ML and learn PyTorch at the same time. Really enjoyed the book.
Davide –
La materia è immensamente vasta e ce ne vorrebbero 10 almeno libri come questo, per spiegarla e conoscerla discretamente. Tuttavia questo libro fornisce delle basi sufficienti ed esaustive per padroneggiare l’argomento e poter iniziare a smanettarci sopra in modo piuttosto funzionale e scalabile. Implica delle basi solide della programmazione e del linguaggio Python, nonchè di algebra lineare, statistica e calcolo differenziale, altrimenti è meglio evitarlo poichè non ci si capirebbe nulla, nonostante gli argomenti siano generalmente spiegati al meglio. Validissimo per utenti di calibro medio-avanzato.
Jason Mazzaroth –
This book is critical for my PhD research and was necessary preparation for my prelim exam. This is an in-depth treatment of ML and it provides many reference publications inline, which are valuable for further research when you’re about to publish papers related to the specific topics.