Chapter 3Working with Decision Trees
Do not be deceived by the decision tree; at first glance it might look like a simple concept, but within the simplicity lies the power. This chapter shows you how decision trees work. The examples use Weka to create a working decision tree that will also create the Java code for you.
The Basics of Decision Trees
The aim with any decision tree is to create a workable model that will predict the value of a target variable based on the set of input variables. This section explains where decision trees are used along with some of the advantages and limitations of decision trees. In this section you also find out how a decision tree is calculated manually so you can see the math involved.
Uses for Decision Trees
Think about how you select different options within an automated telephone call. The options are essentially decisions that are being made for you to get to the desired department. These decision trees are used effectively in many industry areas.
Financial institutions use decision trees. One of the fundamental use cases is in option pricing, where a binary-like decision tree is used to predict the price of an option in either a bull or bear market.
Marketers use decision trees to establish customers by type and predict whether a customer will buy a specific type of product.
In the medical field, decision tree models have been designed to diagnose blood infections or even predict heart attack outcomes in chest pain patients. Variables ...
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