1. Home
  2. Explore
  3. Computer Science
  4. Perceptron Coding Challenge

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Perceptron Coding Challenge

  • 15Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Perceptron Fundamentals

Who invented the perceptron and in what year?

15 questions

  1. 1

    Who invented the perceptron and in what year?

    1. A

      Geoffrey Hinton in 1986

    2. B

      Alan Turing in 1950

    3. C

      Frank Rosenblatt in 1957

    4. D

      Marvin Minsky in 1969

    Correct answer
    C

    Frank Rosenblatt in 1957

    Explanation

    The perceptron was invented by Frank Rosenblatt in 1957 at the Cornell Aeronautical Laboratory.

  2. 2

    What is a perceptron?

    1. A

      A hardware device for parallel computing

    2. B

      A multi-layer neural network used for deep learning

    3. C

      The simplest model of an artificial neural network, representing a single neuron

    4. D

      A type of recurrent neural network

    Correct answer
    C

    The simplest model of an artificial neural network, representing a single neuron

    Explanation

    A perceptron is the simplest artificial neural network, modeled as a single neuron with inputs, weights, an activation function, and an output.

  3. 3

    In the perceptron algorithm, how is the weighted sum computed?

    1. A

      Sum of weights divided by number of inputs

    2. B

      Average of inputs multiplied by weights

    3. C

      Product of all inputs and weights

    4. D

      Sum of each input multiplied by its corresponding weight

    Correct answer
    D

    Sum of each input multiplied by its corresponding weight

    Explanation

    The weighted sum is ∑i(inputi×weighti)\sum_{i} (\text{input}_i \times \text{weight}_i)∑i​(inputi​×weighti​).

  4. 4

    What activation function is used in the simple perceptron described in the video?

    1. A

      The ReLU function

    2. B

      The tanh function

    3. C

      The sigmoid function

    4. D

      The sign function

    Correct answer
    D

    The sign function

    Explanation

    The activation function is the sign function: returns +1 if the weighted sum is ≥0\geq 0≥0, otherwise -1.

  5. 5

    What are the possible output values of the perceptron with the sign activation function?

    1. A

      +1 and -1

    2. B

      Any real number between -1 and 1

    3. C

      0 and 1

    4. D

      Only 0

    Correct answer
    A

    +1 and -1

    Explanation

    The sign function outputs +1 for non-negative input and -1 for negative input.

  6. 6

    What is the purpose of supervised learning in training a perceptron?

    1. A

      To reduce the number of inputs

    2. B

      To find patterns without labeled data

    3. C

      To adjust weights using known correct answers

    4. D

      To initialize weights randomly

    Correct answer
    C

    To adjust weights using known correct answers

    Explanation

    Supervised learning uses known correct answers (targets) to compute the error and adjust weights.

  7. 7

    How is the error calculated in the perceptron training algorithm?

    1. A

      Absolute difference between target and guess

    2. B

      Target minus guess

    3. C

      Weighted sum of inputs

    4. D

      Guess minus target

    Correct answer
    B

    Target minus guess

    Explanation

    The error is defined as error=target−guess\text{error} = \text{target} - \text{guess}error=target−guess.

  8. 8

    What is the formula for updating a weight in the perceptron learning algorithm?

    1. A

      weight=error×input\text{weight} = \text{error} \times \text{input}weight=error×input

    2. B

      weight=weight+learning rate×input\text{weight} = \text{weight} + \text{learning rate} \times \text{input}weight=weight+learning rate×input

    3. C

      weight=weight×error×input\text{weight} = \text{weight} \times \text{error} \times \text{input}weight=weight×error×input

    4. D

      weight=weight+error×input×learning rate\text{weight} = \text{weight} + \text{error} \times \text{input} \times \text{learning rate}weight=weight+error×input×learning rate

    Correct answer
    D

    weight=weight+error×input×learning rate\text{weight} = \text{weight} + \text{error} \times \text{input} \times \text{learning rate}weight=weight+error×input×learning rate

    Explanation

    The delta weight is Δw=error×input×learning rate\Delta w = \text{error} \times \text{input} \times \text{learning rate}Δw=error×input×learning rate, then added to the old weight.

  9. 9

    What is the role of the learning rate in perceptron training?

    1. A

      It sets the initial values of the weights

    2. B

      It determines the number of training epochs

    3. C

      It defines the activation function

    4. D

      It controls how much the weights are adjusted during each update

    Correct answer
    D

    It controls how much the weights are adjusted during each update

    Explanation

    The learning rate scales the weight update to avoid overshooting or slow convergence.

  10. 10

    Why is a bias input needed in a perceptron?

    1. A

      To reduce the number of training examples needed

    2. B

      To increase the number of weights

    3. C

      To make the activation function non-linear

    4. D

      To allow the perceptron to classify inputs when all inputs are zero

    Correct answer
    D

    To allow the perceptron to classify inputs when all inputs are zero

    Explanation

    When all inputs are zero, the weighted sum is zero regardless of weights, so a bias (constant input of 1) provides a learnable offset.

  11. 11

    What is the constant value of the bias input in a perceptron?

    1. A

      1

    2. B

      0

    3. C

      The number of inputs

    4. D

      The learning rate

    Correct answer
    A

    1

    Explanation

    The bias input is always 1, allowing the associated weight to act as a threshold or y-intercept.

  12. 12

    What is a major limitation of a single perceptron?

    1. A

      It cannot handle more than two inputs

    2. B

      It can only solve linearly separable problems

    3. C

      It cannot perform supervised learning

    4. D

      It requires a very large learning rate

    Correct answer
    B

    It can only solve linearly separable problems

    Explanation

    A single perceptron can only classify data that is linearly separable; it fails for problems like XOR.

  13. 13

    In the video, what scenario is used to demonstrate the perceptron's classification?

    1. A

      Recognizing faces in images

    2. B

      Predicting stock prices

    3. C

      Classifying points above or below a line y=xy = xy=x

    4. D

      Classifying handwritten digits

    Correct answer
    C

    Classifying points above or below a line y=xy = xy=x

    Explanation

    The video uses a 2D space divided by the line y=xy = xy=x, with points above labeled +1 and below labeled -1.

  14. 14

    What is the first step inside the perceptron's guess function?

    1. A

      Compute the weighted sum of inputs

    2. B

      Update the weights

    3. C

      Apply the activation function

    4. D

      Compute the error

    Correct answer
    A

    Compute the weighted sum of inputs

    Explanation

    The guess function first computes the weighted sum ∑(inputi×weighti)\sum (\text{input}_i \times \text{weight}_i)∑(inputi​×weighti​).

  15. 15

    What does the training function do besides computing the guess?

    1. A

      It randomizes the weights

    2. B

      It visualizes the decision boundary

    3. C

      It computes the error and adjusts the weights

    4. D

      It only computes the guess without changes

    Correct answer
    C

    It computes the error and adjusts the weights

    Explanation

    The train function calls guess, then computes error (target - guess) and updates each weight by error×input×learning rate\text{error} \times \text{input} \times \text{learning rate}error×input×learning rate.

Question 1 of 15
Question 1 of 15

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent