Fix best-metric highlighting for LL/AIC/BIC and add "always" to update_check options#311
Draft
Fix best-metric highlighting for LL/AIC/BIC and add "always" to update_check options#311
Conversation
Add BestDose dose optimization feature ported from Pmetrics_rust bestdose branch: - R/PM_bestdose.R: PM_bestdose and PM_bestdose_problem R6 classes for Bayesian dose optimization with support for concentration and AUC targets - src/rust/src/bestdose_executor.rs: Rust backend for BestDose optimization using pmcore's BestDoseProblem with ODE model support - Updated lib.rs with bestdose, bestdose_prepare, bestdose_optimize exports - Updated extendr-wrappers.R with R-side wrapper functions - Updated NAMESPACE with PM_bestdose, PM_bestdose_problem, bestdose exports - Bumped pmcore dependency from 0.21.1 to 0.22.1 (required for bestdose) - Added libloading dependency for dynamic model loading - Added bestdose example data (past, prior, target CSVs) and test script - Fixed executor.rs mutability issue for pmcore 0.22.1 compatibility
Reworked bd and bd_post R6 classes: bd_post$optimize() now returns a bd object, and bd$new() supports one-shot usage. Removed dead Rust code (bestdose(), bestdose_ode(), bestdose_analytical()). Fixed bias_weight being NULL and print() breaking with variable dose counts. Updated PMcore dep to use relative time_offset gap semantics.
- Combine clean one-shot/two-stage API with inline future=list(...) support - Add top-5 weighted plot curves, triangle dose indicators, plot() method - Fix .sim_future() dose recycling when past doses are present
…sed most of the logs for bestdose, needs more work
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Merged
Co-authored-by: mnneely <8136142+mnneely@users.noreply.github.com> Agent-Logs-Url: https://github.com/LAPKB/Pmetrics/sessions/f7ba0437-32d3-4fde-a701-6fc9aa94e8b1
Copilot
AI
changed the title
[WIP] Update bug fixes and feature enhancements
Fix best-metric highlighting for LL/AIC/BIC and add "always" to update_check options
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bugs from the
ab132e5review: LL/AIC/BIC "best" detection used closest-to-0 instead of minimum, and"always"was a supportedupdate_checkvalue that couldn't be persisted through the UI.Changes
R/PM_compare.R+R/PMutilities.R— Replace single-target heuristic with three-way logic:LL$|AIC$|BIC$→min(x)(smallest is best)Sl|R2→ closest to 1R/PMoptions.R— Add"always"to the validation allowlist and to the Shiny UIselectInputchoices, so it can round-trip through the options UI (it was already handled bypm_update_interval_days()but silently replaced with"weekly"on save).💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.