Skip to content

Commit

Permalink
Update regression_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jerela committed Nov 28, 2023
1 parent 2e9a2b7 commit 83642df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def test_first_order_polynomial_regression():
def test_nonlinear_regression():
"""Test nonlinear regression with Gauss-Newton iteration."""
h = Matrix([lambda a,x: pow(a,x)])
independents = Matrix([1, 2, 3])
y = Matrix([2, 4, 8])
independents = Matrix([1, 2, 3]).get_transpose()
y = Matrix([2, 4, 8]).get_transpose()
# let J be the Jacobian of h(x)
J = Matrix([lambda a,x: x*pow(a,x-1)])
# estimate the parameter (the base a of a^x)
Expand Down

0 comments on commit 83642df

Please sign in to comment.