structure learning

The front end.
Post Reply
Yan
Posts: 22
Joined: Fri Mar 04, 2022 5:26 am

structure learning

Post by Yan »

Dear staff,

I'd like to ask some questions about structure learning.
1. I have around 130 cases and 7 nodes. In this case, is it better to use "Bayesain Search algorithm" rather than "PC algorithm"?
2. The DAG learned by "Bayesain Search algorithm" is very different from the structure learned by "PC algorithm", does this mean the result may not be reliable?
3. In "PC algorithm", I change the "Max Adjacency Size" to 3 instead of the default 8, to limit the number of parent nodes becasue of the small dataset. But why some nodes still have more than 3 parent nodes?
4. Also in "PC algorithm", what is the difference if there is a red (undirected) arc connecting 2 nodes VS if there is no arc connecting 2 nodes? Does the red one mean that the 2 nodes have direct relationship but can't tell the direction? And no arc to connect means the 2 nodes don't have direct relationship? I'm also confused the meaning of red arcs and double-headed arcs. What is the "hidden common cause"? Can we ignore the red arcs?

Many thanks!
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: structure learning

Post by marek [BayesFusion] »

Hi Yan,

Let me try to answer your questions.

(1) This is hard to say, as the two algorithms work on different principles. I would try both and look for commonalities in the output. This especially that your data set is rather small. Please play with the significance level alpha in PC -- it has a big impact on the density of the learned network. Those connections and those independencies that appear at various levels are robust. There is I believe a brief discussion of that in the manual.

(2) Yes. When the conditions are ideal (many data records, not too much noise), the graphs will resemble each other more.

(3) This is interesting. I would love to see the data set that you are using. Is there any possibility that you can share it with us (can be transformed so that the labels are not recognizable and protect your IP).

(4) There is an explanation of that in the manual. A red undirected arc means that there is a direct connection or a hidden common cause. In other words, the two nodes are dependent directly, at least within the data set that you have (hidden common cause, which is possible, is also influencing both directly). When there is no connection between the nodes, they are independent (unconditionally or conditionally) and there is no direct connection between them.

I hope this helps,

Marek
Yan
Posts: 22
Joined: Fri Mar 04, 2022 5:26 am

Re: structure learning

Post by Yan »

marek [BayesFusion] wrote: Thu Sep 14, 2023 1:02 pm Hi Yan,

Let me try to answer your questions.

(1) This is hard to say, as the two algorithms work on different principles. I would try both and look for commonalities in the output. This especially that your data set is rather small. Please play with the significance level alpha in PC -- it has a big impact on the density of the learned network. Those connections and those independencies that appear at various levels are robust. There is I believe a brief discussion of that in the manual.

(2) Yes. When the conditions are ideal (many data records, not too much noise), the graphs will resemble each other more.

(3) This is interesting. I would love to see the data set that you are using. Is there any possibility that you can share it with us (can be transformed so that the labels are not recognizable and protect your IP).

(4) There is an explanation of that in the manual. A red undirected arc means that there is a direct connection or a hidden common cause. In other words, the two nodes are dependent directly, at least within the data set that you have (hidden common cause, which is possible, is also influencing both directly). When there is no connection between the nodes, they are independent (unconditionally or conditionally) and there is no direct connection between them.

I hope this helps,

Marek
Thanks Marek, I have sent you the dataset through private message. Not sure whether you can receive it. Please let me know if not. Many thanks.
Kind regards.
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: structure learning

Post by marek [BayesFusion] »

Hi Yan,

I have looked at your data and have managed to replicate the problem. Clearly, there is a bug in PC and, as you wrote, the algorithm ignores the max. adjacency size parameter. We will work on it and will fix it in the next release.

When I face a problem like yours, I usually play with the alpha value (Significance threshold). When you make it much smaller, there will be fewer connections. This has to do with classical statistical tests and is described in the manual, I believe. At 0.000001, WB has only four parents. I prefer this, as this procedure gets rid of weaker connections without forcing the max number of parents. When you force the number of parents, you may remove some connections that are strong, just because their number exceeds the maximum adjacency size. In the PC algorithm, it is absolutely a good idea to check a range of values of the alpha parameter.

The difference between a double-edged arc and a red arc in PC output is precisely the possibility (not necessity!) of a hidden common cause in the latter case. A hidden common cause is a variable that is not present in the data set but that influences directly the two variables connected by the red arc. Example? A high dependence between reading ability and shoe size. A common cause may be age. If you don't have it in the data set, reading ability and shoes size will be directly connected.

I hope this helps,

Marek
Yan
Posts: 22
Joined: Fri Mar 04, 2022 5:26 am

Re: structure learning

Post by Yan »

marek [BayesFusion] wrote: Fri Sep 15, 2023 8:46 pm Hi Yan,

I have looked at your data and have managed to replicate the problem. Clearly, there is a bug in PC and, as you wrote, the algorithm ignores the max. adjacency size parameter. We will work on it and will fix it in the next release.

When I face a problem like yours, I usually play with the alpha value (Significance threshold). When you make it much smaller, there will be fewer connections. This has to do with classical statistical tests and is described in the manual, I believe. At 0.000001, WB has only four parents. I prefer this, as this procedure gets rid of weaker connections without forcing the max number of parents. When you force the number of parents, you may remove some connections that are strong, just because their number exceeds the maximum adjacency size. In the PC algorithm, it is absolutely a good idea to check a range of values of the alpha parameter.

The difference between a double-edged arc and a red arc in PC output is precisely the possibility (not necessity!) of a hidden common cause in the latter case. A hidden common cause is a variable that is not present in the data set but that influences directly the two variables connected by the red arc. Example? A high dependence between reading ability and shoe size. A common cause may be age. If you don't have it in the data set, reading ability and shoes size will be directly connected.

I hope this helps,

Marek
Thanks Marek, that makes sense. Look forward to the future release.
Post Reply