#NEWLINE# def resample_psi( self , verbose = False ) : #NEWLINE# #INDENT# for data in self . data_list : #NEWLINE# #INDENT# if ( data [ 'L' ] is None ) : #NEWLINE# #INDENT# Z = data [ 'Z' ] #NEWLINE# C = ( self . kernel . K ( Z ) + ( 1e-06 * np . eye ( Z . shape [ 0 ] ) ) ) #NEWLINE# L = np . linalg . cholesky ( C ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# L = data [ 'L' ] #NEWLINE# #UNINDENT# for k in xrange ( self . K ) : #NEWLINE# #INDENT# if verbose : #NEWLINE# #INDENT# sys . stdout . write ( '.' ) #NEWLINE# sys . stdout . flush ( ) #NEWLINE# #UNINDENT# def _lkhdk( psik , * args ) : #NEWLINE# #INDENT# data [ 'psi' ] [ : , k ] = psik #NEWLINE# return self . log_likelihood ( data ) #NEWLINE# #UNINDENT# ( psik , _ ) = elliptical_slice ( data [ 'psi' ] [ : , k ] , L , _lkhdk ) #NEWLINE# data [ 'psi' ] [ : , k ] = psik #NEWLINE# #UNINDENT# if verbose : #NEWLINE# #INDENT# sys . stdout . write ( '\n' ) #NEWLINE# sys . stdout . flush ( )