def jac_predict(self, params): """jacobian of prediction function using complex step derivative This assumes that the predict function does not use complex variable but is designed to do so. """ from statsmodels.sandbox.regression.numdiff import approx_fprime_cs jaccs_err = approx_fprime_cs(params, self._predict) return jaccs_err
def jac_predict(self, params): '''jacobian of prediction function using complex step derivative This assumes that the predict function does not use complex variable but is designed to do so. ''' from statsmodels.sandbox.regression.numdiff \ import approx_fprime_cs jaccs_err = approx_fprime_cs(params, self._predict) return jaccs_err
def score(self, params): """ Compute the score function at params. Notes ----- This is a numerical approximation. """ loglike = self.loglike #if self.transparams: # params = self._invtransparams(params) #return approx_fprime(params, loglike, epsilon=1e-5) return approx_fprime_cs(params, loglike)