Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function a = perceptron(W, b, p)
- % perceptron
- %
- % Implementation of a single-neuron perceptron.
- % W is a weight matrix of one row.
- % b is a bias scalar.
- % p is an input vector.
- % All vectors are expected to be in row format.
- % Output is a single scalar value.
- %==================================================================
- n = W*p' + b;
- a = hardLimitTransfer(n);
- end
Advertisement
Add Comment
Please, Sign In to add comment