``` Lecture 7 – Assignment 7 – The Perceptron Part 1

  1. Explain a perceptron algorithm. It is the simplest type of artificial neural network (ANN). It is a model of a single neuron that can be used for two-class classification problems and provides the foundation for later developing much larger networks.

2.Fill-in-the-blank: The perceptron receives input signals from examples of ________ _________ that we weigh and combine in the activation. Training data

  1. Explain the information processing of a neuron. A neuron accepts input signals via its dendrites, which pass the electrical signal down to the cell body

  2. Fill-in-the-blank: A perceptron is a _________ ________ that is applied on top of all of the features, with bias added at the end of the calculation. Linear combination

  3. What do we call the process, or instant, where the output from a perceptron is passed to an activation function, and then passed to another perceptron? Multilayer perceptron

  4. What are the procedures for the training process for a neural network (NN)? forward propagation, and backward propagation

  5. Fill-in-the-blank: In the multilayer perceptron process, the activation is transformed into a prediction using a ___________ . Transfer function

  6. What is the relation between the perceptron classification algorithm for problems with two classes and a linear equation. The classification algorithm for problems with two classes (0 and 1), where a linear equation (like a line or a hyperplane) can be used to separate the two classes.

  7. How are the weights of the perceptron algorithm estimated from your training data? It uses stochastic gradient descent

  8. How does the perceptron algorithm update the weights? For each iteration of gradient descent, the weights (w) are updated using the following equation: w = w + learning rate × (expected – predicted) × x

  9. Yes or No: Will a weight be updated for an iteration of stochastic gradient descent if no input is available? No

  10. What are the three steps to take to implement and apply the perceptron algorithm to your classification predictive modeling problems? making predictions training network weights

  11. Fill-in-the-blank: When the function, predict( ), predicts an output value for a row, what is the first weight taken? it is the bias as it is standalone and not responsible for a specific input value.

  12. Look at the statement below: “Prediction = 1.0 if activation >= 0.0 else 0.0.” What kind of function does it represent? Transfer function

  13. Run the Ghemri.csv dataset (given to you a while back) as your small contrived dataset through this model to test the perceptron algorithm. Then make predictions on this contrived dataset. Use three weights to accompany the three inputs. The weights should be W1 = -0.314;
    W2 = 0.234; W3 = -0.21. Remember that your Y feature contains the 0s and 1s.

  14. Explain the statement “activation = weights[ 0 ]” The function initializes activation with the bias weight (weights[0])

  15. Once our predict( ) function has passed the predictions that match the expected output values, what should we do next? Next implement the stochastic gradient descent to optimize our weight values

  16. Fill-in-the-blank: We can estimate the _________ _______ for our training data using stochastic gradient descent. Weight values

  17. What two parameters does the stochastic gradient descent require? Learning rate and epoch

  18. Fill-in-the-blank: We update each weight for each row in the _______ _______ , each epoch. Training data

  19. Explain how we go about calculating the error. It is the difference between the expected output value and the prediction made with the candidate weights

  20. List the function we use to update the weights when training network weights. Train weight function

  21. List the parameters of the train_weights( ) function. Learning Rate and Epochs

  22. In the Sonar Case Study, what do we use the k-fold cross-validation for? to estimate the performance of the learned model on unseen data.

  23. In the Sonar Case Study, what do we use the functions, predict( ) and train_weights( ), for? to train the model and a new perceptron( ) function to tie them together.

  24. What are the parameters for the Perceptron model in Listing 10.8? Learning rate = 0.01 and epoch = 500