Changelog
Source:NEWS.md
ospsuite.parameteridentification 2.3.0
Breaking changes
- Minimum required
ospsuiteversion is now 12.4.3. The vignettes and tests use the exampleAciclovir.pkmlshipped withospsuite12.4.3 or later, in which the dose parameter is belowEventsinstead ofApplications(#322).
Major changes
-
ParameterIdentificationnow converts parameter values fromPIParameters$unitto the base unit before applying them to the model. Previously they were applied unconverted, so a non-base unit silently optimized the wrong quantity (#300). - With
residualWeightingMethod = "error"andscaling = "log", the error weights now use the SD of the log values:1 / log(GSD)for geometric standard deviations and1 / sqrt(log(1 + (SD / y)^2))for arithmetic standard deviations. Previously they were calculated from the log-transformed observed values as if these were on the linear scale, so the weights were wrong, and observations with a value of 1 or less in the base unit silently got weight 1. Results change for output mappings with log scaling and error weights (#325). - With
residualWeightingMethod = "error"andscaling = "lin", observed values with a geometric standard deviation now get the correct, lower weight. Previously they were weighted too high, the more so the larger the GSD, so results of such fits change (#332). - The objective function of
ParameterIdentificationis faster, most of all for tasks with many simulations, parameters and output mappings. Apart from the simulations themselves, little work is left in an evaluation: the model parameters are looked up once per task, the observed data are converted to base units once per call, and the simulated values and the cost are calculated on numeric vectors instead ofDataCombinedobjects and data frames, apart from the contribution of censored values withobjectiveFunctionType = "m3". The results are identical, apart from the correction of the M3 method for several LLOQs in one output mapping below (#317). In the examples of #303, an evaluation is about 2 to 2.5 times faster, and 7 to 9 times faster where the simulations themselves are fast (#302, #303).
Minor improvements and bug fixes
-
PIResultandPKResultnow reportconvergence = FALSEfor a BOBYQA run that stopped because it reachedmaxevalormaxtime, which was previously reported as converged. A new fieldconvergenceMessagesays why the optimizer stopped, for all algorithms, andfnEvaluationsfor BOBYQA now counts every evaluation of the objective function (#304). -
run()now simulates the start values once before the optimization and stops only if that simulation fails, with the reason and possible remedies. A simulation that fails during the optimization, also at its first evaluation, returns the infinite cost, so DEoptim no longer stops when its first random candidate fails, andestimateCI()no longer stops when a profile likelihood step or bootstrap replicate fails at its first evaluation. Errors that are not failed simulations now stop the run at any evaluation. DEoptim includes the start values in its initial population unlessinitialpopis given, andrun()warns when the simulations failed in more than half of its evaluations. DEoptim results under a fixed seed differ from earlier versions, because the initial population is now drawn before DEoptim starts (#307). - The user guide vignette now sets the maximal number of function evaluations of
BOBYQAwith the optionmaxevalofAlgorithmOptions_BOBYQA. Previously it usedmaxFunctionEvaluations, whichPIConfiguration$algorithmOptionsignored with a warning (#261). -
ParameterIdentificationnow reads the observed data once per call of a method and per bootstrap replicate and caches them, instead of re-reading them from the underlying datasets on every objective function evaluation. This removes the dominant source of R heap growth during long optimizations and bootstrap runs (#271). -
plot.modelCost()now reads the residual columns produced by the cost kernel, so it correctly plots raw residuals against time and overlays the weighted residuals (#275). -
ParameterIdentificationcan now optimize state-variable parameters (those defined by a right-hand-side formula), which previously crashed (#280). -
PIParameters$new()accepts optionalminValue/maxValue, errors on a zero start value when no bounds are supplied, and rejects zero-width bounds (minValue == maxValue) that leave nothing to optimize (#282). - Every method of
ParameterIdentificationthat runs the simulations (run(),estimateCI(),gridSearch(),calculateOFVProfiles()andplotResults()) reads the observed data again at its start, so changes of the observed data sets or of their data transformations between two calls take effect.run()withautoEstimateCI = TRUEreads them once, for the optimization and the confidence intervals (#310). - Every method of
ParameterIdentificationthat runs the simulations now builds the simulation batches again at its start, so changes of the simulations (for example of a dose or a solver setting) and of the observed times (a new data set, orxOffsetsandxFactorsofsetDataTransformations()) after the first call take effect, with the results of a newParameterIdentificationobject. Previously the batches of the first call were reused: such changes were ignored, the simulated values at new observed times were interpolated, and new times outside the simulated times gave an infinite cost. The warning about observed times without simulated values is removed (#319, #329). - A failed simulation is now reported by its name and the reason given by the simulation engine (“Simulation ‘…’ failed: …”), instead of as an error about a
NULLargument, also withpkOutputMappings. If other simulations of the task have the same name, the message gives the position of the failed simulation in the list of simulations.run(),estimateCI(),gridSearch()andcalculateOFVProfiles()no longer show the warning of the simulation engine on every failed evaluation. They log a reason in full only at the first failure of its kind in a call, and later reasons of that kind with their first line only, because a reason can be long, for example the list of all variables that became negative. Reasons are of one kind if their first lines differ only in numbers, such as the time of the failure.plotResults()still shows the warning. WithpkOutputMappings, the failure of a simulation that no PK mapping uses does not fail the evaluation and shows the warning, as before (#299). - An error in the observed data sets of an output mapping or in their data transformations, for example #311 with labels for all data sets, now stops
run(),estimateCI(),gridSearch()andcalculateOFVProfiles()with its own message, as an error in the unit conversion of the observed data already did. Previously it was reported as a failed simulation:run()andestimateCI()stopped with “Initial simulation failed.”, andgridSearch()andcalculateOFVProfiles()returned an infinite objective function value for every point (#310). - With an LLOQ and
objectiveFunctionType = "lsq", a missing simulated value still stops the evaluation, now with an explicit message instead of an error fromtibble(#310). - When no observed or simulated values of an output mapping enter the cost, for example because
xOffsetsofsetDataTransformations()shift all observed times below 0, the error ofParameterIdentificationnow names the output mapping by its position and quantity path and gives the reason. Previously it said “No observed data found when calculating cost function.” (#310). - With
objectiveFunctionType = "m3", the contribution of the values below the LLOQ is now correct when they have different LLOQs, for example in two data sets with different LLOQs in one output mapping. Each such value is now compared with the simulated value at its own time, and withlinScaleCVits standard deviation is calculated from its own LLOQ. Previously an LLOQ could be compared with the simulated value at another time, and a value could get the standard deviation of another LLOQ, so the cost was wrong and depended on the order in which the data sets were added to the output mapping. With one LLOQ per output mapping, the results are unchanged (#317). -
ospsuiteand the other Open Systems Pharmacology packages that this package needs are now installed from the OSP R-universe, also when you install the development version from GitHub. Add the R-universe to your repositories before you install, as shown in the README (#322). - The methods of
ParameterIdentificationno longer change the output selections and output intervals of the simulations, also when they stop with an error. Previously, a laterrunSimulations()could return other outputs at other times (#327).
ospsuite.parameteridentification 2.2.0
Breaking changes
- Minimum required R version is now 4.4, consistent with
ospsuite. -
residualWeightingMethodvalues"std"and"mean"have been removed fromresidualWeightingOptions. UseoutputMapping$scaling = "log"for proportional error handling or"error"for inverse-variance weighting.
Major changes
-
PKOutputMappingadds PK-metric optimization toParameterIdentification: fit one or more parameters to target PK metrics (C_max, AUC_tEnd, etc.) supplied as scalar values or computed from observedDataSetobjects. PK-metric mode and observed time-series mode (viaPIOutputMapping) are mutually exclusive within a singleParameterIdentificationrun. -
PIConfigurationactive bindings (objectiveFunctionOptions,algorithmOptions,ciOptions) now validate input at assignment time, warn on unknown keys, and merge partial lists with current settings. ChangingalgorithmorciMethodresets the corresponding options and emits a message (#228). -
ParameterIdentification$plotResults()migrated from the soft-deprecated tlf-basedospsuiteplotting functions (plotIndividualTimeProfile(),plotObservedVsSimulated(),plotResidualsVsTime()) to the new ospsuite.plots-based equivalents (plotTimeProfile(),plotPredictedVsObserved(),plotResidualsVsCovariate()). TheDefaultPlotConfigurationobject is no longer used; axis scales are derived directly from eachPIOutputMapping$scaling, and the residual sub-plot now matches the mapping’s scale instead of being hard-coded to linear. Visual output ofplotResults()changes accordingly. - Sub-plot composition in
plotResults()switched fromospsuite::plotGrid()topatchwork::wrap_plots(); the returned objects are nowpatchworkobjects rather than the previousospsuiteplot-grid objects.
Minor improvements and bug fixes
-
CIOptions_hessiangainsranddoptions to tune the post-hoc Hessian CI step.rcontrols the number of iterations (minimum2, default4) anddthe fractional step size (default0.1). Reducingrlowers the number of objective function evaluations at the cost of accuracy (#215). -
residualWeightingMethod = "error"now computes arithmetic SD from geometric standard deviation without approximation. A warning is issued when any error values are invalid and fall back to unit weights (#255). - Re-enabled
plotOFVProfiles()for visualizing OFV profiles produced byParameterIdentification$calculateOFVProfiles()(#91). - New
Imports:patchwork(used to compose the sub-plots produced byplotResults()). -
ParameterIdentification$estimateCI()now resets the objective function evaluation counter before each bootstrap iteration and each profile likelihood step, soprintEvaluationFeedbackoutput restarts from 1 for every sub-optimization (#238). -
ParameterIdentificationnow converts observed and simulated data to OSPSuite base units before computing residuals, ensuring consistent and reproducible OFV values (#229, #237). -
PIResult$toDataFrame()now returns one row per parameter path for groupedPIParameters, instead of only the first path (#230). - Removed
clearOutputIntervals()call fromParameterIdentificationinitialization, which could lead to wrong simulation results when events are triggered in time intervals without observed data (#226).
ospsuite.parameteridentification 2.1.1
Breaking Changes
- Default CI options lists were renamed to
CIOptions_hessianandCIOptions_bootstrapfor consistency (#220).
ospsuite.parameteridentification 2.1.0
Breaking changes
- ´ospsuite.parameteridentification
now requiresospsuite.utils` version >= 1.7.0. - ´ospsuite.parameteridentification
now requiresospsuite` version >= 12.2.0. - Optimization and CI results are now returned as a
PIResultobject instead of a list. This provides a unified structure and new helper methods for summaries and export (#196).
Major changes
- Optimization backend refactored for improved robustness. No changes to the user interface (#161, #186).
-
PIOutputMapping: new$setDataWeights()method for assigning weights to observed data sets and individual data points (#178). - New confidence interval methods
PL(profile likelihood) andbootstrapare now supported viaPIConfiguration(#167, #186, #188, #189, #190). - New
PIResultsupports$print(),$toDataFrame(), and$toList()methods for summaries, export, and diagnostics (#196).
Minor improvements and bug fixes
- Improved print outputs for all classes (#171).
- All classes do not inherit from
ospsuite.utils::Printableany more (#171). - Default settings for CI methods are provided through
CIOptions_Hessian,CIOptions_PL, andCIOptions_Bootstrap(#167). - Supports
ArithmeticStdDevandGeometricStdDeverror types passed in the observedDataSetasyErrorType. This has an effect whenresidualWeightingMethod = "error"is set viaPIConfiguration$objectiveFunctionOptions(#181). - Harmonized CI output naming:
sd,se,cvandrseare now used consistently and correctly (#191). - Improved Hessian-based confidence interval estimation: covariance matrix scaled for SSR objective functions (#192).
- Optimization and CI estimation validated against PK-Sim results for the Aciclovir model, confirming correctness of estimates (#193).
- Confidence interval estimation can be disabled by setting
piConfiguration$autoEstimateCI <- FALSE; it can then be run explicitly withParameterIdentification$estimateCI()(#196). - New vignette on confidence intervals, covering available methods, configuration, and result inspection (#198).
- New vignette on data mapping, including adding data weights and set data transformation (#199).
-
PIResultstorescostDetailsfrom the best (minimum modelCost) evaluation rather than the last, ensuring correct output when runs are limited or stop early (#206).
ospsuite.parameteridentification 2.0.2
Major changes
-
ParameterIdentification$gridSearch()andParameterIdentification$calculateOFVProfiles()are made available and refactored for robustness, clarity, and efficiency (#151).
Minor improvements and fixes
-
ParameterIdentificationwill validate observed data availability inPIOutputMappingduring initialization (#145). - Cache Simulation ID in
PIOutputMapping(#146). -
PIOutputMappingwill attempt to retrieve the molecular weight for unit conversion when adding observed data (#147). -
ParameterIdentificationnow differentiates between simulation failures during the first iteration (stopping optimization) and subsequent iterations (returning infinite cost structure) (#148). - Simulation failure in
gridSearchandcalculateOFVProfilewon’t break evaluation and returnInffor specific parameters (#153). - Robust Hessian epsilon calculation in
ParameterIdentification(#160).
ospsuite.parameteridentification 2.0.1
Breaking changes
- Function
getSteadyStatehas been removed in favor ofgetSteadyStatefrom the {ospsuite} package (#128). - Function
validateIsOptionhas been removed in favor ofospsuite.utils::validateIsOption(#130).
ospsuite.parameteridentification 2.0.0
Breaking changes
PIConfigurationnow configures the objective function viaobjectiveFunctionOptions. Users can specify options directly, includingobjectiveFunctionType,residualWeightingMethod,robustMethod,scaleVar, andlinScaleCV(#100).ParameterIdentification$gridSearch()andParameterIdentification$calculateOFVProfiles()functions have been disabled until fixed (#91, #92).
Major changes
-
New
calculateCostMetrics()function inParameterIdentificationenhances model evaluation with integrated configuration viaPIConfiguration. Settings and defaults are specified inObjectiveFunctionOptions(#64, #65, #100).-
objectiveFunctionType:lsqfor least squares orm3for censored data maximum likelihood estimation. -
residualWeightingMethod: options includenone,stdnormalizes by standard deviation for variable data,meanscales by mean for diverse magnitudes, anderrorweights by inverse variance for known error data. -
robustMethod:nonefor uniform treatment,huberorbisquarefor outlier minimization. -
scaleVar: A boolean indicating whether to scale residuals by the number of observations. -
linScaleCV: Numeric coefficient used to calculate standard deviation for linear scaling, applied tolloqvalues whenm3method is used. -
logScaleSD: Numeric standard deviation for logarithmic scaling, applied tolloqvalues whenm3method is used.
-
New
error-calculationvignette, explaining error model methodologies within the ospsuite.parameteridentification package. The document elaborates on the lsq (Least Squares Error) and m3 (Extended Least Squares Error for censored data) error models, along with advanced customization options for error modeling. This resource aids users in refining their parameter identification processes. (#102, #111).New
optimization-algorithmsvignette, introducing algorithms available for parameter estimation and offering insights on their optimal application scenarios (#104, #111).New
user-guidevignette on parameter identification (PI). This vignette provides a comprehensive overview for setting up PI tasks, including defining simulations, specifying parameters to be identified, mapping model outputs to observed data, and configuring optimization tasks. Examples across three complexity levels of models demonstrate the package’s functionality in detail (#48).New
plot.modelCost()function for visualizing raw and weighted residuals frommodelCostobjects (#100).Comprehensive overhaul of documentation, for clarity, comprehensiveness, and ease of navigation for all users (#111).
Unit test overhaul and coverage enhancement, increasing from 67% to 85% (#99, #100, #113).
Minor improvements and fixes
Enhanced error handling now ensures
ParameterIdentificationtasks validate the existence of simulation objects referenced byPIParametersandOutputMappingto prevent runtime errors due to missing dependencies (#117, #120).Enhanced
calculateCostMetrics()output inParameterIdentificationoffers a more detailed results summary for model evaluation. The summary now includesmodelCost,minLogProbability, and acostVariablesdataframe withscaleFactor,nObservations,M3Contribution,SSR(sum of squared residuals),weightedSSR,normalizedSSR, androbustSSR(#100).README file conversion to .rmd format and subsequent updates (#86, #93).
Improved error handling in
ParameterIdentificationfor cases of simulation failure, ensuring consistent and informative error cost structure in output (#66, #70, #100).validateIsOption()ensures user-specified options adhere to defined constraints, enhancing the robustness of user inputs (#100).ParameterIdentificationnow directly accesses default optimization algorithm options forBOBYQA,HJKB, andDEoptimfrom their respective packages (nloptr,{dfoptim}, and DEoptim) if not explicitly defined inPIConfiguration(#48, #81).Continuous Integration/Continuous Deployment pipeline improvements (#95, #106, #110)
ospsuite.parameteridentification 1.3
Breaking changes
- The parameter in the
PIConfigurationclass that is controlling the feedback at each function evaluation is now calledprintEvaluationFeedbackinstead ofprintItera tionFeedback.
Major changes
Added new optimization algorithms: the default local algorithm is now an implementation of the BOBYQA algorithm (bounded optimization by quadratic approximation) from the nloptr package; additional local algorithm is
HJKB, a bounded implementation of the Hooke-Jeeves derivative-free algorithm from the{dfoptim}package; a global algorithm isDEoptimfor differential evolution optimization.FME::modCost()is re-implemented as part of the parameter identification package and used for calculation of residuals.
ospsuite.parameteridentification 1.2
Breaking changes
- requires ospsuite v11.1 or later.
Minor bug fixes and improvements
-
getSteadyState()accepts steady state time individually for each simulation.