#NEWLINE# def __init__( self , gp , newton_step = 1.0 , newton_epsilon = 1e-05 , newton_max_iterations = 20 , newton_start = None ) : #NEWLINE# #INDENT# '\n        gp - underlying Gaussian process\n        newton_step - starting step size, if the objective function is not\n                      increased after a step, the step is discarded and step size\n                      is halfed\n        newton_epsilon - epsilon to terminate optimisation\n        newton_max_iterations - maximum number of steps\n        newton_start - optional starting point, useful if mode has to be found multiple\n                       times for slightly varying data\n        ' #NEWLINE# dim = len ( gp . K ) #NEWLINE# assert ( newton_step > 0 ) #NEWLINE# assert ( newton_epsilon > 0 ) #NEWLINE# assert ( newton_max_iterations > 0 ) #NEWLINE# if ( newton_start is not None ) : #NEWLINE# #INDENT# assert ( len ( shape ( newton_start ) ) == 1 ) #NEWLINE# assert ( len ( newton_step ) == dim ) #NEWLINE# #UNINDENT# self . gp = gp #NEWLINE# self . newton_step = newton_step #NEWLINE# self . newton_epsilon = newton_epsilon #NEWLINE# self . newton_max_iterations = newton_max_iterations #NEWLINE# self . newton_start = newton_start #NEWLINE# self . newton_start = newton_start