A ‘hello world’ equivalent program for Machine learning would be to use the neural network to model **XOR. **These days neural nets are often the first ML concept to be learned (not counting stuff like genetic algorithms and linear regression).

XOR is the operation that kicks out a 0 if two binary values are the same, but 1 if they are different. It is expressed like this:

a b XOR

0 0 0

0 1 1

1 0 1

1 1 0

**Why is it important?**

A single layer neural nets can only model linear functions/linearly separable data.2 layer neural nets can model data that is not linearly separable.

Let’s have a look at what it means in this context:

*How can you make a linear function (which doesn’t bend around and cross the same space in a dimension, rendering multiple values at the same points on one dimension) which can separate activated data points from the zeroes?*

You can’t.

Hence a 2 layer neural net is required.

You can find implementation and explanation of XOR here

### Like this:

Like Loading...

*Related*

Can you please describe in detail how these works in next or future posts i am really interesteed here to know abouot it and also the sources related to it.

LikeLike

The XOR uses a simple propagation logic. Notice how XOR(1,1) => 0, that’s forward propagation. Similarly, XOR(0,0) => 0 is back propagation. I would write on all aspects of computer science. I have updated a link that provided implementation and explanation on XOR.

LikeLike

Sure, I would love to use your animations. However, I am a student and cannot pay you anything but, I would be to provide appropriate credit to you and advertise your service.

LikeLike