:orphan: 





.. _flip_flop_bad_pop_fit:



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

[Generated automatically as a Fitting 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_pop_fit.pyml <flip_flop_bad_pop_fit.pyml>`

:Diagram: 


.. thumbnail:: flip_flop_bad_pop_fit.pyml_output/compartment_diagram.svg
    :width: 200px


Comparison
**********



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


===============  ================  ==============  ============  =============
Variable Name      Starting Value    Fitted Value    Abs Change    Prop Change
===============  ================  ==============  ============  =============
f[KE]                      0.4000          0.7720        0.3720         0.9300
f[V]                       5.0000          1.3534        3.6466         0.7293
f[KA]                      0.2000          0.0210        0.1790         0.8949
===============  ================  ==============  ============  =============

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


===============  ================  ==============  ============  =============
Variable Name      Starting Value    Fitted Value    Abs Change    Prop Change
===============  ================  ==============  ============  =============
f[PNOISE]                  0.0500          0.0083        0.0417         0.8348
f[ANOISE]                  0.1000          0.0543        0.0457         0.4571
===============  ================  ==============  ============  =============

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


================  ================  ==============  ============  =============
Variable Name       Starting Value    Fitted Value    Abs Change    Prop Change
================  ================  ==============  ============  =============
f[KE_isv]                   0.0200          0.1251        0.1051         5.2572
f[KE_isv;V_isv]             0.0000         -0.3020        0.3020       INF
f[KE_isv;KA_isv]            0.0000         -0.2594        0.2594       INF
f[V_isv;KE_isv]             0.0000         -0.3020        0.3020       INF
f[V_isv]                    0.0200          0.9707        0.9507        47.5341
f[V_isv;KA_isv]             0.0000          0.8752        0.8752       INF
f[KA_isv;KE_isv]            0.0000         -0.2594        0.2594       INF
f[KA_isv;V_isv]             0.0000          0.8752        0.8752       INF
f[KA_isv]                   0.0200          0.8327        0.8127        40.6361
================  ================  ==============  ============  =============

Individual simulated (sim) plots
================================



.. thumbnail:: images/fit_sim_grph_outputs/indOBS_vs_TIME/000001.svg
    :width: 200px


.. thumbnail:: images/fit_sim_grph_outputs/indOBS_vs_TIME/000002.svg
    :width: 200px


.. thumbnail:: images/fit_sim_grph_outputs/indOBS_vs_TIME/000003.svg
    :width: 200px


Alternatively see :ref:`flip_flop_bad_pop_simulated_sim_plots`

Population simulated (sim) plots
================================


(No population graphs were requested.)

Outputs
*******



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

.. code-block:: pyml

    -194.0802


which required 1.30 iterations and took 90.87 seconds

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 ],
    ]



Fitted parameter .csv files
===========================


:Fixed Effects: :download:`fx_params.csv (fit) <flip_flop_bad_pop_fit.pyml_output/solN/fx_params.csv>`

:Random Effects: :download:`rx_params.csv (fit) <flip_flop_bad_pop_fit.pyml_output/solN/rx_params.csv>`

:Model params: :download:`mx_params.csv (fit) <flip_flop_bad_pop_fit.pyml_output/solN/mx_params.csv>`

:State values: :download:`sx_params.csv (fit) <flip_flop_bad_pop_fit.pyml_output/solN/sx_params.csv>`

:Predictions: :download:`px_params.csv (fit) <flip_flop_bad_pop_fit.pyml_output/solN/px_params.csv>`

:Likelihoods: :download:`lx_params.csv (fit) <flip_flop_bad_pop_fit.pyml_output/solN/lx_params.csv>`



Inputs
******


:Input Data: :download:`cx_obs_params.csv <cx_obs_params.csv>`


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 ],
    ]

