This preview shows pages 1–2. Sign up to view the full content.
ISyE 7406, Spring2007
Instructor: KwokLeung Tsui
Assignment # 1 (Solution)
Question 1:
If you use this command ’home
<

read.csv(”hmeq.csv”, na.strings=” ”)’,
you may not be able to get the correct number of rows after removing ”NA”
cells by ’complete.cases’. Use ’home
<

read.csv(”hmeq.csv”, na.strings=””
)’
(no space) instead.
Question 2:
We have
X
0
=
±
x
01
x
02
¶
∼
G
(
μ
0
,
Σ
0
)
, X
1
=
±
x
11
x
12
¶
∼
G
(
μ
1
,
Σ
1
)
where
X
0
is for
y
= 0 and
X
1
is for
y
= 1.
Suppose the new data is
X
=
x
=
±
x
1
x
2
¶
.
Recall that the
Bayes classiﬁer
is
ˆ
G
(
X
) = max
g
∈
G
Pr
(
g

X
=
x
). In this ques
tion,
G
=
{
0
,
1
}
. Therefore, the Bayes decision boundary will be
Pr
(
g
= 0

X
=
x
) =
Pr
(
g
= 1

X
=
x
) = 1
/
2.
Using Bayes rule and
Pr
(
g
= 0) =
Pr
(
g
= 1) = 1
/
2,
Pr
(
g
= 0

X
=
x
) =
Pr
(
X
=
x

g
= 0)
Pr
(
g
= 0)
Pr
(
X
=
x

g
= 0)
Pr
(
g
= 0) +
Pr
(
X
=
x

g
= 1)
Pr
(
g
= 1)
=
1
2
π
k
Σ
0
k
1
/
2
e

1
2
(
x

μ
0
)
T
Σ

1
0
(
x

μ
0
)
1
2
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 11/13/2010 for the course ISE 680 taught by Professor Santanu during the Spring '10 term at Purdue University Calumet.
 Spring '10
 santanu

Click to edit the document details