O'Reilly logo

Mastering Python for Data Science by Samir Madhavan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Decision trees

A simple predictive model maps the outcomes of an item to the input data. It is a popular predictive modeling technique, which is used commonly in the industry:

Decision tree models are basically of two types:

  • Classification trees: These refer to dependent variables that take a finite value. In these tree structures, branches represent the rules of the features that lead to the class labels, and leaves represent the class labels of the outcome.
  • Regression trees: When dependent variables takes continuous values, then they're called regression trees.

Let's take an example. The following data represents whether you should play tennis or not, based on the overall outlook of weather, humidity, and wind intensity:

Play

Wind

Humidity

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required