Skip to content

Commit

Permalink
update test to sse signature
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Apr 27, 2024
1 parent 355c2cc commit 12b4e35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/math/test_jcr.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ def model(x, beta):
return beta[0]*x**2 + beta[1]*x**5

ndata = 101
X = np.linspace(0, 1., ndata)
X = np.linspace(0., 1., ndata)
beta = (0.15, -0.05)
Y = model(X, beta) + np.random.normal(0., 0.05, len(X))

def sse(beta) -> float:
Ye = model(X, beta)
return sum((Ye - Y)**2)

sol = minimize(sse, (-1., 1))
sol = minimize(sse, (-1., 1.))
beta_est = sol.x

jcr = confidence_region(beta_est,
sse=lambda x, y: sse((x, y)),
sse=sse,
ndata=ndata)
assert len(jcr[0]) > 1

0 comments on commit 12b4e35

Please sign in to comment.