0% found this document useful (0 votes)
14 views11 pages

Module 2 Problems

Uploaded by

shurajsunil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

Module 2 Problems

Uploaded by

shurajsunil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Machine Learning 1 5CS73 VTU B.

E CSE 7'hSemester

MODULE 2

!r. Give Decision trees for the following set of training examples

Day Outlook Temperature Humiditv llind PlavTennis


D1 Sunnv Hot Hish Weak No
D2 Sunnv Hot Hish Strong No
D3 Overcast Hot Hieh Weak Yes
D4 Rain Mild Hieh Weak Yes
D5 Rain Cool Normal Weak Yes
D6 Rain Cool Normal Strong No
D7 Overcast ' Cool Normal Strong YeS
D8 Sunnv Mild Hieh Weak No
D9 Sunnv Cool Normal Weak Yes
D10 Rain Mild Normal Weak Yes
Dl1 Sunny Mild Normal Strons Yes
Dt2 Overcast Mild Hieh Strons Yes
D13 Overcast Hot Normal Weak Yes
Dt4 Rain Mild Hieh Strone No

fi"twn
-----
!* :,

ie Ent:opV(s) =
;,,t,,:p6,bj, t, ""'-, ?.b\r?,
lcl Entanp,trCsu)
Cfurr" [S,R)"* 6nt-f; Cs) . . -lf,i
lifl 'u
'-
ve l/alu,rCo)

,,,ft{'&,,,,,

O,, ffi, S.TJ r^lnwb$t


S S ,*ory Jn +t* ,twrr{ri." dail.
+htnn e
,,,,:' I P:l Cs)' o
,,,,

@q, AS C.lrr\tar/{\4 Un qwl ru,vnhat


% W1IW
tund *W ar\Wyy,pW l},*r,

Engg. College, Mangaluru q


Machine Learning I 5CS73 VTU B.E CSE 7'hSemester

{F {t,
t" )q 'a Jb
N -1f., &prnolt nodr t 4?*
dJil$frn flr. ID3 d.fi:nilnu +h.
'ff[ornMlfrn
N
F u1th AnNDv-fL , +hen $iltrk +hc ww, wth Wfl*
r'nfrrnnrion N , ;.;;:,.1;;,,

+ €nfrop,g o5 S ,
-. porirux >r.^*y\tl e
?L
*?rr*
,:.:.:::

wn w1,u4.- 0$.'ll ,,,,,,,,,,,,,,,,::::::

Deepak D, Asst.P.o$lor, D.pl. gf CS&E, CanaruEngg.College, Mansaluru ' |0


Machinc l-carnitrg | 5('S7.i VTU B.E CSE 7'h Semester

i O Ahrop, Csr,ny) = -C) bJ,H e) hJ,C)


- Q"* * (-t'32r0) - t0 .g * t 0.756r)
0"178+6 t o. ttzt+
o.q?o
@ cntropl (s rvo,**) = 0 (0,^",1, q^t

n\^^.
Ai -
gX1 Ywxrvb
|
tll'
o-^ ftwrs
0n oI It
h,hnfi F, rrv^tv-
/Wtvr- ;:,

€ritrorytspr^)" bl,t+)
C) Hbl,k)
-- - (0,e r
f o. ?360 - @"+ * [- t'a zrr)
= 0. 4+zt4 t 0.YIS}S a
: 0, Qto
t- 0 f
Fr- r,

(r"qrc)' lk)" o,q?oq


Fdo-q+o{
,:,:t::tr
i:;, .,):,:

.::::::
$; $:r$P1,;:
.::::

r dj"t#6it 0,3+6?]

\
J
- 0,2+6
[s , T*p,mlrr$ - 0.02q
lia,1,;,,ii

Qon
q,li,'n (t, +t"*ri&) " 0" [S I

qtrin
[S, wirvl) = 9' 02Q
So W vwde- v,JA b. 0@
Decpak D, Asst. ProfegsolQgg! o].CS&F., Canara Engg. College,
Man w
Machine Learning I SCS 73 VTU B.E CSE 7'hSemester

ilny OVdlUrt' W
\
Ip,, Dz, D8, lku'\ t*l ,, 5 P+ ,Ds ,DG ,Dto,D t4J

lrn, 3J Dtl, Dl3] [a+ 14,,-;,,,,,,

t4t' oJ
,/ j
ur-ti/l A-fu*ufit %o*M be, IqI^P) tux"
rl
qF,
Srny ' f D', Dr, Dt ,D1, DrlJ
tt:

Q*^ [Suno6, tl*nn id,&). o.q]o - t$l * 0 0 + @',.'7


l, ,t;"':t:;.=W
It fn
qwt^n (9.nni , Trna = o"qlo-[[r.)-o r
fz\
(?J,-' r[+) {
0'qlo - O.+
= g, f?t
QM' (sunn1 ,,rr,n{' 0.gto -f FrXo,qrr)
*&).j
F
= O,q?d 0,q sog
.e 0. jlqL

So, &tr jl *,8, flurnrai,lf vvJ/.i bt. fuX,tmdm,,^r


nod-L.
D, Asst. Professor, Dept. of CS&E, Canara En College, Mangaluru r.{,
Machine Learning 15CS73 VTU B.E CSE 7'hSemester

Enhr0p,[sr*,^^) = (+)bj,[+)- t?) 6J]A


=09
11 fn \ et- \ i ^^ Crn\-- ,[:
qorm
U/effn,
Ttre"up..rnnue) - 0 . q?o -
[
grj * o +,C)- e' c { I (

t ej-j
z g-glJ!

ej-'*[''),,{
,,,,,-- gY-"t"'"'

Q-i^ W, fiurnjdirj) = o,qt-[t{'*r+ t+)*o"1ti


t
. o"olqtr
---.......------.-'
.l-
c^ 'lA
)0 , |l"i..rlko
| rf. lM/Ofrn
^r ^^^.-,{i'n
"I'- tl,tfor t An)r^
tqwt I We Ah*A'rt
\
t '*
t Y\r!g't v
U
U

W, t^li^oj

DeepakD,Asst.Pro@Engg.College,Mangaluru |1
Machine Learning I 5CS73 VTU B.E CSE 7'hSemester

So, +f* {.'no,\ Mtt A

OVut"o.r
zry I

Y$

t4' f frlolmol wrok

I
Al0 Ja
\ )'n
FU..........l'.l \.

D, Asst. Professor. . of CS&E, CanaraEngg.College, Mangaluru W


Machine Learning 1 5CS73 VTU B.E. 7rh Semester
s9-, Consider the following set of training examples.
a) What is the entropy of this collection of training example with respect to the target
function classifi cation?
b) What is the information gain of urcIative to these training examples?

Instance Classification a1 u
I + T T
2 + T T
a
J T F
4 -r F F
5 F T
6 F T

*) pOSiltut

AI,{ i".

€nfroryG)=.etr Mtrtt P
tz;bu,G)
Fnl'ro A{9=

b+,.e,n '+fur- 0,t' en,Jtil q" tV' q -(t


TU ^u/Y(\ba
iru,torn&/ , -{hqrn
F. I
0 N"rop C€) = |

l, f:
Deepak D, Asst. Professor, Dept. of CS&E, Canara . College, Iuru
' r'd.h,n. l s('s7.t
-l..r*i,lg
,nl F f.., \ f- '
b) Qa^(O,ar)' €nty,tJcs)- E^frotqtst) +
L+
LnwryG'[
?
ii:,::
i::i
i rt'l
"u

0 wo?l,es|= *(HrS,H-G) bau;


= -t- 6

e Effiopv(s r)' - W) q,W) - WYq,?)


=-) )-
--1
:

,,, ,,:t t

;t'
t
I-,\
tt5 l-
('
+
^
f0 + +('x
,.;' b
;t:::

Deeirak D, Asst. Professor, Dept. ol.CS&E, Canara


Enge. Col Mangaluru tb
Machine Learning 1 5CS73 VTU B.E CSE 7'hSemester

3. C1lv. dw*cn h"il "Eo ryktlx\L W Jtlnw|,^t6 Eoltrr'"


J
' i) A qe -'B
hr^,fist

i') F v [r q& cJ
'.\ s.
ii,) .XoR -B

irl) ts qq Bl v [c q+ DJ
l**"
-:::-

ff,9 -1.,.:'$ -A 4{- rE


T lr 'r FT'
T I r, T T [+) F
FI C....
:,::*-

F ,,,,,,,..[ p
|*,
r (-)
T FL-)

Deepak D, Asst. Professor, . of CS&E, CanaraEngg.College, Mangaluru l'1


Machine Learning I 5 CS 73 VTU B.E CSE 7'hSemester

fi vfs \ac
F v [s 41c]
T T T T T
T T F F T
T F T
T F
F T
F F
T T
F T T T
F T F r F
F F T F
r
F F F F F

0?.

F B A rlt- B
T T r
T F T
F T T
? ? F

Deepak D, Asst. Professor, Dept. of CS&E, Canara


College, Mangaluru l/
Machine Learning I 5CS73 VTU B.E CSE 7'hSemester

iv) [n +*BJ vG v +DJ

A B C D A&&B C &&D (A&&B)v(C&&D)


T T T T T T T
T T T F T F T
T T F T T F T
T T F F T F T
I F T T F T T
T F T Fr' F F F
T F F T F F F
T F F F F F F
F T T T F T T
F T T F F F F
F T F T F F F
F T F F F F F
F F T T F T T
F F T F F F F
F F F T F F F
F F F F F F F

Deepak D, Asst. P.o@a Engg. College, Mangaluru


lLl

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy