Taking too long? Close loading screen.
Connect with us

Tech

Learn Python machine learning with these essential books and online courses

Published

on

Teaching yourself Python machine learning can be a daunting task if you don’t know where to start. Fortunately, there are plenty of good introductory books and online courses that teach you the basics.

It is the advanced books, however, that teach you the skills you need to decide which algorithm better solves a problem and which direction to take when tuning hyperparameters.

A while ago, I was introduced to Machine Learning Algorithms, Second Edition by Giuseppe Bonaccorso, a book that almost falls into the latter category.

While the title sounds like another introductory book on machine learning algorithms, the content is anything but. Machine Learning Algorithms goes to places that beginner guides don’t take you, and if you have the math and programming skills, it can be a great guide to deepen your knowledge of machine learning with Python.

Oiling your machine learning engine

Machine Learning Algorithm kicks off with a quick tour of the fundamentals. I really liked the accessible definitions Bonaccorso uses to explain key concepts such as supervised, unsupervised, and semi-supervised learning and reinforcement learning.

Bonaccorso also draws great analogies between machine learning and descriptive, predictive, and prescriptive analytics. The machine learning overview also contains some hidden gems, including an introduction to computational neuroscience and some very good precautions on the pitfalls of big data and machine learning.

That said, the machine learning overview does not go into too much details and would be hard to understand for novices. Given the audience of the book, it serves to refresh and solidify your understanding of machine learning, not to teach you the basics.

Next, Machine Learning Algorithms builds up on that brief overview and goes into more advanced concepts, such as loss functions, data generation processes, independent and identically distributed variables, underfitting and overfitting, different classification strategies (one-vs-one and one-vs-all), and elements of information theory. Again, the definitions are smooth and very accessible for someone who has already had hands-on experience with machine learning algorithms and linear algebra.

Before going into the exploration of different algorithms, the book covers some more key concepts such as feature engineering and data preparation. Here, you’ll get to revisit some of the key classes and functions of scikit-learn, the main Python machine learning library. If you already have a solid knowledge of Python and numpy, you’ll find this part a pleasant review of one-hot encoding, train-test splitting, imputing, normalization, and more. There is some very great stuff in the third chapter, including one of the best and most accessible definitions of principle component analysis (PCA) and feature dependence in machine learning algorithms. You’ll also get to see some of the more advanced techniques not covered in introductory books, such as non-negative matrix factorization (NNMF) and SparsePCA. Of course, without the background in Python machine learning, these additions will be of little use to you.

The real meat ofthe book starts in the fourth chapter, where you get to the machine learning algorithms. Here, I had mixed feelings.

A rich roster of machine learning algorithms

clustering

In general, Machine Learning Algorithms is nicely structured and stands up to the name. There are chapters on regression, classification, support vector machines (SVM), decision trees, and clustering. The book follows up with a few chapters on recommendation systems and natural language processing applications, and finishes off with a very brief overview of deep learning and artificial neural networks.

The main chapters offer in-depth coverage of principle machine learning algorithms in Python, including details not covered in introductory books. For instance, the regression chapter goes into an extensive coverage of outliers and methods to mitigate their effects. The classification chapter has a nice discussion on passive-aggressive classification and regression in online algorithms. The SVM chapter has a comprehensive (but complicated) discussion on semi-supervised vector machines. And the decision trees chapter provides a good coverage of the specific sensitivities of DTs such as class imbalance, and some practical tips on tweaking trees for maximum performance.

The clustering section really shines. It spans across three full chapters, starting with fundamentals (k-nearest neighbors and k-means) and goes through more advanced clustering (DBSCAN, BIRCH, and bi-clustering) and visualization techniques (dendrograms). You’ll also get a full account of measuring the effectiveness of the results and determining whether your algorithm has latched onto the right number and distribution of clusters.

Across the book, there are thorough discussions of the mathematical formulas behind each machine learning algorithm. You need to come strapped with solid linear algebra and differential and integral calculus fundamentals to fully understand this (if you need to hone your machine learning math skills, I’ve offered some guidance in a previous post).

The book also makes extensive use of functions numpy, scipy, and matplotlib libraries without explaining them, so you’ll need to know those too (you can find some good sources on those libraries here).

One of the most enjoyable things about Machine Learning Algorithms are the chapter summaries. After going through the nitty-gritty of the math and Python coding of each machine learning algorithm, Bonaccorso gives a brief review of where to apply each of the techniques presented in the book. There are also many references to relevant papers that provide more in-depth coverage of the topics discussed in the book. It’s refreshing to see some of the old but fundamental papers from early 2000s being mentioned in the book. Those things tend to get buried under the hype surrounding state-of-the-art research.

Machine Learning Algorithms finishes off with a good wrap-up of the machine learning pipeline and some key tips on choosing between the different Python tools introduced across the book.

Not enough real-world examples

deep neural network

The one thing, in my opinion, that should set a book on Python machine learning apart from research papers and theoretical textbooks are the examples. A good book should be rich in use-case oriented examples that take you through real-world applications and possibly build up through the book.

Unfortunately, in this respect, Machine Learning Algorithms leaves a bit to desire.

For one thing, the examples in the book are mostly generic, using data-generation functions in scikit-learn such as make_blobs, make_circles, and make_classification. Those are good functions to show certain aspects of Python machine learning, but not enough to give you an idea of how to use the techniques in real life, where you have to deal with noise, outliers, bad data, and features that need to be normalized and categorized.

The code is in plain Python scripts as opposed to the preferred Jupyter Notebook format (which is not much of a big deal, to be fair). Also, while the book omits much of the sample code and focuses on the important parts for the sake of brevity, it made it hard to navigate the sample files at times.

The book does cover some real-world examples, including one with airfoil data in the SVM chapter and another with the Reuters corpus in the NLP chapter. The recommendation systems chapter also includes a few decent use cases, but that’s about it. Without concrete examples, the book often reads like a disparate reference manual with code snippets, which makes it even more crucial to have solid experience with Python machine learning before picking this one up.

Another thing that didn’t really appeal to me were the two chapters on deep learning. Machine Learning Algorithms provides a good overview of deep learning and discusses convolutional neural networks, recurrent neural networks, and other key architectures. But the problem is that introductory books on Python machine learning already cover these concepts and much more. So most of the people who make it this far through the book without putting it down won’t find anything new here (aside from the mention of KerasClassifier maybe).

Midway through Python machine learning journey

So, where does this book stand in the roadmap to learning machine learning with Python? It’s neither beginner level, nor super-advanced. I would suggest picking up Machine Learning Algorithms after you read an introductory-to-intermediate book like Python Machine Learning or Hands-on Machine Learning, or an online course like Udemy’s “Machine Learning A-Z.” Otherwise, you won’t be able to make the best of the rich content it has to offer.

Once you finish this one, you might want to consider Bonaccorso’s Mastering Machine Learning Algorithms, Second Edition, which expands on many of the topics presented in this book and takes them into even greater depth.


This article was originally published by Ben Dickson on TechTalks, a publication that examines trends in technology, how they affect the way we live and do business, and the problems they solve. But we also discuss the evil side of technology, the darker implications of new tech and what we need to look out for. You can read the original article here.

Source

Continue Reading
Advertisement
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Tech

Charge Your Phone Wirelessly With 50% off a Multifunctional LED Lamp

Published

on

Best Tech DealsBest Tech DealsThe best tech deals from around the web, updated daily.

White Wireless Charge Lamp | $18 | Amazon | Clip coupon + code ABC88699
Black Wireless Charger Lamp | $20 | Amazon | Promo code ABC88699

When you’re ready to turn in for the night, you don’t want to forget to charge your phone— especially if your mobile device doubles as your alarm clock.

With this wireless charger lamp, you can make this crucial step of your nightly routine even easier by just setting your phone on the wireless charging pad and… well, that’s all there is to it!

Advertisement

Other functions include multiple lighting modes as well as a sleep timer option for auto shut-off of the light after 30 or 60 minutes.

This lamp can be yours in white for $18 if you clip the coupon on Amazon (it’s below the original $40 price) and add promo code ABC88699 at checkout.

You can snag the black version for $20 using the same code—no coupon though, sorry.

Don’t sleep on this deal! Who knows how long stock or the coupon code will last?

Advertisement


Source

Continue Reading

Tech

Keep That Hotdish Hot With 65% Off a Luncia Casserole Carrier, Only $11 With Promo Code

Published

on

Best Home DealsBest Home DealsThe best home, kitchen, smart home, and automotive deals from around the web, updated daily.

Luncia Double-Decker Dish Carrier | $11 | Amazon | Promo code SDDU9S7F

It has been a long time since the days we could safely have a potluck or other gatherings, but we have a fantastic deal perfect for once those times return. These double-decker Luncia dish carriers can be had for 65% off when you add promo code SDDU9S7F at checkout and clip the coupon on the site (it’s just below the price). These holders fit 9″x 13″ sized baking dishes.

Advertisement

That means you can insulate and keep two dishes of food warm for only $11 instead of $30. What’s more, your Luncia carrier will arrive by Christmas if you order today as a Prime member.

Just add promo code SDDU9S7F and clip the 5% off coupon to bring the price down to $11 for the blue or the grey option.

Advertisement

Grab this offer while it’s still around!


Source

Continue Reading

Tech

Conquer Your Pup’s Dander and Fur With $700 Off a Cobalt or Charcoal Bobsweep PetHair Plus Robot Vacuum

Published

on

Best Home DealsBest Home DealsThe best home, kitchen, smart home, and automotive deals from around the web, updated daily.

Bobsweep PetHair Plus Robot Vacuum & Mop (Cobalt) | $200 | Best Buy

Bobsweep PetHair Plus Robot Vacuum & Mop (Charcoal) | $200 | Best Buy

Allergies can be bad enough as the seasons change. Don’t let pet hair and dander add to that by vacuuming it up early and often. That chore is easier said than done— unless you have a robot vacuum to do the work for you. This lovely bright cobalt Bobsweep PetHair Plus robot vacuum and mop, only $200 today at Best Buy seems like an ideal option. That’s a whopping $700 off, by the way.

Advertisement

You can get the same deal for the charcoal version of the robot vac, too. This model is not only specially made for picking up pet hair, it self docks and charges when it’s finished with the work.

It also comes with a mop attachment, so it can take care of those kitchen floors for you as well. Grab it while it’s still available for this fantastic price!

Advertisement


Source

Continue Reading

Trending