:orphan: 





.. _gen_diag_fit_diag_tut:



Diagonal matrix generation diagonal matrix fit
##############################################

[Generated automatically as a Tutorial summary]

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


:Name: gen_diag_fit_diag

:Title: Diagonal matrix generation diagonal matrix fit

:Author: PoPy for PK/PD

:Abstract: 

| One compartment model with absorption compartment and CL/V parametrisation.
| This script uses a diagonal covariance matrix to generate the data and a diagonal covariance matrix to fit.

:Keywords: one compartment model; dep_one_cmp_cl; diagonal matrix

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

:Diagram: 


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


Comparison
**********



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


.. code-block:: pyml

    -2170.8804



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


.. code-block:: pyml

    -2172.8028



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


No Main f[X] values to compare.

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


No Noise f[X] values to compare.

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[KA] = 0.3000
    f[CL] = 3.0000
    f[V] = 20.0000
    f[PNOISE_STD] = 0.1000
    f[ANOISE_STD] = 0.0500
    f[CL_isv,V_isv] = [
        [ 0.1784, 0.0000 ],
        [ 0.0000, 0.0881 ],
    ]



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


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


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


* Gen: :ref:`gen_diag_fit_diag_gen` (gen)
* Fit: :ref:`gen_diag_fit_diag_fit` (fit)

Inputs
******



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

.. code-block:: pyml

    f[KA] = 0.3000
    f[CL] = 3.0000
    f[V] = 20.0000
    f[PNOISE_STD] = 0.1000
    f[ANOISE_STD] = 0.0500
    f[CL_isv,V_isv] = [
        [ 0.2000, 0.0000 ],
        [ 0.0000, 0.1000 ],
    ]



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

.. code-block:: pyml

    f[KA] = 0.3000
    f[CL] = 3.0000
    f[V] = 20.0000
    f[PNOISE_STD] = 0.1000
    f[ANOISE_STD] = 0.0500
    f[CL_isv,V_isv] = [
        [ 0.0100, 0.0000 ],
        [ 0.0000, 0.0100 ],
    ]

