Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aic dofv #731

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Add aic dofv #731

wants to merge 2 commits into from

Conversation

barrettk
Copy link
Collaborator

@barrettk barrettk commented Jan 7, 2025

Add AIC, BIC, and DOFV columns to the summary_log

  • This PR branches off the latest model_tree PR because certain fixes were needed in order to rely on make_tree_data, which is used to link the models when calculating dofv (see first commit for more details).

closes #677

 - These 3 columns can be turned off by passing `calc_aic_bic = FALSE` and `calc_dofv = FALSE` to the summary log implementation function (passed via `...`). This was done for bootstrap summarization, but may be necessary for other model types as well.

 - Note about dofv: adding support for calculating the difference between objective function values ended up being more complicated than originally thought. The reason being that we have to take nested directories into account. The prototype function simply used the run and based_on columns, but this doesnt work when searching recursively, because based_on specifiers would be displayed as '../2', which wouldnt show up in the run column. Fortunately we did already have a method for linking models, but _unfortunately_ it's tied up in the model_tree functions (specifically make_tree_data). This leads to some unnecessary computation. Refactoring the linking to be a separate helper function is out of scope for this PR, though that should probably be done at some point.
 - subtracting `2` in the first case wasn't initially obvious. This would have to be adjusted if more columns overlap in the future. I considered adding `based_on` to the summary_log for clarity on `dofv`, but this presented additional issues that would have led to more invasive changes.

 - To the same effect, specify the column name in the second case. The index had to be changed when adding another overlapping column between the log types. To avoid uneccesssary fixes in the future, we just specify the intended column by name now.
@barrettk barrettk marked this pull request as draft January 7, 2025 19:26
@barrettk
Copy link
Collaborator Author

barrettk commented Jan 7, 2025

Still need to write tests, but the prototype is complete. I think this is a good place to gather feedback before continuing.

@barrettk
Copy link
Collaborator Author

barrettk commented Jan 7, 2025

@callistosp can you take a look at how I calculated BIC when you get a chance?

I think we'll want to have some more design discussions (from both a user/scientist and technical perspective) too, but wanted to confirm that part early on.

@callistosp
Copy link
Collaborator

LGTM

@seth127 seth127 added the needs SME input SME = Subject Matter Expert label Jan 9, 2025
Base automatically changed from model_tree/no_start to main January 15, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs SME input SME = Subject Matter Expert
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants