Neutral Networks- Intuitions 1(Logic Gates)
A simple example of applying neural networks is by predicting x1 AND x2, which is the logical ‘and’ operator and is only true if both x1 and x2 are 1.
Remember that x0 is our bias variable and is always 1.
Let’s set our first theta matrix as:
This will cause the output of our hypothesis to only be positive if both x1 and x2 are 1. In other words:
So we have constructed one of the fundamental operations in computers by using a small neural network rather than using an actual AND gate. Neural networks can also be used to simulate all the other logical gates. The following is an example of the logical operator ‘OR’, meaning either x1 is true or x2 is true, or both:
See the pictorial representation below:
Read Next- Neutral network- Intuition 2(logic gates)