evaluates the gradient of the log marginal likelihood for the given hyperparameters

def LMLgrad(self,params=None):
        """
        evaluates the gradient of the log marginal likelihood for the given hyperparameters
        """
        if params is not None:
            self.setParams(params)
        KV = self._update_cache()
        W = KV['W']
        LMLgrad = SP.zeros(self.covar.n_params)
        for i in range(self.covar.n_params):
            Kd = self.covar.Kgrad_param(i)
            LMLgrad[i] = 0.5 * (W*Kd).sum()
        return {'covar':LMLgrad}