You are on page 1of 6

Lect

urenot
eson

Deci
siont
reeandDeci
sionTabl
e
or2ndSemest
f er
(
BCA-
1205)

by
AlokHaldar
AssistantPr
ofessor
Kharagpurcoll
ege

Pr
epar
edby

Al
okHal
dar
,Assi
stantPr
ofessor
,Khar
agpurCol
l
ege
Deci
sionTabl
eVsDeci
sionTr
ee:

Deci
sionTabl
e:

Adeci
siont
abl
eisat
abl
ethati
ndi
cat
escondi
ti
onsandact
ionsi
nasi
mpl
i
fiedandor
der
ly
manner
.

Decisi
ontablesar
eusedtomodelcompl
icat
edl
ogic.I
tshowst
hatall
possi
blecombinat
ionsof
condit
ionshavebeenconsi
der
edandwhencondi
ti
onsarenotmet
,iti
seasytosee.

Adeci
siontablecanbedescri
bedascause-effectt
abl
eandi
sthebestwayt
odeal
wit
h
combi
nati
oni nput
swit
htheirassoci
atedoutputs.

Iti
sanexcellentt
ool
touseinbot
htesti
ngandr
equir
ement
smanagement.Usi
ngdecisi
on
tabl
esitbecomeeasierf
ort
herequi
rement
sspeci
ali
stt
owri
ter
equi
rementswhichcoveral
l
condit
ions.

I
nadecisi
ont
abl
e,t
helogi
ciswelldi
vi
dedintocondit
ions,act
ions(deci
sions)andr
ulesf
or
r
epr
esenti
ngt
hevar
iouscomponentsthatf
ormthelogical
model .

Thegener
alf
ormatofadeci
siont
abl
ehasf
ourbasi
cpar
ts.

1)Act
ionent
ry:
Iti
ndi
cat
est
heact
ionst
obet
aken.

2)Condi
ti
onent
ry:
Iti
ndi
cat
escondi
ti
onswhi
char
ebei
ngmetoranswer
sthequest
ionsi
n

t
hecondi
ti
onst
ub.

3)Act
ionst
ub:
Itl
i
stsst
atement
sthatdescr
ibeal
lact
ionst
hatcanbet
aken.

4)Condi
ti
onst
ub:
itl
i
stsal
lcondi
ti
onst
obet
est
edf
orf
act
orsnecessar
yfort
aki
ngadeci
sion.

Adeci
siont
abl
eisat
abl
eofr
owsandcol
umnssepar
atedi
ntof
ourquadr
ant
s.

I
nadeci
siontabl
e,t
hei
nput
sar
eli
stedi
nacol
umn,
wit
htheout
put
sint
hesamecol
umnbut
bel
owt
heinputs.

Usi
ngdecisi
ont
abl
esmakei
tpossi
blet
odet
ectcombi
nat
ionsofcondi
ti
onsei
thernott
est
edor
dev
eloped.

Decisiont
abl
esshouldbestbeconst
ruct
eddur
ingsy
stem desi
gnt
hent
heybecomeusef
ult
o
developer
s,t
est
ersandend-user
s.

Deci
siontabl
etest
ingi
sabl
ackboxt
estdesi
gnt
echni
quet
odet
ermi
net
het
estscenar
iosf
or
complexbusi
nesslogi
c.

Pr
epar
edby

Al
okHal
dar
,Assi
stantPr
ofessor
,Khar
agpurCol
l
ege
Ther
ear
etwot
ypesofdeci
siont
abl
es:

i
) ext
endedent
ryt
abl
e

i
i) l
imi
tedent
ryt
abl
e.

Inext
endedentr
yt ablebot
htheentr
yandst
ubsect
ionofanyspeci
fi
ccondi
ti
onmustbe
consi
der
edtogetherifacondi
ti
onisappl
i
cabl
etoagivenr
ule.

Inli
mitedent
ryt
abl
est
hecondi
ti
onsoract
ionsr
equi
redar
econt
ainedwi
thi
ntheappr
opr
iat
e
stubs.

Tobui
ltdeci
siontabl
es,t
heanalystneedstodeter
minethemaximum si
zeofthetabl
e;
el
imi
nateanyimpossibl
esit
uati
ons,inconsi
stenci
esorr
edundanci
esandsimpli
fythetabl
eas
muchaspossible.

Deci
siont
abl
eshowscondi
ti
onsandact
ionsi
nasi
mpl
if
iedandor
der
lymanner

Adv
ant
agesOfDeci
sionTabl
e:

 Deci
sionr
ulesar
ecl
ear
lyst
ruct
ured.

 Easyt
ouse.

 Easi
ert
odr
awormodi
fyi
ncompar
isont
ofl
owchar
ts.

 Theypr
ovi
demor
ecompactdocument
ati
on.

 Document
ati
oni
seasi
l
ypr
epar
ed,
changedorupdat
ed.

 Deci
siont
abl
escanbechangedeasi
l
yaccor
dingt
othesi
tuat
ion.

 Deci
siont
abl
essummar
izeal
ltheout
comesofasi
tuat
ionandsuggestsui
tabl
eact
ions.

 Deci
siont
abl
eshav
east
andar
dfor
mat
.

Di
sadv
ant
agesOfDeci
sionTabl
es:

 Deci
siont
abl
esdonotshowt
hef
lowofl
ogi
cfort
hesol
uti
ont
oagi
venpr
obl
em.

 Deci
siont
abl
ecannotl
i
stal
lal
ter
nat
ives.

 Noteasyt
otr
ansl
atei
t.

 I
mposeanaddi
ti
onal
bur
dens.

Pr
epar
edby

Al
okHal
dar
,Assi
stantPr
ofessor
,Khar
agpurCol
l
ege
 Deci
siont
abl
esonl
ypr
esentapar
ti
alsol
uti
on.

Deci
sionTr
ee:

Adeci
siont
reei
sadecisi
ont
ool
thatusesabr
anchi
ngmet
hodt
oil
l
ust
rat
eev
erypossi
ble
out
comeofadecisi
on.

Decisiontreescanbedr awnbyhandorcreatedwi
thagr aphi
csprogram orspeciali
zed
software.Adecisi
ont r
eebeginswit
hasinglenode,whichhavebranchesint
opossi ble
outcomes.Eachoft hoseoutcomesresul
tstoaddit
ionalnodes,
whichbranchof fintoother
possibil
it
ies.Thi
sgivesitatr
ee-l
i
keshape.

Indeci
siont
ree(t
reestructur
e),t
henodesrepr
esent
ingthepl
acewherewepickanattr
ibut
eand
askaquesti
on;edgerepresentstheanswer
stothequesti
onandt
heleavesr
epresentt
heactual
output
.

Deci
siontreesdemonstr
atecause-
eff
ectr
elat
ionshi
ps,
whi
chpr
ovi
desasi
mpl
i
fiedv
iewof
complicat
edprocess.

Basi
cassumpt
ionsf
orcr
eat
ingadeci
siont
ree:

 Att
hebegi
nni
ng,
all
possi
bleseti
stakenasr
oot
.

 Recor
dsar
edi
str
ibut
edr
ecur
siv
elyont
hebasi
sofat
tri
but
eval
ues.

 Or
dertopl
aci
ngat
tri
but
esasr
ootori
nter
nal
nodeoft
het
reei
susedt
odef
inedt
he
pr
obl
em.

I
tdescr
ibesgr
aphi
cal
lyal
lthepossi
bleal
ter
nat
ives,
probabi
li
ti
esandout
comesandi
dent
if
ies
t
hebenefit
sofusi
ngdeci
sionanal
ysi
s.

Thedecisi
ontr
eeisgeneral
lyr
eadf r
om top(r
oot
)tot
hebott
om (
leaves)
.Aquest
ioni
saskedat
eachnodeandtheresponsetothatquesti
ondet
ermi
neswhi
chbranchisfol
l
owednext
.The
predi
cti
onisgi
venbythelabelofaleaf
.

Deci
siont
reescanbedr
awnbyhandorcr
eat
edwi
thagr
aphi
cspr
ogr
am orspeci
ali
zed
sof
tware.

Thegoalofdeci
siontr
eeistocreat
eamodel
thatpr
edi
ctst
hev
alueofat
argetv
ari
abl
e
dependedonthedatafeat
ures.

Deci
siont
reesar
eusedi
noper
ati
onr
esear
chwhi
chhel
pst
oident
if
yast
rat
egyt
oreacht
he
goal
.

I
ndeci
siont
ree,
thesampl
eisspl
i
tint
otwoormor
eset
sbasedonani
nputdat
a.

Pr
epar
edby

Al
okHal
dar
,Assi
stantPr
ofessor
,Khar
agpurCol
l
ege
Ther
ear
etwot
ypesofdeci
siont
ree.

 cat
egor
ical
var
iabl
edeci
siont
ree

 cont
inuousv
ari
abl
edeci
siont
ree.

I
nadecisi
ont
ree,
dat
aty
pei
snev
eraconst
rai
nt;
itcanhandl
ebot
hnumer
ical
andcat
egor
ical
v
ari
abl
es.

Deci
siont
reeshav
enoassumpt
ionsaboutt
hespacedi
str
ibut
ionandt
hecl
assi
fi
erst
ruct
ure.

Adv
ant
agesOfDeci
sionTr
ees:

 Deci
siont
reespr
ovi
deacl
eari
ndi
cat
ionf
orpr
edi
cti
onorcl
assi
fi
cat
ion.

 TheDeci
siont
reeout
puti
seasyt
oreadandi
nter
pret
.

 I
tisabl
etogener
ateunder
standabl
erul
es.

 I
trequi
resr
elat
ivel
yli
tt
leef
for
tfr
om user
sfordat
apr
epar
ati
on.

 Deci
siont
reesper
for
m cl
assi
fi
cat
ionwi
thoutr
equi
ri
ngmuchcomput
ati
on.

 Deci
siont
reescanhandl
ebot
hnumer
ical
andcat
egor
ical
var
iabl
es.

Di
sadv
ant
agesOfDeci
sionTr
ees:

 Deci
siont
reesar
elessappropr
iat
eforest
imat
iont
askswher
ethegoal
ist
opr
edi
ctt
he
val
ueofaconti
nuousatt
ri
bute.

 Theyar
eunst
abl
ebecauseasmal
lchangei
nthest
ruct
ureoft
heopt
imal
deci
siont
ree.

 Theyarerel
ati
vel
yinaccuratewhencompar
edt
oot
herpr
edi
ctor
s.Manyot
herpr
edi
ctor
s
perf
orm bet
terwi
thsimilardat
a.

 Calcul
ati
onscangetv
erycompl
exi
fmanyv
aluesar
euncer
tai
nifmanyout
comesar
e
l
inked.

Pr
epar
edby

Al
okHal
dar
,Assi
stantPr
ofessor
,Khar
agpurCol
l
ege
Di
ff
erenceBet
weenDeci
sionTr
eeAndDeci
sionTabl
e:

BASI
SOFCOMPARI
SON DECISIONTABLE DECI SI ONTREE
Adeci
siontabl
eisat abl
ethat Adeci siont reei sagr aphical
i
ndi
cat
escondi t
ionsandacti
onsin represent ati
onofpossi ble
DESCRI
PTI
ON
asi
mpli
f i
edandor der
lymanner
. solut i
onst oadeci sionbasedon
certai ncondi tions.
Thepur poseofadeci siont ableis Thepur poseofadeci siont reei s
tost ruct urel ogicbygener at i
ng togi veanef f
ect iv
eandeasyway
rulesder ivedf r
om t hedat aent ered t ov isual i
zeandunder standt he
PURPOSE
i
nt het ablei tself. potent i
al optionsofadeci si
ons
andi t
sr angeofpossi ble
outcomes.
Typesofdeci si
ont abl
esar e Ther ear etwot ypesofdeci sion
extendedent ryt ableandl i
mi ted tree; theyi ncludecat egor i
cal
TYPES
ent r
yt abl e. variabl edeci siont reeand
cont inuousv ariabledeci siont ree.
Deci siont ableswi l
l al
wayshav et he Adeci siont reecanhav eone
samenumberofcondi ti
onst hat branchwi thmor econdi ti
onst hat
needt obeev aluat edandact ions needt obeev aluatedthanot her
Condi
ti
ons
thatmustbeper formedev eni ft
he
branchesont het ree.
setofbr anchesbei nganaly zedis
resolv edt ot r
ue.
Adeci siont ablel i
stscauses Eachbr anchoft hedeci siont ree
(busi nessr ulecondi ti
on),whi char e represent sadeci sionopt ion, i
ts
Repr
esent
ati
on represent edt hr ought heuseof costandt hepr obabili
tythati tis
mat rixwher eeachcol umn
l
ikelyt ooccur .
represent sauni quecombi nation.
Eachr owofadeci si
ontable Adecisiontr
eecreatesa
coll
ectsandstoresitsdata comprehensiveanal
ysisoft
he
separatel
yandthencombi nesthe consequencesalongeachbranch
Anal
ysi
s datawi t
haspecifi
corcustomized
andidenti
fi
esdecisi
onsthatneed
templatetogeneratearul
e.
fur
theranaly
sis.

Fl
owchar ts,symbol
sarenotalways Thenodesar eal
ways
st
andardizedandthi
ssomet i
mes standar di
zedandhencet
het
ree
Communicati
on hi
nderstheircommunicat
ionvalue. out
Fl
exi
bili
ty putiseasyt
oreadand
i
nt erpret.

Pr
epar
edby

Al
okHal
dar
,Assi
stantPr
ofessor
,Khar
agpurCol
l
ege

You might also like