code: def grad_local_log_likelihood(self, x):
          
          C, D, u, y = self.C, self.D, self.inputs, self.data
          psi = x.dot(C.T) + u.dot(D.T)
          p = 1. / (1 + np.exp(-psi))
          return (y - p).dot(C)
docs: d/d \psi  y \psi - log (1 + exp(\psi))
              = y - exp(\psi) / (1 + exp(\psi))
              = y - sigma(psi)
              = y - p
  
          d \psi / dx = C
  
          d / dx = (y - sigma(psi)) * C