2
$\begingroup$

Thanks for reading.

I'm currently reading Tom Mitchell's Machine Learning (I'm a beginner into ML), and I'm on chapter 4 about perceptrons. I'm really confused about this paragraph:

enter image description here

I understand the AND but I'm still not so sure how OR can be represented.

For example, if the inputs are:

$X_1 = +1$

$X_2 = -1$

In that case, using his logic for OR we would end up with the perceptron actually outputting -1, because:

$1*0.5 + -1*0.5 - .3 = -.3$

The function would give us a negative number. Is he wrong about the OR function? How would a single perceptron act as an OR?

Thank you!

$\endgroup$
3
  • 1
    $\begingroup$ I agree with your logic. However, notice that even if the value of -0.3 is mistyped, the construct is still possible. Consider setting w_0=0.3 in order to achieve the desired OR effect. $\endgroup$
    – mapto
    Dec 17, 2018 at 16:43
  • $\begingroup$ @mapto that makes sense, he just messed up the sign. Thank you! On a completely different note, do you happen to know if the book mentioned above is a good book for learning, or have any recommendations? $\endgroup$ Dec 17, 2018 at 17:15
  • 1
    $\begingroup$ I'm sorry, I can't help. Notice, however, that Mitchell's book is more than 10 years old and the field has developed a lot. Unless there is a new updated edition, I'd prefer something more recent. $\endgroup$
    – mapto
    Dec 18, 2018 at 8:05

1 Answer 1

1
$\begingroup$

I interpret it as the input takes binary value $0$ (false) and $1$ (true) while the output take $-1$ (false) and $1$ (true).

The map is $$sign\left(\sum_{i=1}^nw_ix_i+w_0\right).$$

If we let $w_i=0.5, i \ge 1$, then we have the mapping rule to be

$$sign\left(\frac12\sum_{i=1}^nx_i+w_0\right).$$

For the AND operator, if we set $w_0=-0.8$, for it to take positive value both $x_i$ has to be $1$.

For the OR operator, if we set $w_0=-0.3$, we just need one of them to take positive value for it to be true.

$\endgroup$
1
  • $\begingroup$ Siong you're awesome. I'm just going to tag you in a comment now every time I ask a question!! $\endgroup$ Jan 23, 2019 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.