#NEWLINE# def posterior_samples_f( self , X , size = 10 ) : #NEWLINE# #INDENT# ( _ , return_index , return_inverse ) = np . unique ( X , True , True ) #NEWLINE# X = X [ return_index ] #NEWLINE# ( F , L , Qc , H , Pinf , dF , dQc , dPinf ) = self . kern . sde ( ) #NEWLINE# ( m , V ) = self . predict_raw ( X ) #NEWLINE# y = self . prior_samples_f ( np . vstack ( ( self . X , X ) ) , size ) #NEWLINE# Y = np . empty ( ( size , X . shape [ 0 ] ) ) #NEWLINE# for j in range ( 0 , size ) : #NEWLINE# #INDENT# yobs = ( y [ 0 : self . num_data , j : ( j + 1 ) ] + ( np . sqrt ( self . sigma2 ) * np . random . randn ( self . num_data , 1 ) ) ) #NEWLINE# ( m2 , V2 ) = self . predict_raw ( X , Ynew = yobs ) #NEWLINE# Y [ j , : ] = ( ( m . T + y [ self . num_data : , j ] . T ) - m2 . T ) #NEWLINE# #UNINDENT# Y = Y [ : , return_inverse ] #NEWLINE# return Y . T