Learning DBN parameters (transition probablilities) in GeNIe

The front end.
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Learning DBN parameters (transition probablilities) in GeNIe

Post by ksm »

HI all,

I am interested in performing learning and inference in DBN using the EM algorithm. I have a network with 5 slices with two hidden nodes (children) and four observation nodes (parents to each child).I am having difficulties in understanding how to learn transition probabilities . I know how to set the transition probabilities manually but I was wondering whether EM can be used to learn them. I have the data file for static BN which works OK but how can I use it for my DBN where I would need to learn the both transition probabilities and model CPTs. Is it possible, if I don't assign the transition probabilities but can be learnt automatically from the data considering 1st order Markov process?

Regards,
\KSM
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

Anyone? Some pointers will be appreciated.

Thanks,
/ksm
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by mark »

You can definitely learn these probabilities from data but you'll need time series data.
jls
Posts: 2
Joined: Mon Feb 07, 2011 11:52 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by jls »

I am also trying to learn DBN parameters and was wondering how the time series data should be structured. I have 8 time slices and about 200 individual "runs". For each run there are several static and several dynamic variables. Should there be 200 data points with 8 individual instances of each of the dynamic variables? Or should there be 1600 data points with one variable representing time? Or some other representation?

Additionally, how do I indicate all of this to GeNIe? I get the "Time series columns" pop-up when I go to learn the parameters. It has 8 time slots and seems to have an unlimited number of "Series" that can be set for each time slice. How am I supposed to use the interface to specify the structure of my data?

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

Re: Learning DBN parameters (transition probablilities) in G

Post by mark »

The following document has an example dynamic network and data set:

http://genie.sis.pitt.edu/wiki/SMILearn ... namic_1%29

The tutorial was written for SMILE, but the network and data set should work in GeNIe too. Each row is one run and dynamic variables have time indices. Hope this helps.
jls
Posts: 2
Joined: Mon Feb 07, 2011 11:52 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by jls »

Very helpful. Thank you!
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

Thanks for the reply Mark!

I tried learning my DBN in GeNIe and it works OK. However, I notice only slight changes in the transition probabilities due to which If I do one step prediction of all the variables, I am not able to get correct answers. When running EM algorithm, I selected randomize initialize parameters. I have also tired with relevance enabled/diabled as well. Can you please suggest what might be the case? Does GeNIe supports prediction? I would like to predict variables at time (t4,t5,t6) by observing and inferring the variables at time (t1,t2,t3).

Any help in this regards would be appreciated!

Cheers,
\ksm
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

anyone?

Regards,
\ksm
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

Hi all,

Please help. After I learnt the network parameters and transition probabilities, I aim to perform three-step prediction of several parameters. Is it possible in GeNIe? How can I see the new transition probability matrix that is learnt?

Cheers,
\KSM
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by mark »

I don't understand what you are trying to do. Could you describe it in more detail, please?
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

mark wrote:I don't understand what you are trying to do. Could you describe it in more detail, please?
Hi Mark,

Thanks for the reply. I want to perform prediction for several time steps based on the learned parameters and transition probabilities. For example predicting states of several parameters say, at A(time_5), B(time_5) by observing them at previous time steps: A(time_4), B(time_4).
I would like to know whether prediction is supported. Also, is it possible to see the learnt transition probability matrix? I have attached my DBN for your consideration. I have a data file having 10 records for all the nodes at each state except for the 5th state that needs to be predicted.

Regards,
ksm
Attachments
test_DBN.xdsl
(16.42 KiB) Downloaded 323 times
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by mark »

This is all possible in GeNIe. CPTs are accessible by double clicking on the nodes and predictions can be made by instantiating evidence and performing inference. This is a manual process, but it can be automated in SMILE.
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

mark wrote:This is all possible in GeNIe. CPTs are accessible by double clicking on the nodes and predictions can be made by instantiating evidence and performing inference. This is a manual process, but it can be automated in SMILE.
Hi Mark,

Based on the DBN model attached in my previous post, can you please suggest why even 1 step prediction is not working in my case? As can be seen, in the DBN, I have initialized the parameters with equal probabilities and they are learnt using the log file that I have. In the file, I have 10 cases for each time step. The network is able to correctly learn the parameters till t4 but is unable to perform prediction at t5 by observing evidences till t4. From my understanding, I suspect that prediction is not happening as I have not explicitly set the initial transition probabilities or the data is too less. Can you please suggest what might be the case? I know that EM algorithm will run till it converges to local maxima and based on my understanding it works in a similar way in GeNIe. Do I have to re-run the EM again and again till log-likelihood does not increase? :?

Thanks a ton!

Regards,
ksm
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by mark »

Can you also post the data file? And the learned network?
ksm
Posts: 11
Joined: Mon Dec 06, 2010 8:30 pm

Re: Learning DBN parameters (transition probablilities) in G

Post by ksm »

mark wrote:Can you also post the data file? And the learned network?
Hi Mark,

I have attached the DBN and data file. The data is for 4 time slices. I would like to predict all the variables at 5th time slice. As we can see in the unrolled and learnt network, the probabilities are not changing at all and they are very close to inital probabilities.

Thanks and regards,
ksm
Attachments
DBN_mark_test_17411.zip
(8.76 KiB) Downloaded 362 times
Post Reply