Skip to content

feat: Chain fit methods using result#284

Open
Siel wants to merge 3 commits into
unified-platform-structurefrom
feature/chain_bootstrap_iov
Open

feat: Chain fit methods using result#284
Siel wants to merge 3 commits into
unified-platform-structurefrom
feature/chain_bootstrap_iov

Conversation

@Siel

@Siel Siel commented Jun 23, 2026

Copy link
Copy Markdown
Member

No description provided.

@Siel Siel changed the title initial shot Chain_bootstrap_IoV Jun 23, 2026
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchfeature/chain_bootstrap_iov
Testbedmhovd-pgx
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
bimodal_ke_npag📈 view plot
🚷 view threshold
4,963.80 ms
(+1.74%)Baseline: 4,879.07 ms
5,360.95 ms
(92.59%)
bimodal_ke_npod📈 view plot
🚷 view threshold
1,468.40 ms
(+7.95%)Baseline: 1,360.23 ms
1,614.47 ms
(90.95%)
bimodal_ke_postprob📈 view plot
🚷 view threshold
514.98 ms
(+90.63%)Baseline: 270.15 ms
753.68 ms
(68.33%)
🐰 View full continuous benchmarking report in Bencher

@mhovd mhovd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall great additions, just not sure about the bootstrapping.
Maybe we can extract it and discuss it more? Or implement directly in Pmetrics if needed.

You can also decide on the placement of the IOV module.

/// [`Theta::latin`], and [`Theta::from_file`].
///
/// See the [module-level documentation](self) for details.
pub fn bootstrap_theta<ESource: Equation, ETarget: Equation + EquationMetadataSource>(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am not sure about this functionality. Preferrably this should be in a different PR to be discussed.

// Chain: NPAG runs first, then NPOD continues from its result
let result = EstimationProblem::nonparametric(eq, data, prior, error_models)?
.fit_with(NpagConfig::new().max_cycles(10))?
.chain(NpodConfig::new().max_cycles(5))?;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is great!

Comment thread src/iov/mod.rs
@@ -0,0 +1,243 @@
//! SDE-based Inter-Occasion Variability (IOV) analysis.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This module should probably be a child of the nonparametric module, due to its dependency on ´Theta`.
Alternatively, written as a trait or as a generic over the framework (P vs NP).

Comment thread src/iov/mod.rs
///
/// Free-function form of [`DiffusionOptimize::optimize_diffusion`].
/// Prefer `sde.optimize_diffusion(...)` for readability.
pub fn optimize_diffusion(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should be a method on SDE only

@mhovd mhovd changed the title Chain_bootstrap_IoV feat: Chain fit methods using result Jun 25, 2026
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