locked
How to multiply Variable<Vector> by a scalar RRS feed

  • Question

  • Hello,

    I'm trying to implement a model which contains the following hierarchy:

    pi_1 ~ Dirichlet(0.5)

    pi_2 ~ Dirichlet(alpha * pi_1)

    And this is how it looks in my program:

    let pi1 = Variable.DirichletSymmetric(5, 0.5)
    
    let alpha = 0.1
    let pi2 = Variable.Dirichlet(alpha * pi1)

    Unfortunately, the second Dirichlet doesn't work. 

    I haven't figured out how to multiply a variable of Variable<Vector> type by a scalar. Is there a method to do this or do I have to implement a new factor/operator class?

    Thank you

    Thursday, May 15, 2014 4:49 PM

All replies