One of the main drawbacks of the perceptron algorithm is that it's only able to capture linear relationships. An example of a simple task that it's not able to solve is the logic XOR. The logic XOR is a very simple function in which the output is true only when its two pieces of binary input are different from each other. It can be described with the following table:
X2 = 0 | X2 = 1 | |
X1 = 0 | False | True |
X1 = 1 | True | False |
The preceding table can be also represented with the following plot:
The XOR problem visualized
In the XOR problem, it's not possible to find a line that correctly divides the prediction space in two.
It's not possible to separate this problem using a linear function, so our previous perceptron would not help here. Now, the decision boundary in the previous example was a single line, so it's easy to...