解析R语言编程|辅导留学生Prolog|辅导Python程序|讲解数据库SQL
Aarthi Reddy
April 2, 2018
DEADLINE: April 27th, 2018; 8am
In this mini project you will build a neuron, which you will then use to build a neural
network. Here are the step by step instructions:
1. (10 points) Write a sigmoid activation function. The formula of a sigmoid activation
function is:
f(a) = 1
1 + e?a
(1)
2. (10 points) Write a binary step activation function. The formula of a step function
is:
f(a) = (
0 if a < 0,
1 if a ≥ 0
(2)
3. (20 points) Write a function to depict the input to a neuron:
In = b +
X
i
wixi (3)
4. (30 points) You can now create a neuron by including the activation function within
it. For example, a neuron with a sigmoid activation function will look like this:
f(In) = 1
1 + e?In ; (4)
where In is shown in Equation 3. Create a neuron with binary step function and
a neuron with sigmoid activation functions.
5. (30 points) You will use the neuron with the binary step function you created above
to build a xor neural network. The bias and weights for every input to each neuron
is indicated in the diagram. Refer to the lecture notes for help. Do not create a
1new function for every neuron, you will need to call just one function created in 4
multiple times. .
Test the neural network by providing it 4 different input sets: {1,1}, {0,1}, {1,0}
and {0,0}. The output should be 0, 1, 1, 0.
2