1.
Consider the following scenario for object recognition with two types of objects,
A
and
B
where the ultimate
goal is to build a system that can recognize which of the two object types is present in front of a camera. To
recognize the objects we make observations of 5 different properties of the objects,
shape
,
color
,
size
,
texture
, and
labelin
g
. Here we measure
shape
as either
round
or
square
,
color
as
red
or
blue
,
size
as
small
,
medium
, or
large
,
texture
as
uniform
or
striped
, and
labeling
as
labeled
or
unlabeled
.
Making observations of the two object types, we find the following:
Of all
the objects,
70%
are of
type A
and
30%
of
type B
.
80%
of objects of
type A
are
large
,
10%
are
medium
, and
10%
are
small
. Also,
40%
are
red
while
60%
are blue. Of objects of
type B
,
30%
are
large
,
50%
are
medium
, and
20%
are
small
. Similarly,
80%
are
red
while
20%
are
blue
. For both object types there
is no dependence between their size and their color.
Of all the the
small
objects,
75%
are
round
while of the
medium
objects only
35%
are round and only
10%
of the
large
objects. The texture depends on the
co
lor
and
the
size
where the probability of a
uniform
texture is
30%
for
small
and
red
objects,
10%
for
small
and
blue
objects,
75%
for
medium
and
red
objects,
40%
for
medium
and
blue
objects,
90%
for
large
and
red
objects,
and
60%
for
large
and
blue
objects
. The likelihood of labeling on the objects is related to the texture and the
shape. In particular,
80%
of all
square
and
uniform
objects,
40%
of the
round
and
uniform
objects,
30%
of all
square
and
striped
objects, and
10%
of
all
round
and
striped
objects have labeling.
a)
Construct a Bayesian Network for the object recognition scenario that encodes the
information we have about the objects (you can assume that only the direct dependencies listed above
are present). Provide the structure of the network as well as the conditional probability tables.
b)
To perform object recognition with the network we woul
d set the observations that we made and then
infer the conditional probability of the different object types. Derive the probability of object type
A
given that we observe that the object is
unlabeled
,
small
, and
red
. Similarly, derive the probability of
o
bject type
A
given that we can observe that the
object is
striped
, and
large
.
c)
Using the network we can also infer properties of the objects that we could not observe before. Infer
the probability of an object being
labeled
given that it is
blue
and
round
. Also compute the prior
probability of an object being
labeled
.
d)
Bayesian Networks are not unique and can be rearranged into a different structure that nevertheless
represents the same joint probability distribution. For the network in a), build an equivalent network in
which the node for object
type
is a leaf node. In
particular, build a network with the node order
shape
,
color
,
size
,
texture
,
labeling
,
type
, where the order indicates that only nodes earlier in the list can be
parents to nodes later in the list. You should derive both the new structure and the new condi
tional
probability tables.
2.
Monte

Carlo simulations can be used to solve expected value problems.
a)
Implement random sampling from the exponential distribution and use Monte

Carlo simulation to
compute the
mean
,
variance
and
skewness
of the exponential distribution with
λ
= 0
.
5
. Show your
estimates after 10, 50, and 100 samples.
b)
Use Monte

Carlo simulation to visualize the central limit theorem by simulating the distribution of the
means from the exponential and uniform distribution. In particular, for each of these original
distributions sample averages over 5, 15, and 30 samples
by drawing the corresponding number of
samples and computing their average. Repeat this 100 times and plot the histograms of the resulting
distributions of the means.
Comments 0
Log in to post a comment