Skip to Main Content
Hands-On Artificial Intelligence for Beginners
book

Hands-On Artificial Intelligence for Beginners

by David Dindi, Patrick D. Smith
October 2018
Beginner content levelBeginner
362 pages
9h 32m
English
Packt Publishing
Content preview from Hands-On Artificial Intelligence for Beginners

Random forests

Random forests are one of the most commonly utilized supervised learning algorithms. While they can be used for both classification and regression tasks, we're going to focus on the former. Random forests are an example of an ensemble method, which works by aggregating the outputs of multiple models in order to construct a stronger performing model. Sometimes, you'll hear this being referred to as a grouping of weak learners to create a strong learner

Setting up a random forest classifier in Python is quite simple with the help of scikit-learn. First, we import the modules and set up our data. We do not have to perform any data cleaning here, as the Iris dataset comes pre-cleaned.

Before training machine learning algorithms, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Artificial Intelligence and Machine Learning Fundamentals

Artificial Intelligence and Machine Learning Fundamentals

Zsolt Nagy

Publisher Resources

ISBN: 9781788991063Supplemental Content