:orphan: 





.. _flip_flop_bad_pop_tut:



Flip Flop tutorial with inaccurate starting values
##################################################

[Generated automatically as a Tutorial summary]

Model Description
*****************


:Name: flip_flop_bad_pop

:Title: Flip Flop tutorial with inaccurate starting values

:Author: PoPy for PK/PD

:Abstract: 

| One compartment model with a depot leading into a central compartment.
| Note another interpretation of this is that the model is just over parametrised. Because here
| the KE and V parameters act independently unlike the CL/V and V parametrisation.
| Here initial values of KE, KA, V are close to the flipped values, so we get a bad fit in the false minima.

:Keywords: one compartment model; flip flop; dep_one_cmp_k; poor start values

:Input Script: :download:`flip_flop_bad_tut.pyml <flip_flop_bad_tut.pyml>`

:Diagram: 


.. thumbnail:: compartment_diagram.svg
    :width: 200px


Comparison
**********



True objective value
====================


.. code-block:: pyml

    -275.3301



Final fitted objective value
============================


.. code-block:: pyml

    -194.0807



Compare Main f[X]
=================



.. csv-table:: 
    :file: fx_comp_main.csv
    :header-rows: 1


Compare Noise f[X]
==================



.. csv-table:: 
    :file: fx_comp_noise.csv
    :header-rows: 1


Compare Variance f[X]
=====================



.. csv-table:: 
    :file: fx_comp_variance.csv
    :header-rows: 1


Outputs
*******



Fitted f[X] values (after fitting)
==================================


.. code-block:: pyml

    f[KE] = 0.7720
    f[V] = 1.3534
    f[KA] = 0.0210
    f[PNOISE] = 0.0083
    f[ANOISE] = 0.0543
    f[KE_isv,V_isv,KA_isv] = [
        [ 0.1251, -0.3020, -0.2594 ],
        [ -0.3020, 0.9707, 0.8752 ],
        [ -0.2594, 0.8752, 0.8327 ],
    ]



Generated data .csv file
========================


:Synthetic Data: :download:`synthetic_data.csv <synthetic_data.csv>`


Gen and Fit Summaries
=====================


* Gen: :ref:`flip_flop_bad_pop_gen` (gen)
* Fit: :ref:`flip_flop_bad_pop_fit` (fit)

Inputs
******



True f[X] values (for simulation)
=================================

.. code-block:: pyml

    f[KE] = 0.0500
    f[V] = 40.0000
    f[KA] = 0.6000
    f[PNOISE] = 0.0100
    f[ANOISE] = 0.0500
    f[KE_isv,V_isv,KA_isv] = [
        [ 0.0500, 0.0000, 0.0000 ],
        [ 0.0000, 0.0500, 0.0000 ],
        [ 0.0000, 0.0000, 0.0500 ],
    ]



Starting f[X] values (before fitting)
=====================================

.. code-block:: pyml

    f[KE] = 0.4000
    f[V] = 5.0000
    f[KA] = 0.2000
    f[PNOISE] = 0.0500
    f[ANOISE] = 0.1000
    f[KE_isv,V_isv,KA_isv] = [
        [ 0.0200, 0.0000, 0.0000 ],
        [ 0.0000, 0.0200, 0.0000 ],
        [ 0.0000, 0.0000, 0.0200 ],
    ]

