I'm using infer.net for implementing a dynamic Bayesian network model. every node in each layer is dependent on all nodes in previous layer (we want to train wji, the weights of edges between each node j from the previous level (time t-1) to node i in current level (time t)). node values are shown by yi (value of node i). The dependency is a complicated function like: yi(t) = y(t-1).(1-alpha.deltaT) + beta . 1 / (1 + exp(-WeightedSigma)) WeightedSigma = Sigma (Wij * yj(t)) Now I want to put a factor node in my factor graph implementation in infer.NET. I don't know how should I implement such factor node and its message passing. I'm so confused. Can anyone please help me in this case? I appreciate any help. Thanks
The only part of this expression that you need a custom factor for is the function $1/(1+\exp(-Sigma(x)))$. This is a function from a scalar to a scalar, so should be relatively easy to implement using quadrature. For examples of this approach, see section 13.8 of Bayesian Data Analysis (third edition) or section 1.4 of EP: A quick reference.