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

11.1 Observed data mapping in a simulation: Default Scaling #1749

Closed
georgeDaskalakis opened this issue Nov 8, 2022 · 0 comments · Fixed by #1751
Closed

11.1 Observed data mapping in a simulation: Default Scaling #1749

georgeDaskalakis opened this issue Nov 8, 2022 · 0 comments · Fixed by #1751

Comments

@georgeDaskalakis
Copy link
Contributor

@Yuri05 commented on Thu Nov 03 2022

When we add an observed data set in a Parameter IDentification: Default Scaling is Log:

But when adding obs data to a simulation: default scaling is Linear:

Should we make it consistent and set the default scaling for obs data in a simulation to Log as well?


@PavelBal commented on Thu Nov 03 2022

Consistent would be good, if we (@georgeDaskalakis ) understand how the defaults are selected. For PI, the default scaling is not always log but depends on the selected output. If we can easily re-use the code - than yes, it should also be used in the simulation.


@Yuri05 commented on Thu Nov 03 2022

or PI, the default scaling is not always log but depends on the selected output.

makes sense :)

It is defined here:

public Scalings DefaultScalingFor(IQuantity output)
{
return output.IsFraction() ? Scalings.Linear : Scalings.Log;
}


@PavelBal commented on Thu Nov 03 2022

@georgeDaskalakis I think this will a be quick fix, right?


@msevestre commented on Thu Nov 03 2022

This should absolutely be the same and the same code should be reused (not copy paste please).


@georgeDaskalakis commented on Thu Nov 03 2022

I cannot reproduce it tbh. The code that you are pointing to @Yuri05 is also the exact same that is being used for the mapping in Simulation: it was moved from Parameter Identification to this newly created OutputMappingMatchingTask, and the simulation mapping happens here:

newOutputMapping.Scaling = DefaultScalingFor(matchingOutput);

when a new observed data is added.

What does happen for sure is that when a matching output is not found the scaling is left to "linear", but this also happens when I add an output mapping to PI. Do you maybe have a project for me to reproduce?


@Yuri05 commented on Thu Nov 03 2022

Do you maybe have a project for me to reproduce?

e.g. the project from Open-Systems-Pharmacology/PK-Sim#2384


@Yuri05 commented on Thu Nov 03 2022

What does happen for sure is that when a matching output is not found the scaling is left to "linear"

That's probably the reason. Of course, the scaling could be deduced either from the observed data and not from the mapped simulated output (simulated output mapped later on must have the same dimension anyway). Or as soon as a simulation output is mapped by user.

The latter happens actually in a PI. When adding new output mapping - it's set to linear. But when I e.g. select a concentration simulation output - it automatically changes to log.

Not a big issue for me though.


@georgeDaskalakis commented on Fri Nov 04 2022

@Yuri05 yeap this does makes sense: in Simulations the default scaling is being calculated and set only when automatically mapping newly added observed data to an output, not when changing the output selection. Should not be that hard to add this, if I cna implement it fast I will.

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 a pull request may close this issue.

1 participant