Bayesian networks

What are Bayesian Networks ?

Why are they important ?

What are they look like ?

How are they different from Neural Networks ?

First of all, Bayesian Networks are DAGs(direct acyclic graphs), they look like this:

We say that they are oriented, because they mandatory have arrows that go to one node to the others!!!

We say that they are acyclic because the cycles are not allowed !!!

So on our picture the arrow is going from a to b , and form b to d for exemple, but the arrow that is going from d back to a

is not allowed.

Why not?

Because in the nature, the cause always precedes the consequence. And the consequence has no influence on the cause.

If you are fun on SF movies or books, you know they talk a lot about the time travel. Maybe you have read about Albert Einstein relativity, or books from Stephen Hawking, and you know that the time travel is not completely impossible. One thing is still impossible, switch the cause and consequence… That is why Bayesian Networks are only acyclic.

Let’s go quickly to our goal!

Bayesian Networks are composed of 3 types underlying structures, that are called : S,L and V structures.

S-struct( serial structure), L -structure (divergent structure) , and V-structure (convergent structure)

Of course we need a good exemple:

Alice likes Bob, but considers him more as a friend, not as a boy-friend

Bob loves Alice, but he is not sure about her feelings

Charles loves Alice but is living in other country

Alice is absolutely crazy about Charles, she sees Bob only  when Charles is not around

Do you know how to draw the Bayesian Network for Alice, Bob and Charles ???

So let’s see that Alice is in town, and both Bob and Charles came out as well, hoping to meet Alice.

We can already make some conclusions. Bob and Charles do not know each other (they never actually met), the only connection that exists between them is Alice. In the Bayesian Networks terminology we say B and C are therefore independant, when A is unkown. So we can see Bob in town, and Charles in town, they can go out independently, maybe even cross each other (or even meet) but there is no correlation of the two events “Bob is in town” and “Charles is in town” , when Alice is not around.

The situation is different when Alice is in town. Maybe she decides to say the truth to Bob, that in fact she loves Charles.

So finally , she organises the meeting of 3 of them.

In the term of Bayesian Networks, we say that B and C are not independent anymore once A is known.

So in this case, the event “Bob is in town” and “Charles is in town” are not independent anymore.

The structure above is called V-structure. Remember that B and C are independant when A is unkown.

We can explain the V-structure with another, more mathematical, exemple

See the following serie of numbers:

3 6

5 45

8 1

12 7

If you put in Excel, and calculate the correlation, you will see tha there is no correlation between to colums.

3 6 9

5 45 50

8 1 9

12 7 19

But we add the third column that is actually the sum of the first and the second column, you can say they became depandent in the presence of this third column….

It’s OK until now ?

To be continued soon…

https://en.wikipedia.org/wiki/Bayesian_network

https://en.wikipedia.org/wiki/Directed_acyclic_graph

https://towardsdatascience.com/introduction-to-bayesian-networks-81031eeed94e

https://www.sciencedirect.com/topics/mathematics/bayesian-network

https://www.bayesserver.com/docs/introduction/bayesian-networks/

Leave a comment