title: Dynamic Bayesian Network - multivariate - repetitive events - bnstruct R Package
body: <p>I am looking for an approach to train a dynamic bayesian network (DBN), using the package bnstruct, for a special case where data is collected from similar events. Being so, 1) I would like to train my DBN feeding it with one event per time. </p>
  
  <p>As in the real case the number of events, rows and columns are big, 2) it would be better if some parallel processing could be implemented to improve perfomance.</p>
  
  <p>A dummy code is provided below, where all data must be fed at once, disregarding event boundaries.</p>
  
  <pre><code>library(bnstruct)
  
  numEvents &lt;- 40
  numRows &lt;- 5
  numCols &lt;- 3
  
  mat &lt;- matrix(data = rnorm(numEvents * numRows * numCols), ncol = numCols)
  varNames &lt;- paste0("var", 1:numCols)
  colnames(mat) &lt;- varNames
  
  dataset &lt;- BNDataset(data = mat,  discreteness = rep(F, ncol(mat)), variables = varNames, node.sizes = rep(3, ncol(mat)))
  
  dbn &lt;- learn.dynamic.network(dataset, num.time.steps = numCols)
  </code></pre>
  
  <p>Thanks.</p>