A "BIG" problem...= =

The front end.
Post Reply
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

A "BIG" problem...= =

Post by tloy1966 »

Hi again

i got a problem about node numbers...

(i). i create a Bayesian network with 6 hundred of node by SMILE then
sometimes SMILE will get error Message about node problem like "std::bad_alloc" and
In mlock.c
/*
void __cdecl _unlock (
int locknum
)
{
/*
* leave the critical section.
*/
LeaveCriticalSection( _locktable[locknum].lock );
}
*/
Is this caused by need allocate more memory? Can anyone tell me how to solve this problem :shock:

(ii). learn parameter through em algorithm with no miss value by Genie. It was works!!! :)
but when i try to inference with Genie it always tell this message "This application has requested the Runtime to terminate it in an unusual way." :?:

Hopefully these problem can be solved...and thanks guys who read this article :D




Code about part (i)
int x0001 = BNet.AddNode(DSL_CPT,"x0001"); DSL_idArray someNames; someNames.Add("present"); someNames.Add("obsent"); someNames.Add("present"); Net.GetNode(x0001)->Definition()->SetNumberOfOutcomes(someNames);
int x0002 = BNet.AddNode(DSL_CPT,"x0002"); someNames.Add("obsent"); someNames.Add("present"); BNet.GetNode(x0002)->Definition()->SetNumberOfOutcomes(someNames);
...
int x0072 = BNet.AddNode(DSL_CPT,"x0072"); someNames.Add("obsent"); someNames.Add("present"); BNet.GetNode(x0072)->Definition()->SetNumberOfOutcomes(someNames);

int y0001 = BNet.AddNode(DSL_CPT,"y0001"); someNames.Flush(); someNames.Add("obsent"); someNames.Add("present"); BNet.GetNode(y0001)->Definition()->SetNumberOfOutcomes(someNames);
...
int y0695 = BNet.AddNode(DSL_CPT,"y0695"); someNames.Flush(); someNames.Add("obsent"); someNames.Add("present"); BNet.GetNode(y0695)->Definition()->SetNumberOfOutcomes(someNames);

BNet.AddArc(x0001,y0001); ...about 3000 Arcs
does these code got something wrong?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: A "BIG" problem...= =

Post by shooltz[BayesFusion] »

...about 3000 Arcs
The 3000 arcs is not a problem, but you can easily blow out your CPT(s) with too many arcs coming into single node.
when i try to inference with Genie it always tell this message "This application has requested the Runtime to terminate it in an unusual way."
That's probably due to excessive memory usage during inference. Can you limit your target node set?
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

Re: A "BIG" problem...= =

Post by tloy1966 »

shooltz wrote:
...about 3000 Arcs
The 3000 arcs is not a problem, but you can easily blow out your CPT(s) with too many arcs coming into single node.
when i try to inference with Genie it always tell this message "This application has requested the Runtime to terminate it in an unusual way."
That's probably due to excessive memory usage during inference. Can you limit your target node set?

Thanks your reply so fast :)

and " limit your target node set?" is this means if Xset(x1, x2, x3, x4...)→Yset(y1, y2, y3), the number of Xset have to less than 10 or small number?

Thanks again!!! :D
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: A "BIG" problem...= =

Post by shooltz[BayesFusion] »

and " limit your target node set?" is this means if Xset(x1, x2, x3, x4...)→Yset(y1, y2, y3)
No, I was referring to DSL_network::SetTarget call. If you're only interested in the posterior probabilities of some of your nodes, mark them with SetTarget and try to run inference again. This may (but does not have to) help in reducing the complexity for the inference algorithm.
tloy1966
Posts: 20
Joined: Thu May 12, 2011 2:40 am

Re: A "BIG" problem...= =

Post by tloy1966 »

wow ... sorry for i didn't learn related course, and so many background knowledge i have to study :?

In my studing university, there is no related course about Bayesian Network, hope these question wouldn't be a trouble :)

and i have few more questions

Q1. I want match data and Bayesian network by Genie , so i took follow steps
(i) open network by Genie
(ii) open .csv data file by Genie
(iii) In the data view, choose [data]→[learn parameter]→[OK]→[Run EM Algorithm]

EM algorithm seems can solve problem about Missing Value .. if there is no Missing Value in my data file? [Run EM Algorithm]step will calculate the probability of nodes?

Q2. I have to study more background knowledge about Bayesian Network and which book i have to read, so i can learn faster
(i) Pearl,1988, Probabilistic Reasoning in Intelligent Systems.
(ii) Russel and Norvig, 1995, Application of probabilistic methods in Artificial Intelligence.
(iii) or maybe other books in your valuable website http://genie.sis.pitt.edu/wiki/Resources:_Books


for other users may interest in these topic
http://genie.sis.pitt.edu/forum/viewtop ... =divorcing
http://genie.sis.pitt.edu/forum/viewtopic.php?t=148

Thanks for your reply :D
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Re: A "BIG" problem...= =

Post by mark »

tloy1966 wrote:EM algorithm seems can solve problem about Missing Value .. if there is no Missing Value in my data file? [Run EM Algorithm]step will calculate the probability of nodes?
EM estimates the parameters of all the conditional distributions (CPTs) in the network regardless if any of the values are missing.
Post Reply