#NEWLINE# def test_parametric_mean_function( self ) : #NEWLINE# #INDENT# "\n        A linear mean function with parameters that we'll learn alongside the kernel\n        " #NEWLINE# X = np . linspace ( 0 , 10 , 50 ) . reshape ( ( - 1 ) , 1 ) #NEWLINE# Y = ( ( ( np . sin ( X ) + ( 0.5 * np . cos ( ( 3 * X ) ) ) ) + ( 0.1 * np . random . randn ( * X . shape ) ) ) + ( 3 * X ) ) #NEWLINE# mf = GPy . mappings . Linear ( 1 , 1 ) #NEWLINE# k = GPy . kern . RBF ( 1 ) #NEWLINE# lik = GPy . likelihoods . Gaussian ( ) #NEWLINE# m = GPy . core . GP ( X , Y , kernel = k , likelihood = lik , mean_function = mf ) #NEWLINE# self . assertTrue ( m . checkgrad ( ) )