Description
23. Using any software or language of your choice, plot the decision boundary for an ANN with
two inputs, two hidden units and one output. All activation functions are sigmoids. Each
layer is fully connected to the next. Assume the inputs range between −5 to 5 and fix all
activation thresholds to 0. Plot the decision boundaries for the weights except the thresholds
randomly chosen between (i) (−10,10), (ii) (−3,3), (iii) (−0.1,0.1) (one random set for each
case is enough). Use your plots to show that weight decay can be used to control overfitting
for ANNs.
24. Suggest modifications for backpropagation for non-feedforward neural network structures if
edges are allowed between nodes in the same layer as well as between successive layers, but
the graph is still directed acyclic. In other words, nodes in layer k, xk1,xk2,…,xkn can have
edges between them as well as to the k+1 layer, as long as no cycle is created.
The Bayesian Candy Factory makes a Halloween Candy Box that contains a mix of yummy (Y)
and crummy (C) candy. You know that each Box is one of three types: 1. 80% Y and 20% C, 2.
55% Y and 45% C and 3. 30% Y and 70% C. You open a Box and start munching candies. Let
the i
th candy you munch be denoted by ci. Answer the following questions using a program
written in any language of your choice. Generate one Box with 100 candies for each type, and
assume a fixed order of munching.
25. For each Box, plot Pr(T=i|c1,…,cN) on a graph where T represents a type and N ranges from 1
to 100. (You should have three graphs and each graph will have three curves.)
26. For each Box, plot Pr(cN+1=C|c1,…,cN) where N ranges from 1 to 99.
27. Suppose this is 2020, so before opening a Box you believe that each Box has 70% crummy
candies (type 3) with probability 0.8 and the probability of the other two types is 0.1 each.
Replot Pr(T=i|c1,…,cN) taking this belief into account for each of the 3 Boxes. Briefly
explain the implications of your results.