Skip to content

Commit

Permalink
fix typo in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Daiver committed Sep 4, 2019
1 parent 23636f4 commit c2310cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pygauss_newton/gauss_newton.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
class Settings:
def __init__(self,
n_max_iterations=50,
dumping_constant=0.0,
damping_constant=0.0,
loss_stop_threshold=0.0,
grad_norm_stop_threshold=0.0,
step_norm_stop_threshold=0.0,
verbose=True):
self.n_max_iterations = n_max_iterations
self.dumping_constant = dumping_constant
self.damping_constant = damping_constant

self.loss_stop_threshold = loss_stop_threshold
self.grad_norm_stop_threshold = grad_norm_stop_threshold
Expand Down Expand Up @@ -74,7 +74,7 @@ def gauss_newton(
state.loss_val = 0.5 * state.residuals_val.T @ state.residuals_val

state.hessian_val = state.jacobian_val.T @ state.jacobian_val
state.hessian_val += settings.dumping_constant * eye
state.hessian_val += settings.damping_constant * eye

state.step_val = -np.linalg.solve(state.hessian_val, state.gradient_val)
state.step_norm = np.linalg.norm(state.step_val)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name="pygauss_newton",
version="0.0.16",
version="0.0.17",
author="Daiver",
author_email="ra22341@ya.ru",
description="",
Expand Down

0 comments on commit c2310cd

Please # to comment.