-1

How do I compute the weights of a neural network by hand if I have the training samples (X) and desired output (D), and I shall have one node in the output layer and sign as the activation function in the hidden layer as well as in the output layer.

X = -1.6 -1.4 -1.2 -0.8 -0.4 0 0.3 0.7 0.9 1.1

D = -1 -1 -1 1 1 1 1 -1 -1 -1

enter image description here

helloRebecca
  • 107
  • 1
  • 5

1 Answers1

0

A neural network with 1 input and 1 binary output is just a combination of sigmoid functions. Imagine some sigmoid functions on the X axis. Some go from 0 to 1 and some from 1 to 0, and they might be skewed to the right or left. They might be more or less steep. These characteristics are all expressible in terms of the weight and bias for each sigmoid curve.

To solve the problem you are given, draw sigmoid curves which capture different parts of the output values, and then figure out how to combine them. I see that the -1's in the output are towards the right and left, and the 1's are in the middle. So you need a sigmoid which increases at the left, and one that decreases at the right.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48