Machine Learning Basics

Which logic function cannot be represented by a simple perceptron consisting only of input and output layers (a single neuron that outputs 0 or 1 with a threshold)?

  1. AXOR
  2. BAND
  3. COR
Show answer and explanation

Answer: A. XOR

A simple perceptron decides its output by whether the weighted sum of its inputs exceeds a threshold, so it can only divide the input space in two with a single straight line (hyperplane). AND and OR can separate the points with output 1 from those with output 0 by a straight line, but XOR gives 1 at (0, 1) and (1, 0) and 0 at (0, 0) and (1, 1), which a single straight line cannot separate. A multilayer perceptron, with a hidden layer in between and a nonlinear activation function, can represent XOR as well.

  • A. Correct. XOR cannot be separated by a single straight line (it is not linearly separable), so a simple perceptron cannot represent it.
  • B. For example, weights of 1 and 1 with a threshold of 1.5 represent AND.
  • C. For example, weights of 1 and 1 with a threshold of 0.5 represent OR.
Practice this topic Back to topic

Related calculators

Books on Machine Learning Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Machine Learning Basics questions

  1. In a three-class classification, the values input to the softmax function (logits) are 3, 1 and 0. About how many times the second class's output (probability) is the first class's output? Which is closest?
  2. A small neural network with inputs x₁ = 1 and x₂ = 2 has two hidden neurons h₁ = ReLU(x₁ + x₂ − 1) and h₂ = ReLU(x₁ − 2x₂ + 1), and output y = 2h₁ + 3h₂ + 1. What is the value of y?
  3. Let p be the probability that a model outputs for the correct class. Which of the following describes the cross-entropy loss −log p used to train classifiers?
  4. In gradient descent, the gradient of the loss ∂L/∂w at weight w = 2.0 is 0.5 and the learning rate is 0.1. What is the weight after one update?
  5. When the derivative dy/dx of y = (2x + 1)² at x = 1 is found by the chain rule with u = 2x + 1 and y = u², which value is correct?