2017-10-02

Practice Midterm 1 Solutions.

Post the solutions in a comment
Post the solutions in a comment

-- Practice Midterm 1 Solutions
3. Perceptron update rule
  • Correct: Do Nothing
  • False Positive: w = w-x, theta = theta+1
  • False Negative: w = w+x, theta = theta-1
given:
  • w = [1,2,3] theta = 1;
  • x [1,1,1] false positive example
update weights
  • w = [1,2,3] - [1,1,1] = [0,1,2]
  • theta = 1+1 = 2
(Edited: 2017-10-02)
3. <u>Perceptron update rule</u> * Correct: Do Nothing * False Positive: w = w-x, theta = theta+1 * False Negative: w = w+x, theta = theta-1 '''given:''' * w = [1,2,3] theta = 1; * x [1,1,1] false positive example '''update weights''' * w = [1,2,3] - [1,1,1] = [0,1,2] * theta = 1+1 = 2

-- Practice Midterm 1 Solutions
Winnow update rule
The input [1, 1, 1] is a false positive.
Winnow will update w like this -> for each wi in w = alpha^xi * wi
w = [2^-1 * 1, 2^-1 * 2, 2^-1 * 3] = [0.5, 1, 1.5]
(Edited: 2017-10-02)
<u>Winnow update rule</u> The input [1, 1, 1] is a false positive. Winnow will update w like this -> for each wi in w = alpha^xi * wi w = [2^-1 * 1, 2^-1 * 2, 2^-1 * 3] = [0.5, 1, 1.5]

-- Practice Midterm 1 Solutions
7 solution Resource Description for WhatsApp Image 2017-10-02 at 5.03.44 PM.jpeg
7 solution ((resource:WhatsApp Image 2017-10-02 at 5.03.44 PM.jpeg|Resource Description for WhatsApp Image 2017-10-02 at 5.03.44 PM.jpeg))

-- Practice Midterm 1 Solutions
Solution for Q. 7Resource Description for WhatsApp Image 2017-10-02 at 5.03.06 PM.jpeg
Solution for Q. 7((resource:WhatsApp Image 2017-10-02 at 5.03.06 PM.jpeg|Resource Description for WhatsApp Image 2017-10-02 at 5.03.06 PM.jpeg))

-- Practice Midterm 1 Solutions
Solution for Problem 10. (Anish & Ishan)
S-K Update Rule (Non-Kernel Version):
If `vec{x}'_t in X^+'`,
set `vec{w}_2 := vec{w}_2` and set `vec{w}_1 := (1-q) vec{w}_1 + q vec{x}'_t` where `q = min(1, ((vec{x}'_t -vec{w}_2)\cdot(vec{w}_1 - vec{w}_2))/(||vec{w}_1 - vec{w}_2||^2))`
else:
set `vec{w}_1 := vec{w}_1` and set `vec{w}_2 := (1-q) vec{w}_2 + q vec{x}'_t` where `q = min(1, ((vec{x}'_t -vec{w}_1)\cdot(vec{w}_2 - vec{w}_1))/(||vec{w}_1 - vec{w}_2||^2))`
(Edited: 2017-10-02)
Solution for Problem 10. (Anish & Ishan) S-K Update Rule (Non-Kernel Version): If @BT@vec{x}'_t in X^+'@BT@, set @BT@vec{w}_2 := vec{w}_2@BT@ and set @BT@vec{w}_1 := (1-q) vec{w}_1 + q vec{x}'_t@BT@ where @BT@q = min(1, ((vec{x}'_t -vec{w}_2)\cdot(vec{w}_1 - vec{w}_2))/(||vec{w}_1 - vec{w}_2||^2))@BT@ else: set @BT@vec{w}_1 := vec{w}_1@BT@ and set @BT@vec{w}_2 := (1-q) vec{w}_2 + q vec{x}'_t@BT@ where @BT@q = min(1, ((vec{x}'_t -vec{w}_1)\cdot(vec{w}_2 - vec{w}_1))/(||vec{w}_1 - vec{w}_2||^2))@BT@

-- Practice Midterm 1 Solutions
Vasudha, Avinash
Resource Description for WhatsApp Image 2017-10-02 at 17.19.28.jpeg
Vasudha, Avinash ((resource:WhatsApp Image 2017-10-02 at 17.19.28.jpeg|Resource Description for WhatsApp Image 2017-10-02 at 17.19.28.jpeg))

-- Practice Midterm 1 Solutions
Aarish, RahulResource Description for 20171002_171233.jpg
(Edited: 2017-10-02)
Aarish, Rahul((resource:20171002_171233.jpg|Resource Description for 20171002_171233.jpg))

-- Practice Midterm 1 Solutions
Solution to Problem 8: Resource Description for Solution-8.jpeg
Solution to Problem 8: ((resource:Solution-8.jpeg|Resource Description for Solution-8.jpeg))

-- Practice Midterm 1 Solutions
Solution to problem 8
Function should return 1 if not all bits are same Three gates are needed
Gate 1 seperates (0,0,...0) and Gate 2 seperates (1,1,1,...1) Gate 3 is an AND of Gate 1 and Gate 2
Resource Description for Solution-8.jpeg
Solution to problem 8 Function should return 1 if not all bits are same Three gates are needed Gate 1 seperates (0,0,...0) and Gate 2 seperates (1,1,1,...1) Gate 3 is an AND of Gate 1 and Gate 2 ((resource:Solution-8.jpeg|Resource Description for Solution-8.jpeg))
[ Next ]
X