Skip to content

add LPV estimation method - #197

Merged
baggepinnen merged 6 commits into
masterfrom
lpv
May 13, 2026
Merged

baggepinnen merged 6 commits into
masterfrom
lpv

Conversation

@baggepinnen

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented May 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.92035% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.56%. Comparing base (b1564cd) to head (aafdc74).

Files with missing lines Patch % Lines
src/lpv.jl 92.92% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #197      +/-   ##
==========================================
+ Coverage   89.25%   89.56%   +0.30%     
==========================================
  Files          14       15       +1     
  Lines        2466     2692     +226     
==========================================
+ Hits         2201     2411     +210     
- Misses        265      281      +16     
Flag Coverage Δ
unittests 89.56% <92.92%> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

baggepinnen and others added 4 commits May 13, 2026 08:34
Documenter evaluates @example blocks at module top-level, where the soft-scope
rule makes `x = ... * x + ...` inside a for-loop create a new uninitialized
local that shadows the outer `x = zeros(2)`. Wrapping each simulation in a
let-block gives the loop hard scope and unblocks the docs build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Refactor the loss into _lpv_dataset_predloss so both single- and
  multi-dataset paths share the inner LTV timestepping loop.
* New lpv_pem(ds, λs, nx; ...) and lpv_warmstart(ds, λs, nx; ...) methods
  that jointly fit θ and K across a vector of experiments while keeping
  a per-experiment initial state x0::Matrix of shape (nx, length(ds)).
* Single-dataset methods now delegate to the multi-dataset implementation
  and unwrap x0 to a Vector — backward-compatible.
* Validate matching Ts/nu/ny across datasets (same as arx, era).
* Add test_lpv "LPV PEM multi-dataset" verifying joint fit, x0 shape,
  per-dataset prediction MSE, and joint-beats-single comparison.
* Mark LPVStateSpace, lpv_pem, lpv_warmstart, and the docs example with
  !!! warning "Experimental" admonitions matching the existing style used
  for nonlinear_pem in src/pem.jl:633.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A narrative comment between the docstring closing `"""` and the
`function lpv_pem(...)` definition broke the docstring binding so
Documenter could not resolve [`lpv_pem`](@ref) anywhere. Drop the
comment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@baggepinnen
baggepinnen merged commit 82402f8 into master May 13, 2026
4 checks passed
@baggepinnen
baggepinnen deleted the lpv branch May 13, 2026 10:57
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.

1 participant