dkesada/dbnR

How to define time.

Closed this issue · 3 comments

Hi.

I just found this package and I was wondering how I can define time sequence (a column for time) for the observation.

Hi! There is no column used to define time in the dbnR package. It is assumed that the first row in a dataframe is the oldest one, then the second one comes after it and so on. The time sequence is assumed to be from the first row to the last in order of appearance. Then, after using the fold_dt() function over the dataframe, the relationships over time are representend on each row of the dataframe. Here's an image of how the fold_dt() function works:
unnamed
In the image, the oldest values are X = 3 and Y = -1, and the next seen values are X = 6 and Y = -2. After folding with size = 2, we can see in the fist row of the folded dataset how the previous values are stored in the '_t_1' columns, which will be used afterwards to learn the relationships of variables over time.

Hi, Dear author, but what if we have different time slices in each columns originally.
For example, a_t_0,b_t_0,c_t_0,a_t_1,b_t_1,c_t_1

I don't think I understand the issue in that case. If you already have a_t_0, b_t_0, c_t_0, a_t_1, b_t_1, c_t_1, then you can just learn a size = 2 DBN with that dataset