© Michael Paluszek, Stephanie Thomas  2017

Michael Paluszek and Stephanie Thomas, MATLAB Machine Learning, 10.1007/978-1-4842-2250-8_8

8. Data Classification

Michael Paluszek and Stephanie Thomas1

(1)New Jersey, USA

In this chapter we will develop the theory for binary decision trees. Decision trees can be used to classify data. Binary trees are the easiest to implement. We will create functions for the decision trees and to generate sets of data to classify.

8.1 Generate Classification Test Data

8.1.1 Problem

We want to generate a set of training and testing data.

8.1.2 Solution

Write a function using rand to generate data.

8.1.3 How It Works

The function ClassifierSet generates random data and assigns them to classes. Classes are generated by adding ...

Get MATLAB Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.