Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Apr 12, 2024
1 parent c3cb26a commit 9428587
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/math/test_jcr.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def model(x, beta):
beta = (0.15, -0.05)
Y = model(X, beta) + np.random.normal(0., 0.05, len(X))

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

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

_, ax = plt.subplots()
assert len(ax.get_lines()) == 0
confidence_region(ax, beta_est, sse, ndata)
assert len(ax.get_lines()) == 1
jcr = confidence_region(beta_est,
sse=lambda x, y: sse((x, y)),
ndata=ndata)
assert len(jcr[0]) > 1

0 comments on commit 9428587

Please sign in to comment.