Professional Documents
Culture Documents
of
HW
Assigned
Assignment
Due date
Assigned
Due
4 Sep 2013
13 Sep 2013
13 Sep 2013
16 Sep 2013
11 Sep 2013
23 Sep 2013
Classica8on:
Example
IRIS
DATA
Classica8on
using
Decision
Trees
MATLAB
Sta8s8cal
Package
2
AMribute
Informa8on
Col.
1. sepal
length
in
cm
2. sepal
width
in
cm
3. petal
length
in
cm
4. petal
width
in
cm
5. Class1:
Iris
Setosa
6. Class2:
Iris
Versicolour
7. Class3:
Iris
Virginica
5
Flower Parts
10
Decision
Trees
Is
a
classica8on
algorithm.
A
decision
tree
is
a
set
of
simple
rules,
such
as
"if
the
sepal
length
is
less
than
5.45,
classify
the
specimen
as
setosa."
Decision
trees
are
also
nonparametric
because
they
do
not
require
any
assump8ons
about
the
distribu8on
of
the
variables
in
each
class.
The
class
creates
a
decision
tree.
Create
a
decision
tree
for
the
iris
data
and
see
how
well
it
classies
the
irises
into
species.
13
14
One Method
15
Decision Tree
16
Home
Work
#3
Your
job
is
to
reproduce
the
results
shown
so
far
(and
no
more)
by
using
MATLAB.
You
can
use
the
code
suggested
by
me
or
you
can
modify
it.
I
cannot
guarantee
that
the
code
suggested
by
me
works
on
your
system.
You
can
take
two
weeks
to
do
this
18
19
20
Comment
For
the
decision
tree
algorithm,
the
cross-valida8on
error
es8mate
is
signicantly
larger
than
the
re-
subs8tu8on
error.
This
shows
that
the
generated
tree
overts
the
training
set.
In
other
words,
this
is
a
tree
that
classies
the
original
training
set
well,
but
the
structure
of
the
tree
is
sensi8ve
to
this
par8cular
training
set
so
that
its
performance
on
new
data
is
likely
to
degrade.
It
is
owen
possible
to
nd
a
simpler
tree
that
performs
beMer
than
a
more
complex
tree
on
new
data.
21
Pruning Code
23
24
25
Addi8onal
Analysis
on
the
Iris
Data
Set
26
4.3
7.9
2.0
4.4
1.0
6.9
0.1
2.5
27
Petal
length
Petal
width
Granulated
Ranges
(of
sepal
length)
4.3
4.9
Sestosa
4.9
5.8
5.8
7.0
Sestosa
Versicolor
Versicolor
7.0 7.9
Virginica
Virginica
Virginica
29
Granulated
Ranges
(of
sepal
width)
2.0
2.2
Versicolor
Versicolor
Versicolor
2.2 2.3
2.3
3.4
3.4
3.8
3.8
4.4
Sestosa
Sestosa
Sestosa
Virginica
Virginica
Virginica
30
Granulated
Ranges
(of
petal
length)
1.0
1.9
Sestosa
3.0
4.5
4.5
5.1
5.1
6.9
Versicolor
Versicolor
Virginica
Virginica
31
Granulated
Ranges
(of
petal
width)
0.1 0.6
Sestosa
1.0
1.4
Versicolor
Versicolor
Virginica
Virginica
1.4 1.8
1.8
2.5
32
4.9
5.8
5.8
7.0
7.0
7.9
short
sepal
medium
long
sepal
long
sepal
very
long
sepal
A11
A12
A13
A14
33
2.2 2.3
narrow sepal
2.3
3.4
3.4
3.8
3.8
4.4
medium
wide
sepal
wide
sepal
very
wide
sepal
A21
A22
A23
A24
A25
34
A31
3.0
4.5
A32
4.5
5.1
long
petal
A33
5.1
6.9
A34
35
A41
1.0 1.4
A42
1.4
1.8
wide
petal
A43
1.8
2.5
A44
36