Chapter 2Decide! Find the Paper Bag
In the previous chapter, you moved a turtle around and helped him escape a virtual paper bag. As he moved about, you drew lines, squares, and spirangles. You also saved the points he visited to a data file, noting if these points were located inside or outside of the bag.
In this chapter, you’ll use the point data to build a decision tree and help the turtle find the paper bag. Because the data contains information about whether or not a point is inside the bag, you’ll be able to classify sets of points. Once you have a decision tree, you’ll turn it into a ruleset and prune it back to locate the paper bag.
A decision tree is a type of classifier. Many classifiers work like a black box—you feed in data, ...
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.
Read now
Unlock full access