deck_15595778 Flashcards
(46 cards)
What is a perceptron?
What does it do?
- an artificial neuron that can be used for binary classification
- it receives an input signal through weighted connections, sums up the total of those inputs to compute its activation level, and “fires” by outputting a 1 if the total input exceeds a given threshold. Otherwise, it outputs a 0.
What happens during training of a perceptron?
During training, a series of small adjustments is made to the connection weights and threshold using the perceptron’s learning rate.
Where do the inputs to the perceptron in a classification task come from?
the inputs are the feature values, and the output is the classification label
What happens during the training phase if the output of the perceptron is wrong?
the threshold and the weights are adjusted according to the learning rate
Output was 0, target was 1
what happens to the threshold and weights?
raise the threshold
lower the weights
ignoring the inputs that are 0
Output was 1, target was 0
what happens to the threshold and weights?
lower the threshold
raise the weights
ignoring the inputs that are 0
What type of classifier is a perceptron?
Linear classifier
They create a straight-line decision boundary in the feature space.
They will only succeed (converge) if the data is linearly separable.
What does it mean to train a perceptron
finding the coefficients for a linear equation
coefficients are the connection weights
What are the differences between the Perceptron learning algorithm and Stochastic Gradient Descent
- both can be used for classification
- SGD finds an optional solution based on a loss function that aims to ‘center’ the decision boundary between the classes
- the Perceptron learning algorithm will find a solution if it exists, but not necessarily the best solution
what is the Perceptron Learning Algorithm
- initialize the weights (ws), threshold (t), and learning rate (lr)
repeat until done
for each training example (xs, target)
compute perceptron output using sum(ws * xs) > t?
if output < target
for each (w, x) in (ws, xs)
w = w + x * lr
t = t – lr
else if output > target
for each (w, x) in (ws, xs)
w = w - x * lr
t = t + lr
Initialize the Weights and Threshold of a perceptron
why is starting with random weights useful in a multi layer perceptron
is useful because depending on where you start, you might converge on a better or worse solution.
When do we stop repeating the perceptron Learning Algorithm
- after a set number of epochs, or
- when the perceptron reaches a high level of accuracy, or
- when the perceptron hasn’t improved its accuracy in a while, or
- some other method or combination of methods.
when adjusting the weights of a perceptron Learning Algorithm, why do we normalize the data?
normalize the data before training so that the weights are all adjusted at about the
same rate.
what is Randomized Presentation in a perceptron Learning Algorithm
you can randomize the presentation order of each example during an epoch instead of presenting them in the same order.
This can stop the network getting stuck in a suboptimal solution (especially with more complex Multi-Layer perceptrons)
what is Batch Learning in a perceptron Learning Algorithm
instead of updating after every example, you can compute the output of the entire batch of examples in the training set, and then update the weights only once per epoch based on the outputs that were
wrong
- this lets you write very short code with numpy and might prevent the network getting stuck in a suboptimal solution
What is the bias of a perceptron
a parameter called bias is a weighted connection to an input that is always set to 1 for every example, then it is updated along with the other weights.
Mathematically, using a bias is the same as using an adjustable threshold
the bias is the same as the negation of an adjustable threshold
How can you overcome the limitation that a perceptron can only converge on a solution if the data is linearly separable?
use a multi layer perceptron
What is a multi-layer perceptron (MLP)?
A MLP is a network of artificial neurons in layers. An individual neuron is similar to a perceptron
What does each neuron do in a MLP?
accumulates input from the weighted connections and produces an output using an activation function
Why are MLPs sometimes referred to as feedforward networks
because activation always goes in one direction from input layer to output layer
What are MLPs with larger number of hidden layers called?
Deep networks
Training a deep network is referred to as deep learning
What makes a network full connected (or dense)
each unit is connected to every neuron is the previous and next layers
Can multi layer perceptron classifiers learn a decision boundary of any shape?
Only if you have the right configuration of hidden layers, the right activation function, luck in choosing the random starting weights, and enough time / computational power to complete the training
if the configuration isn’t right, it might never converge
What is the limitation of the output neurons of an MLP?
they’re limited to linear combinations of the output from the previous layer.