def test_fisher_info(params): print "fisher: these should be same" print pe.fisher_info(params) true_fisher = np.zeros((2,2)) true_fisher[0][0]=0.221322-0.181322 true_fisher[0][1]=0.181322 true_fisher[1][0]=0.181322 true_fisher[1][1]=1.644933-0.181322 print true_fisher
def test_dot(params): fisher = pe.fisher_info(params) H_val = pe.H(params,1,1) print "these should be same" print np.dot(fisher,params) print np.array([0.38132296,2.37022589])
def test_inv_fisher(params): print "inverse fisher: should be same" print np.linalg.inv(pe.fisher_info(params)) print pe.inv_fisher(params)