Decision Trees in Machine Learning: Classification with an Example, Study notes of Artificial Intelligence

An introduction to decision trees as a representation of classifiers in machine learning. The concept of classifiers, supervised learning, and decision trees as a particular type of classifier. Three examples of decision tree applications are given: medical diagnosis, plant eating robot, and digit recognition. The document also explains the process of classification with decision trees and discusses considerations for designing a learning algorithm, including feature construction, feature selection, selecting a representation, model selection, and selecting an algorithm.

Typology: Study notes

2010/2011

Uploaded on 10/25/2011

thecoral
thecoral 🇺🇸

4.5

(30)

395 documents

1 / 24

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS181 Lecture 2:
Decision Trees
Prof. David C. Parkes
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18

Partial preview of the text

Download Decision Trees in Machine Learning: Classification with an Example and more Study notes Artificial Intelligence in PDF only on Docsity!

CS181 Lecture 2:

Decision Trees

Prof. David C. Parkes

Classifiers

  • A classifier is a function h : XY
    • Features: X = (X 1 , …, X m )
      • e.g., X 1 = {0,1,2}, X 2 = {blue, red}, X 3 = R¸ 0
    • Target class: Y
      • e.g., Y={true, false}, Y = {1,.. 5}

( x 1 ,…, xm) Classifier y’

Example: Medical Diagnosis

  • Features:
    • symptoms and test results
      • e.g. Sore Throat, Thermometer Reading
  • Classes:
    • True/False
      • e.g. does patient have flu?
    • One of a range of possible illnesses
      • e.g. cold, flu or nothing

Example: Plant Eating Robot

  • Features:
    • gray-scale pixels in image
    • location in world
  • Classes:
    • {nutritious, poisonous}
    • {eat, don’t eat}

Decision Trees

X 1

F T

X 2

F T

N P

X 4

F T

P X 2

N P

F T

Decision trees are a particular representation of a classifier. Node: feature to branch on Edge: value of a feature Leaf: prediction

Example Xj: binary feature Y = { N utritious, P oisonous} (^7)

Classification With Decision Trees X 1 F T X 2 F T N P

X 4

F T

P X 2

N P

F T

To classify x =(T,F,T,F)

Classification With Decision Trees

Begin at root.

Check value of x 1.

To classify x =(T,F,T,F) X 1

F T X 2 F T N P

X 4

F T

P X 2

N P

F T

Classification With Decision Trees

Begin at root.

Check value of x 1.

Follow T branch.

To classify x =(T,F,T,F) X 1

F T X 2 F T N P

X 4

F T

P X 2

N P

F T

Classification With Decision Trees

Begin at root.

Check value of x 1.

Follow T branch.

Check value of x 4.

Follow F branch.

To classify x =(T,F,T,F) X 1

F T X 2 F T N P

X 4

F T

P X 2

N P

F T

Classification With Decision Trees

Begin at root.

Check value of x 1.

Follow T branch.

Check value of x 4.

Follow F branch.

Return class (P)oisonous.

To classify x =(T,F,T,F) X 1

F T X 2 F T N P

X 4

F T

P X 2

N P

F T

Question for Today

  • How to train a good decision tree given

labeled data?

Designing a Learning Algorithm:

Things to consider

  • Feature construction
  • Feature selection
  • Selecting a representation
  • Selecting a model (= class of hypotheses)
  • Selecting an algorithm
  • Tuning parameters of the algorithm

2. Feature Selection

  • Sometimes the data contains many

features, e.g. 1000 or more

  • Many learning algorithms break down with

too many features

  • Feature selection is the process of

selecting the most relevant features

  • can be done automatically

3. Selecting a Representation

  • Learning algorithms represent the

classifiers they learn in different ways

  • e.g., curve fitting uses polynomials , decision tree algorithms use …
  • Representation constrains the set of

hypotheses