locked
special result variable in factor method RRS feed

  • Question

  • In Exp Factor

    public static Gaussian DAverageConditional([SkipIfUniform] Gamma exp, [Proper] Gaussian d, Gaussian result)

    Here the function takes result as a parameter, and would use its value in this line:

    Gaussian dMarginal = d * result;

    I know there exists another magic parameter 'to_d'.

    Now, it seems to me result and to_d both mean the previous outgoing message to D. Why we don't use to_d here?

    why do we ever need previous sent message anyway in this case? Is the main purpose to speed up approximation? I know if I do laplace approximation, the previous message might be useful to serve as a initial point for the argmin optimizer. But since we use integration here, can you briefly explain how it is useful?


    • Edited by colinfang Friday, October 31, 2014 11:39 AM
    Friday, October 31, 2014 11:38 AM

Answers

  • The only reason to_d is not used is because it would influence the update schedule chosen by the compiler.  Here we don't want the fact that we are using 'result' to influence the schedule, because it is only used to improve the approximation.  In this case, it improves the accuracy of the quadrature.
    • Marked as answer by colinfang Friday, October 31, 2014 1:43 PM
    Friday, October 31, 2014 12:35 PM
    Owner

All replies

  • The only reason to_d is not used is because it would influence the update schedule chosen by the compiler.  Here we don't want the fact that we are using 'result' to influence the schedule, because it is only used to improve the approximation.  In this case, it improves the accuracy of the quadrature.
    • Marked as answer by colinfang Friday, October 31, 2014 1:43 PM
    Friday, October 31, 2014 12:35 PM
    Owner
  • it would influence the schedule even if we don't put [Fresh] Attribute in?
    Friday, October 31, 2014 1:43 PM
  • Also, regarding "improves the accuracy of the quadrature", where/ how can I search / learn for relevant and more detailed info?
    Friday, October 31, 2014 1:45 PM