Research Article

Estimating Network Flow Length Distributions via Bayesian Nonnegative Tensor Factorization

Algorithm 3

TNTF generative model.
(1)function RandInit ()
  //Sample factor F from Gamma ()
(2)  for all do
(3)   
  //Sample factor H from Gamma ()
(4)  for all do
(5)   
  //Sample factor D from Gamma ()
(6)  for all do
(7)   
  //Sample latent tensor from Poisson distributions
(8)  for all do
(9)   
(10)  return {F, H, D, }
(11)function GenerateData ()
  //Randomly initialize factors and latent tensor
(12) ⟵ RandInit ()
  //Generate original tensor
(13)for all do
(14)  
  //Generate sampled tensor
(15)for all do
(16)  
(17)return {F, H, D, , , }