remove non-parametric fitting method#63
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the non-parametric (NP) fitting feature set from PKPDmap, including the hybrid NP pathway, related helpers, exports, and documentation, to avoid carrying non-operational/dead code.
Changes:
- Removed NP estimation implementation files (
np_fit_wrapper,get_np_estimates, grid creation, default NP settings) and their generated man pages. - Updated
get_map_estimates()to drop thenp_settingsargument and remove thenp_hybridexecution path. - Updated NAMESPACE + documentation (README/man/CLAUDE) to stop advertising NP methods.
Reviewed changes
Copilot reviewed 12 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Removed NP method bullets from the estimation-method list. |
| R/np_settings_default.R | Deleted NP default settings object. |
| R/np_fit_wrapper.R | Deleted NP wrapper used by hybrid estimation. |
| R/get_np_estimates.R | Deleted NP grid-based estimator implementation. |
| R/get_map_estimates.R | Removed np_settings arg and np_hybrid branch from main API. |
| R/create_grid_around_parameters.R | Deleted grid helper used by NP estimation. |
| NAMESPACE | Removed exports for NP-related functions/objects. |
| man/parse_weights.Rd | Updated wording to remove NP mention. |
| man/parse_residuals_from_predictions.Rd | Updated wording to remove NP mention. |
| man/np_settings_default.Rd | Deleted generated docs for np_settings_default. |
| man/np_fit_wrapper.Rd | Deleted generated docs for np_fit_wrapper. |
| man/ll_func_PKPDsim.Rd | Updated wording to remove NP mention. |
| man/get_np_estimates.Rd | Deleted generated docs for get_np_estimates. |
| man/get_map_estimates.Rd | Removed np_settings and NP-related type options from docs. |
| man/create_grid_around_parameters.Rd | Deleted generated docs for grid helper. |
| man/check_inputs.Rd | Updated type option wording to remove NP mention. |
| man/calc_residuals.Rd | Updated wording to remove NP mention. |
| CLAUDE.md | Removed NP method bullets and pipeline references, but retains NP mention in overview text. |
Files not reviewed (6)
- man/calc_residuals.Rd: Generated file
- man/check_inputs.Rd: Generated file
- man/get_map_estimates.Rd: Generated file
- man/ll_func_PKPDsim.Rd: Generated file
- man/parse_residuals_from_predictions.Rd: Generated file
- man/parse_weights.Rd: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mccarthy-m-g
approved these changes
Jul 10, 2026
mccarthy-m-g
left a comment
Contributor
There was a problem hiding this comment.
Nice catch! Changes look good to me. Will leave final judgement on whether to remove or fix to @roninsightrx
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.
While debugging some install messages, I noticed we were getting the following log during PKPDmap install:
I thought this was an odd but easy fix, so I tried adding the argument to the function, since it can be passed on to PKPDsim within the function easily enough.
When doing that fix, I realized there were some other issues. We were also using a variable called
errorbut not passing it onto the function, and so callingnp_fit_wrapperwould have been erroring anyways due to a variable not being found in scope. I then tried adding that argument too (easily available within PKPDmap::get_map_estimates), and I added a unit test.However, upon trying to write a meaningful unit test, I learned that np_fit_wrapper silently only supported models parameterized by CL and V, in that order (example hardcoding:
PKPDmap/R/get_np_estimates.R
Line 25 in ce1f15e
However, if we want to start extending it into something useful again, my original fixes are in this branch: https://github.com/InsightRX/PKPDmap/tree/np_fit_fix1.