Description
1 Perceptron [10 pts] (Write your answer in the quiz at CCLE)
1.1 [5 pts]
Design (specify w for) a two-input perceptron (with an additional bias or offset term) that computes
the following boolean functions. Assume T(rue) = 1 and F(alse) = −1.
[AND]
x1 x2 y
−1 −1 −1
−1 +1 −1
+1 −1 −1
+1 +1 +1
(a) w = (−1, 1, 1)
(b) w = (−1, 0.5, 0.6)
(c) Both (a) and (b)
(d) No solution is possible
1.2 [5 pts]
Design (specify w for) a two-input perceptron (with an additional bias or offset term) that computes
the following boolean functions. Assume T(rue) = 1 and F(alse) = −1.
[XOR]
x1 x2 y
−1 −1 −1
−1 +1 +1
+1 −1 +1
+1 +1 −1
(a) w = (−1, 1, 1)
(b) w = (−1, 0.5, 0.6)
(c) Both (a) and (b)
(d) No solution is possible
2 Logistic Regression [10 pts] (Write your answer in the quiz at
CCLE)
Consider the objective function that we minimize in logistic regression:
J(w) = −
X
N
n=1
yn log σ
wTxn
+ (1 − yn) log
1 − σ
wTxn
Find the partial derivatives ∂J
∂wj
. (Note, wj is the j-th element of the weight vector w.