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

Error plotting "Residuals vs time" #677

Closed
PavelBal opened this issue Jan 25, 2022 · 9 comments
Closed

Error plotting "Residuals vs time" #677

PavelBal opened this issue Jan 25, 2022 · 9 comments

Comments

@PavelBal
Copy link
Member

image

I can send you the project via email (who wants? @msevestre @Yuri05 )

@msevestre
Copy link
Member

Bring it on

@PavelBal
Copy link
Member Author

No need, it is here:

https://github.com/Open-Systems-Pharmacology/OSPSuite.Core/blob/5f6a4d0e86361c1489369066b46f70ac8bca8f19/src/OSPSuite.Presentation/Presenters/ParameterIdentifications/ParameterIdentificationResidualVsTimeChartPresenter.cs#L88-L95

In case all data used in the PI have only one time point which is identical,

dataRepository.BaseGrid.Values = new[] {_parameterIdentification.MinObservedDataTime, _parameterIdentification.MaxObservedDataTime};

creates a repository with two identical time points. I would propose to use something like

dataRepository.BaseGrid.Values = new[] {_parameterIdentification.MinObservedDataTime * 0.1, _parameterIdentification.MaxObservedDataTime * 1.1};

@PavelBal
Copy link
Member Author

Or use some +-epsilon (I saw it somewhere else for axis extension). That way you would also cover the use case if min and max data time is 0 (for whatever reason).

@msevestre
Copy link
Member

Interesting.....we can make it work

@Yuri05
Copy link
Member

Yuri05 commented Mar 29, 2023

is adding just 1 value somehow a problem?
If not: I would prefer an explicit check (Min == Max) and inserting just 1 value in this case instead of extending the range with factor or epsilon.

@rwmcintosh
Copy link
Member

I'll try some stuff out, but I think it's not a problem to add 1 point. The problem is when you add two points that are the same.
The error is only thrown if you go through all values and find non-increasing.

So these special cases where we always add two, maybe we just need to add a single point when they are the same. I'll see how it works.

https://github.com/Open-Systems-Pharmacology/OSPSuite.Core/blob/e61b6c65776abfddb481a74d26479c7d55c65bbe/src/OSPSuite.Core/Domain/Data/BaseGrid.cs#L33-L53

@rwmcintosh
Copy link
Member

It works well, but we use dashed line with no point marker by default for this zero indicator. When you have a single point, there's not much to see!

@Yuri05
Copy link
Member

Yuri05 commented Mar 29, 2023

It works well, but we use dashed line with no point marker by default for this zero indicator. When you have a single point, there's not much to see!

I would say it's OK. If you have only 1 point - it's most likely above LLOQ
(and I would argue that a dataset with just 1 point which is below LLOQ is garbage - in such a case I would even show a warning when importing and ask user if he really wants to import. But that's a wish for later :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants