#NEWLINE# def test_lower_bound( self ) : #NEWLINE# #INDENT# '\n        Test the Wishart VB lower bound\n        ' #NEWLINE# np . random . seed ( 42 ) #NEWLINE# D = 3 #NEWLINE# n = ( ( D - 1 ) + np . random . uniform ( 0.1 , 0.5 ) ) #NEWLINE# V = random . covariance ( D ) #NEWLINE# Lambda = Wishart ( n , V ) #NEWLINE# mu = np . random . randn ( D ) #NEWLINE# Y = Gaussian ( mu , Lambda ) #NEWLINE# y = np . random . randn ( D ) #NEWLINE# Y . observe ( y ) #NEWLINE# Lambda . update ( ) #NEWLINE# L = ( Y . lower_bound_contribution ( ) + Lambda . lower_bound_contribution ( ) ) #NEWLINE# mu = mu #NEWLINE# nu = ( ( n + 1 ) - D ) #NEWLINE# Cov = ( V / nu ) #NEWLINE# self . assertAllClose ( L , _student_logpdf ( y , mu , Cov , nu ) ) #NEWLINE# pass