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 goodness of fit plot #192

Merged
merged 3 commits into from
Feb 1, 2023
Merged

add goodness of fit plot #192

merged 3 commits into from
Feb 1, 2023

Conversation

plakrisenko
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2023

Codecov Report

Merging #192 (d04552a) into develop (4d227bd) will increase coverage by 0.12%.
The diff coverage is 92.85%.

@@             Coverage Diff             @@
##           develop     #192      +/-   ##
===========================================
+ Coverage    77.91%   78.04%   +0.12%     
===========================================
  Files           32       32              
  Lines         2884     2910      +26     
  Branches       686      688       +2     
===========================================
+ Hits          2247     2271      +24     
  Misses         461      461              
- Partials       176      178       +2     
Impacted Files Coverage Δ
petab/visualize/plot_residuals.py 85.07% <92.59%> (+4.58%) ⬆️
petab/visualize/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

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

Seems like a useful verification of a good fit. Not sure on specific measures in case it is not a good fit.

Comment on lines +144 to +146
slope, intercept, r_value, p_value, std_err = stats.linregress(
petab_problem.measurement_df['measurement'],
simulations_df['simulation']) # x, y
Copy link
Collaborator

Choose a reason for hiding this comment

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

you calculate here the linear regression between measurement and simulation. What would it tell me if this is not a diagonal plot?

Copy link
Member Author

Choose a reason for hiding this comment

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

You could see here if simulated values tend to be larger or smaller that measurement values. This plot probably won't be useful in every case. Also it gives some measure of how much off the simulation is.
It could be useful if one wants to compare different approaches to fit the model.

Copy link
Member

@dilpath dilpath left a comment

Choose a reason for hiding this comment

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

👍

Could add an example to a notebook

@plakrisenko plakrisenko marked this pull request as ready for review February 1, 2023 17:44
@plakrisenko plakrisenko merged commit 5868dd4 into develop Feb 1, 2023
@dweindl dweindl deleted the goodness_of_fit branch February 28, 2023 14:51
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.

4 participants