<s> from bayespy import nodes <EOL> from bayespy . inference import VB <EOL> def run ( ) : <EOL> a = nodes . GammaShape ( name = '<STR_LIT:a>' ) <EOL> b = nodes . Gamma ( <NUM_LIT> , <NUM_LIT> , name = '<STR_LIT:b>' ) <EOL> tau = nodes . Gamma ( a , b , plates = ( <NUM_LIT:1000> , ) , name = '<STR_LIT>' ) <EOL> tau . observe ( nodes . Gamma ( <NUM_LIT:10> , <NUM_LIT:20> , plates = ( <NUM_LIT:1000> , ) ) . random ( ) ) <EOL> Q = VB ( tau , a , b ) <EOL> Q . update ( repeat = <NUM_LIT:1000> ) <EOL> print ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT> ) <EOL> print ( "<STR_LIT>" , a . u [ <NUM_LIT:0> ] , b . u [ <NUM_LIT:0> ] ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> run ( ) </s>
