Skip to content

feat: compute the jacobian analytically - #134

Merged
jobo322 merged 1 commit into
mainfrom
feat/split-gaussian
Sep 2, 2026
Merged

feat: compute the jacobian analytically#134
jobo322 merged 1 commit into
mainfrom
feat/split-gaussian

Conversation

@lpatiny

@lpatiny lpatiny commented Aug 27, 2026

Copy link
Copy Markdown
Member

Also stops optimize from mutating the peaks it receives, aligns tooling with current standards, fixes the README example and reworks the web demo.

Sum of gaussians, 1024 points
numerical -> analytical (ms):

  • 1 peak 15.2->21.8
  • 3 peaks 63.2->37.4
  • 5 peaks 138.7->57.0
  • 10 peaks 522.1->127.2
  • 20 peaks 1965.8->352.8
  • 10 pseudoVoigt 823.0->208.1

Fitted parameters unchanged. Only pays off from ~2 peaks: for a single one the per-point derivative allocations cost more than 3 model evaluations.

Assisted-By: Claude Opus 5 (1M context) noreply@anthropic.com

Also stops optimize from mutating the peaks it receives, aligns tooling with
current standards, fixes the README example and reworks the web demo.

Sum of gaussians, 1024 points, numerical -> analytical (ms):
1 peak 15.2->21.8, 3 peaks 63.2->37.4, 5 peaks 138.7->57.0,
10 peaks 522.1->127.2, 20 peaks 1965.8->352.8, 10 pseudoVoigt 823.0->208.1.
Fitted parameters unchanged. Only pays off from ~2 peaks: for a single one
the per-point derivative allocations cost more than 3 model evaluations.

Assisted-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lpatiny
lpatiny requested a review from jobo322 August 27, 2026 11:33
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.20879% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.85%. Comparing base (e5d13e7) to head (369786f).

Files with missing lines Patch % Lines
src/util/internalPeaks/DefaultParameters.ts 78.37% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
+ Coverage   97.54%   97.85%   +0.31%     
==========================================
  Files          11       13       +2     
  Lines         366      420      +54     
  Branches       71       73       +2     
==========================================
+ Hits          357      411      +54     
  Misses          9        9              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jobo322 jobo322 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine, and also fix a side effect

@jobo322
jobo322 merged commit 063e2af into main Sep 2, 2026
9 of 10 checks passed
@jobo322
jobo322 deleted the feat/split-gaussian branch September 2, 2026 23:53
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.

2 participants