Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snnls: double addition of regularization term #103

Closed
stestoll opened this issue Mar 18, 2021 · 1 comment · Fixed by #108
Closed

snnls: double addition of regularization term #103

stestoll opened this issue Mar 18, 2021 · 1 comment · Fixed by #108
Assignees
Labels
bug Something isn't working
Milestone

Comments

@stestoll
Copy link
Collaborator

stestoll commented Mar 18, 2021

As noted by @mtessmer, ResidualFcn in snnls.py seems to be adding the regularization term twice, once prior to calling _augment, and then again in _augment itself. It should only be once.

Here is the place in snnls.py:

if includePenalty:
    penalty = alpha*L@linfit
    # Augmented residual
    res = np.concatenate((res, penalty))     #    <---  first addition
    res, _ = _augment(res, [], regtype, alpha, L, linfit, huberparam, Nnonlin)    #   <---- second addition
@stestoll stestoll added the bug Something isn't working label Mar 18, 2021
@stestoll stestoll added this to the 0.13.0 milestone Mar 18, 2021
@stestoll stestoll changed the title snnls: double addition of regularization operator snnls: double addition of regularization term Mar 18, 2021
@luisfabib
Copy link
Collaborator

I already have applied the appropiate changes on my local copy. After I run a couple of checks, a PR will follow tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants