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

BUG(shells): fix and improve partition() with NNLS #145

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Conversation

ntessore
Copy link
Collaborator

@ntessore ntessore commented Jan 7, 2024

Most importantly, fixes a bug in partition_nnls() which rendered that function useless.

Secondly, optimises partition_nnls() by using a QR factorisation of the problem before calling nnls() on an equivalent but much smaller problem.

Finally, adds a new integral constraint for both nnls and lstsq which ensures that the sum of the partition recovers the integral of the input function.

Fixes: #144
Fixed: A bug in partition() with the default method.
Changed: Both partition(method="nnls") and partition(method="lstsq") now have an additional integral constraint so that the sum of the partition recovers the integral of the input function.

@ntessore ntessore merged commit 8a170b5 into main Jan 7, 2024
10 checks passed
@ntessore ntessore deleted the pr/gh-144 branch January 7, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix and improve non-negative partition()
1 participant