def update_gradients_full(self, dL_dK, X, X2=None, reset=True):
self.variance.gradient = np.sum(self.K(X, X2)* dL_dK)/self.variance<EOL>dL_dr = self.dK_dr_via_X(X, X2) * dL_dK<EOL>if self.ARD:<EOL><INDENT>tmp = dL_dr*self._inv_dist(X, X2)<EOL>if X2 is None: X2 = X<EOL>if use_stationary_cython:<EOL><INDENT>self.lengthscale.gradient = self._lengthscale_grads_cython(tmp, X, X2)<EOL><DEDENT>else:<EOL><INDENT>self.lengthscale.gradient = self._lengthscale_grads_pure(tmp, X, X2)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>r = self._scaled_dist(X, X2)<EOL>self.lengthscale.gradient = -np.sum(dL_dr*r)/self.lengthscale<EOL><DEDENT>
Given the derivative of the objective wrt the covariance matrix
(dL_dK), compute the gradient wrt the parameters of this kernel,
and store in the parameters object as e.g. self.variance.gradient