:orphan:

.. The content of this file was generated
.. automatically by the popy.conf.fio.rstdoc_writer module
.. at 19 Mar 2026, 01:37:09


.. _fit_spec:



.. _fit-x-method-options-x-spec:

METHOD_OPTIONS
**************

Type: :term:`dict_record <dict_record>`

method options for fit_script

Example:-

.. code-block:: pyml

    METHOD_OPTIONS:
        py_module: fit
        rand_seed: 12345
        float_format: default
        restart_from_cached: False


.. _fit-x-method-options-x-py-module-x-spec:

py_module
=========

Type: :term:`one_of(fit) <one_of>`

Python module required to process this script file

Example:-

.. code-block:: pyml

    py_module: fit


.. _fit-x-method-options-x-rand-seed-x-spec:

rand_seed
=========

Type: :term:`int <int>` / :term:`auto <auto>`

Option to set seed to make run result
reproducible -e.g. when debugging.

Example:-

.. code-block:: pyml

    rand_seed: 12345


.. _fit-x-method-options-x-float-format-x-spec:

float_format
============

Type: :term:`str <str>`

Format string for numerical output

Example:-

.. code-block:: pyml

    float_format: default


.. _fit-x-method-options-x-restart-from-cached-x-spec:

restart_from_cached
===================

Type: :term:`bool <bool>`

Restart a run from a cached checkpoint.

Example:-

.. code-block:: pyml

    restart_from_cached: False


.. _fit-x-parallel-x-spec:

PARALLEL
********

Type: :term:`one_of_record <one_of_record>`

one of many possible servers

Example:-

.. code-block:: pyml

    PARALLEL:
        SINGLE: {progress_bar_length: 0}


.. _fit-x-parallel-x-single-x-spec:

SINGLE
======

Type: :term:`dict_record <dict_record>`

single process server spec.

Example:-

.. code-block:: pyml

    SINGLE:
        progress_bar_length: 0


.. _fit-x-parallel-x-single-x-progress-bar-length-x-spec:

progress_bar_length
-------------------

Type: :term:`int <int>`

Length of progress bar on screen (default=0, off)

Example:-

.. code-block:: pyml

    progress_bar_length: 0


.. _fit-x-parallel-x-mpi-workers-x-spec:

MPI_WORKERS
===========

Type: :term:`dict_record <dict_record>`

MPI local server spec.

Example:-

.. code-block:: pyml

    MPI_WORKERS:
        n_workers: auto
        cpu_load: 1.0
        progress_bar_length: 0


.. _fit-x-parallel-x-mpi-workers-x-n-workers-x-spec:

n_workers
---------

Type: :term:`int <int>` / :term:`auto <auto>`

Number of workers to use on this machine, defaults to number of processors, but could be more or fewer.

Example:-

.. code-block:: pyml

    n_workers: auto


.. _fit-x-parallel-x-mpi-workers-x-cpu-load-x-spec:

cpu_load
--------

Type: :term:`float <float>`

Desired load on CPU as a decimal greater than 0.0 (0%) and less than or equal to 1.0 (100%)

Example:-

.. code-block:: pyml

    cpu_load: 1.0


.. _fit-x-parallel-x-mpi-workers-x-progress-bar-length-x-spec:

progress_bar_length
-------------------

Type: :term:`int <int>`

Length of progress bar on screen (default=0, off)

Example:-

.. code-block:: pyml

    progress_bar_length: 0


.. _fit-x-description-x-spec:

DESCRIPTION
***********

Type: :term:`dict_record <dict_record>`

Description fields for script.

Example:-

.. code-block:: pyml

    DESCRIPTION:
        name: my_pkpd_model
        title: My PKPD model
        author: My Name
        abstract: |
            Abstract describing the model
        keywords: ['pkpd']


.. _fit-x-description-x-name-x-spec:

name
====

Type: :term:`str <str>`

Unique name used to distinguish script

Example:-

.. code-block:: pyml

    name: my_pkpd_model


.. _fit-x-description-x-title-x-spec:

title
=====

Type: :term:`str <str>`

A longer text string that could serve as a title

Example:-

.. code-block:: pyml

    title: My PKPD model


.. _fit-x-description-x-author-x-spec:

author
======

Type: :term:`str <str>`

Author of the model

Example:-

.. code-block:: pyml

    author: My Name


.. _fit-x-description-x-abstract-x-spec:

abstract
========

Type: :term:`verbatim <verbatim>`

Abstract paragraph describing model

Example:-

.. code-block:: pyml

    abstract: |
        Abstract describing the model


.. _fit-x-description-x-keywords-x-spec:

keywords
========

Type: :term:`list <list>`

Keywords list used to categorise models.

Example:-

.. code-block:: pyml

    keywords: ['pkpd']


.. _fit-x-file-paths-x-spec:

FILE_PATHS
**********

Type: :term:`dict_record <dict_record>`

file paths for fit_script

Example:-

.. code-block:: pyml

    FILE_PATHS:
        input_data_file: my_pkpd_model_gen.pyml_output/generated_data/cx_obs_params.csv
        input_data_delimiter: auto
        output_folder: auto
        temp_folder: auto
        log_folder: auto
        output_file_ext: ['svg']
        delete_old_files_flag: False
        input_solution_file: none
        output_iteration_results: True


.. _fit-x-file-paths-x-input-data-file-x-spec:

input_data_file
===============

Type: :term:`input_file <input_file>`

path to input comma separated value file in popy data format

Example:-

.. code-block:: pyml

    input_data_file: my_pkpd_model_gen.pyml_output/generated_data/cx_obs_params.csv


.. _fit-x-file-paths-x-input-data-delimiter-x-spec:

input_data_delimiter
====================

Type: :term:`str <str>`

Delimiter character used in the data file.

Example:-

.. code-block:: pyml

    input_data_delimiter: auto


.. _fit-x-file-paths-x-output-folder-x-spec:

output_folder
=============

Type: :term:`output_folder <output_folder>` / :term:`auto <auto>`

Output folder - results of computation stored here

Example:-

.. code-block:: pyml

    output_folder: auto


.. _fit-x-file-paths-x-temp-folder-x-spec:

temp_folder
===========

Type: :term:`output_folder <output_folder>` / :term:`auto <auto>`

Temp folder - temporary files stored here

Example:-

.. code-block:: pyml

    temp_folder: auto


.. _fit-x-file-paths-x-log-folder-x-spec:

log_folder
==========

Type: :term:`output_folder <output_folder>` / :term:`auto <auto>`

Log folder - log files stored here

Example:-

.. code-block:: pyml

    log_folder: auto


.. _fit-x-file-paths-x-output-file-ext-x-spec:

output_file_ext
===============

Type: :term:`list_of(pdf,png,svg) <list_of>`

Output file extension - determines graphical output file format.

Example:-

.. code-block:: pyml

    output_file_ext: ['svg']


.. _fit-x-file-paths-x-delete-old-files-flag-x-spec:

delete_old_files_flag
=====================

Type: :term:`bool <bool>`

Option to delete any existing files before running.

Example:-

.. code-block:: pyml

    delete_old_files_flag: False


.. _fit-x-file-paths-x-input-solution-file-x-spec:

input_solution_file
===================

Type: :term:`input_file <input_file>` / :term:`none <none>`

Solution containing f[X] values from a previous run.

Example:-

.. code-block:: pyml

    input_solution_file: none


.. _fit-x-file-paths-x-output-iteration-results-x-spec:

output_iteration_results
========================

Type: :term:`bool <bool>`

Option to output iteration-by-iteration values.

Example:-

.. code-block:: pyml

    output_iteration_results: True


.. _fit-x-data-fields-x-spec:

DATA_FIELDS
***********

Type: :term:`dict_record <dict_record>`

data fields for popy.dat.fields object

Example:-

.. code-block:: pyml

    DATA_FIELDS:
        type_field: TYPE
        id_field: ID
        time_field: TIME


.. _fit-x-data-fields-x-type-field-x-spec:

type_field
==========

Type: :term:`str <str>`

Field name in data file that contains row type info, e.g. obs/dose etc

Example:-

.. code-block:: pyml

    type_field: TYPE


.. _fit-x-data-fields-x-id-field-x-spec:

id_field
========

Type: :term:`str <str>`

Field name in data file that contains identity string for each data row e.g. obs/dose etc

Example:-

.. code-block:: pyml

    id_field: ID


.. _fit-x-data-fields-x-time-field-x-spec:

time_field
==========

Type: :term:`str <str>`

Field name in data file that contains time or event for each data row

Example:-

.. code-block:: pyml

    time_field: TIME


.. _fit-x-preprocess-x-spec:

PREPROCESS
**********

Type: :term:`verbatim <verbatim>`

Code that preprocesses the input data.
Use this to filter rows and create derived covariates.

Example:-

.. code-block:: pyml

    PREPROCESS: |


.. _fit-x-effects-x-spec:

EFFECTS
*******

Type: :term:`repeat_verb_record <repeat_verb_record>`

EFFECT params to define hierarchical population model

Example:-

.. code-block:: pyml

    EFFECTS:
        POP: |
            f[KA] ~ P1.0
            f[CL] ~ P1.0
            f[V1] ~ P20
            f[Q] ~ P0.5
            f[V2] ~ P100
            f[KA_isv,CL_isv,V1_isv,Q_isv,V2_isv] ~ spd_matrix() [
                [0.05],
                [0.01, 0.05],
                [0.01, 0.01, 0.05],
                [0.01, 0.01, 0.01, 0.05],
                [0.01, 0.01, 0.01, 0.01, 0.05],
            ]
            f[PNOISE] ~ P0.1

        ID: |
            r[KA, CL, V1, Q, V2] ~ mnorm([0,0,0,0,0], f[KA_isv,CL_isv,V1_isv,Q_isv,V2_isv])


.. _fit-x-model-params-x-spec:

MODEL_PARAMS
************

Type: :term:`verbatim <verbatim>`

Defines the mapping from c[X], f[X] and r[X] variables to individual model m[X] parameters.

Example:-

.. code-block:: pyml

    MODEL_PARAMS: |
        m[KA] = f[KA] * exp(r[KA])
        m[CL] = f[CL] * exp(r[CL])
        m[V1] = f[V1] * exp(r[V1])
        m[Q] = f[Q] * exp(r[Q])
        m[V2] = f[V2] * exp(r[V2])
        m[ANOISE] = 0.001
        m[PNOISE] = f[PNOISE]


.. _fit-x-states-x-spec:

STATES
******

Type: :term:`verbatim <verbatim>`

Optional section for setting initial values of s[X] variables
can also set slabel[X] text labels.

Example:-

.. code-block:: pyml

    STATES: |


.. _fit-x-derivatives-x-spec:

DERIVATIVES
***********

Type: :term:`verbatim <verbatim>`

Define how the covariates and effects determine flows
between compartments.

Example:-

.. code-block:: pyml

    DERIVATIVES: |
        # s[DEPOT,CENTRAL,PERI] = @dep_two_cmp_cl{dose:@bolus{amt: c[AMT]}}
        d[DEPOT] = @bolus{amt: c[AMT]} - m[KA]*s[DEPOT]
        d[CENTRAL] = m[KA]*s[DEPOT] - s[CENTRAL]*m[CL]/m[V1] - s[CENTRAL]*m[Q]/m[V1]  + s[PERI]*m[Q]/m[V2]
        d[PERI] = s[CENTRAL]*m[Q]/m[V1] - s[PERI]*m[Q]/m[V2]


.. _fit-x-predictions-x-spec:

PREDICTIONS
***********

Type: :term:`verbatim <verbatim>`

Define the final predicted m[X] variables to be output
by the compartment model system.

Example:-

.. code-block:: pyml

    PREDICTIONS: |
        p[DV_CENTRAL] = s[CENTRAL]/m[V1]
        plabel[DV_CENTRAL] = 'Drug conc. (units)'
        var = m[ANOISE]**2 + m[PNOISE]**2 * p[DV_CENTRAL]**2
        c[DV_CENTRAL] ~ norm(p[DV_CENTRAL], var)


.. _fit-x-ode-solver-x-spec:

ODE_SOLVER
**********

Type: :term:`one_of_record <one_of_record>`

one of many possible solvers

Example:-

.. code-block:: pyml

    ODE_SOLVER:
        CPPLSODA:
            atol: 1e-06
            rtol: 1e-06
            max_nsteps: 10000000
            use_supersections: True
            use_sens: True
            hmin: 0.0


.. _fit-x-ode-solver-x-no-solver-x-spec:

NO_SOLVER
=========

Type: :term:`dict_record <dict_record>`

Null method for blank derivatives.

Example:-

.. code-block:: pyml

    NO_SOLVER: {}


.. _fit-x-ode-solver-x-analytic-x-spec:

ANALYTIC
========

Type: :term:`dict_record <dict_record>`

Analytic method for solving ODE

Example:-

.. code-block:: pyml

    ANALYTIC:
        use_supersections: auto
        use_sens: True


.. _fit-x-ode-solver-x-analytic-x-use-supersections-x-spec:

use_supersections
-----------------

Type: :term:`bool <bool>` / :term:`auto <auto>`

Option to combine sections into supersections, which can make PoPy run faster, however with discontinuous ODE params you may need to turn this off (closer to nonmem approach).

Example:-

.. code-block:: pyml

    use_supersections: auto


.. _fit-x-ode-solver-x-analytic-x-use-sens-x-spec:

use_sens
--------

Type: :term:`bool <bool>`

Option to use sensitivity equations in ode solver.

Example:-

.. code-block:: pyml

    use_sens: True


.. _fit-x-ode-solver-x-scipy-odeint-x-spec:

SCIPY_ODEINT
============

Type: :term:`dict_record <dict_record>`

odeint solver record

Example:-

.. code-block:: pyml

    SCIPY_ODEINT:
        atol: 1e-06
        rtol: 1e-06
        max_nsteps: 10000000
        use_supersections: auto
        use_jacobian: False
        use_sens: True
        use_tcrit: False


.. _fit-x-ode-solver-x-scipy-odeint-x-atol-x-spec:

atol
----

Type: :term:`float <float>`

Absolute tolerance of ode solver.

Example:-

.. code-block:: pyml

    atol: 1e-06


.. _fit-x-ode-solver-x-scipy-odeint-x-rtol-x-spec:

rtol
----

Type: :term:`float <float>`

Relative tolerance of ode solver.

Example:-

.. code-block:: pyml

    rtol: 1e-06


.. _fit-x-ode-solver-x-scipy-odeint-x-max-nsteps-x-spec:

max_nsteps
----------

Type: :term:`int <int>`

Maximum number of steps allowed in ode solver.

Example:-

.. code-block:: pyml

    max_nsteps: 10000000


.. _fit-x-ode-solver-x-scipy-odeint-x-use-supersections-x-spec:

use_supersections
-----------------

Type: :term:`bool <bool>` / :term:`auto <auto>`

Option to combine sections into supersections, which can make PoPy run faster, however with discontinuous ODE params you may need to turn this off (closer to nonmem approach).

Example:-

.. code-block:: pyml

    use_supersections: auto


.. _fit-x-ode-solver-x-scipy-odeint-x-use-jacobian-x-spec:

use_jacobian
------------

Type: :term:`bool <bool>`

Option to use jacobian in ode solver.

Example:-

.. code-block:: pyml

    use_jacobian: False


.. _fit-x-ode-solver-x-scipy-odeint-x-use-sens-x-spec:

use_sens
--------

Type: :term:`bool <bool>`

Option to use sensitivity equations in ode solver.

Example:-

.. code-block:: pyml

    use_sens: True


.. _fit-x-ode-solver-x-scipy-odeint-x-use-tcrit-x-spec:

use_tcrit
---------

Type: :term:`bool <bool>`

Option to set lsoda tcrit to start and end of subsection. Note this is an experimental option.

Example:-

.. code-block:: pyml

    use_tcrit: False


.. _fit-x-ode-solver-x-cpplsoda-x-spec:

CPPLSODA
========

Type: :term:`dict_record <dict_record>`

C++ version of original cvode c library.

Example:-

.. code-block:: pyml

    CPPLSODA:
        atol: 1e-06
        rtol: 1e-06
        max_nsteps: 10000000
        use_supersections: auto
        use_sens: True
        hmin: 1e-12


.. _fit-x-ode-solver-x-cpplsoda-x-atol-x-spec:

atol
----

Type: :term:`float <float>`

Absolute tolerance of ode solver.

Example:-

.. code-block:: pyml

    atol: 1e-06


.. _fit-x-ode-solver-x-cpplsoda-x-rtol-x-spec:

rtol
----

Type: :term:`float <float>`

Relative tolerance of ode solver.

Example:-

.. code-block:: pyml

    rtol: 1e-06


.. _fit-x-ode-solver-x-cpplsoda-x-max-nsteps-x-spec:

max_nsteps
----------

Type: :term:`int <int>`

Maximum number of steps allowed in ode solver.

Example:-

.. code-block:: pyml

    max_nsteps: 10000000


.. _fit-x-ode-solver-x-cpplsoda-x-use-supersections-x-spec:

use_supersections
-----------------

Type: :term:`bool <bool>` / :term:`auto <auto>`

Option to combine sections into supersections, which can make PoPy run faster, however with discontinuous ODE params you may need to turn this off (closer to nonmem approach).

Example:-

.. code-block:: pyml

    use_supersections: auto


.. _fit-x-ode-solver-x-cpplsoda-x-use-sens-x-spec:

use_sens
--------

Type: :term:`bool <bool>`

Option to use sensitivity equations in ode solver.

Example:-

.. code-block:: pyml

    use_sens: True


.. _fit-x-ode-solver-x-cpplsoda-x-hmin-x-spec:

hmin
----

Type: :term:`float <float>`

Minimum step size of ode solver.

Example:-

.. code-block:: pyml

    hmin: 1e-12


.. _fit-x-fit-methods-x-spec:

FIT_METHODS
***********

Type: :term:`list_record <list_record>`

one of many possible fitters

Example:-

.. code-block:: pyml

    FIT_METHODS:
        - JOE:
            ODE_SOLVER: {INHERIT: {}}
            output_timing_flag: False
            output_warning_detail_flag: True
            max_n_main_iterations: 30
            CONVERGER: {OBJ_INC: {}}
            use_laplacian: False
            use_chain: True
            use_lm_jac: True
            lm_method: lm
            reset_re_flag: True


.. _fit-x-fit-methods-x-joe-x-spec:

JOE
===

Type: :term:`dict_record <dict_record>`

Joint Optimisation and Estimation method

Example:-

.. code-block:: pyml

    JOE:
        ODE_SOLVER: {INHERIT: {}}
        output_timing_flag: False
        output_warning_detail_flag: True
        max_n_main_iterations: 50
        CONVERGER: {OBJ_INC: {}}
        use_laplacian: False
        use_chain: True
        use_lm_jac: True
        lm_method: lm
        reset_re_flag: True


.. _fit-x-fit-methods-x-joe-x-output-timing-flag-x-spec:

output_timing_flag
------------------

Type: :term:`bool <bool>`

Option to output timing info.

Example:-

.. code-block:: pyml

    output_timing_flag: False


.. _fit-x-fit-methods-x-joe-x-output-warning-detail-flag-x-spec:

output_warning_detail_flag
--------------------------

Type: :term:`bool <bool>`

Option to output warning detail.

Example:-

.. code-block:: pyml

    output_warning_detail_flag: True


.. _fit-x-fit-methods-x-joe-x-max-n-main-iterations-x-spec:

max_n_main_iterations
---------------------

Type: :term:`int <int>`

Maximum number of iterations

Example:-

.. code-block:: pyml

    max_n_main_iterations: 50


.. _fit-x-fit-methods-x-joe-x-converger-x-spec:

CONVERGER
---------

Type: :term:`one_of_record <one_of_record>`

Convergence methods.

Example:-

.. code-block:: pyml

    CONVERGER:
        OBJ_INC: {}


.. _fit-x-fit-methods-x-joe-x-converger-x-none-x-spec:

NONE
^^^^

Type: :term:`dict_record <dict_record>`

No convergence testing.

Example:-

.. code-block:: pyml

    NONE: {}


.. _fit-x-fit-methods-x-joe-x-converger-x-obj-inc-x-spec:

OBJ_INC
^^^^^^^

Type: :term:`dict_record <dict_record>`

Objective function increase converger.

Example:-

.. code-block:: pyml

    OBJ_INC: {}


.. _fit-x-fit-methods-x-joe-x-converger-x-obj-sim-x-spec:

OBJ_SIM
^^^^^^^

Type: :term:`dict_record <dict_record>`

Objective function similar converger.

Example:-

.. code-block:: pyml

    OBJ_SIM: {}


.. _fit-x-fit-methods-x-joe-x-use-laplacian-x-spec:

use_laplacian
-------------

Type: :term:`bool <bool>`

Option to use full laplacian to compute hessian in objective function term4, this is much slower than using the expectation of the outer product of the jacobian

Example:-

.. code-block:: pyml

    use_laplacian: False


.. _fit-x-fit-methods-x-joe-x-use-chain-x-spec:

use_chain
---------

Type: :term:`bool <bool>`

Option to use chain rule when computing derivatives.

Example:-

.. code-block:: pyml

    use_chain: True


.. _fit-x-fit-methods-x-joe-x-use-lm-jac-x-spec:

use_lm_jac
----------

Type: :term:`bool <bool>`

Option to use custom jacobian when optimising r[X] using L-M.

Example:-

.. code-block:: pyml

    use_lm_jac: True


.. _fit-x-fit-methods-x-joe-x-lm-method-x-spec:

lm_method
---------

Type: :term:`one_of(lm,trf,dogbox) <one_of>`

Option to use either lm/trf/dogbox in scipy leastsq to optimise r[X]

Example:-

.. code-block:: pyml

    lm_method: lm


.. _fit-x-fit-methods-x-joe-x-reset-re-flag-x-spec:

reset_re_flag
-------------

Type: :term:`bool <bool>`

Reset r[X]=0.0 before each r[X] optimisation

Example:-

.. code-block:: pyml

    reset_re_flag: True


.. _fit-x-fit-methods-x-nd-x-spec:

ND
==

Type: :term:`dict_record <dict_record>`

None Derivative Optimisation method

Example:-

.. code-block:: pyml

    ND:
        ODE_SOLVER: {INHERIT: {}}
        output_timing_flag: False
        output_warning_detail_flag: True
        max_n_main_iterations: 50
        CONVERGER: {OBJ_INC: {}}
        use_laplacian: False
        use_chain: True
        use_lm_jac: True
        lm_method: lm
        reset_re_flag: True
        central_diff_switch_flag: True
        qa_imp_delta: 0.001
        var_fx_bobyqa_opt_flag: True


.. _fit-x-fit-methods-x-nd-x-output-timing-flag-x-spec:

output_timing_flag
------------------

Type: :term:`bool <bool>`

Option to output timing info.

Example:-

.. code-block:: pyml

    output_timing_flag: False


.. _fit-x-fit-methods-x-nd-x-output-warning-detail-flag-x-spec:

output_warning_detail_flag
--------------------------

Type: :term:`bool <bool>`

Option to output warning detail.

Example:-

.. code-block:: pyml

    output_warning_detail_flag: True


.. _fit-x-fit-methods-x-nd-x-max-n-main-iterations-x-spec:

max_n_main_iterations
---------------------

Type: :term:`int <int>`

Maximum number of iterations

Example:-

.. code-block:: pyml

    max_n_main_iterations: 50


.. _fit-x-fit-methods-x-nd-x-converger-x-spec:

CONVERGER
---------

Type: :term:`one_of_record <one_of_record>`

Convergence methods.

Example:-

.. code-block:: pyml

    CONVERGER:
        OBJ_INC: {}


.. _fit-x-fit-methods-x-nd-x-converger-x-none-x-spec:

NONE
^^^^

Type: :term:`dict_record <dict_record>`

No convergence testing.

Example:-

.. code-block:: pyml

    NONE: {}


.. _fit-x-fit-methods-x-nd-x-converger-x-obj-inc-x-spec:

OBJ_INC
^^^^^^^

Type: :term:`dict_record <dict_record>`

Objective function increase converger.

Example:-

.. code-block:: pyml

    OBJ_INC: {}


.. _fit-x-fit-methods-x-nd-x-converger-x-obj-sim-x-spec:

OBJ_SIM
^^^^^^^

Type: :term:`dict_record <dict_record>`

Objective function similar converger.

Example:-

.. code-block:: pyml

    OBJ_SIM: {}


.. _fit-x-fit-methods-x-nd-x-use-laplacian-x-spec:

use_laplacian
-------------

Type: :term:`bool <bool>`

Option to use full laplacian to compute hessian in objective function term4, this is much slower than using the expectation of the outer product of the jacobian

Example:-

.. code-block:: pyml

    use_laplacian: False


.. _fit-x-fit-methods-x-nd-x-use-chain-x-spec:

use_chain
---------

Type: :term:`bool <bool>`

Option to use chain rule when computing derivatives.

Example:-

.. code-block:: pyml

    use_chain: True


.. _fit-x-fit-methods-x-nd-x-use-lm-jac-x-spec:

use_lm_jac
----------

Type: :term:`bool <bool>`

Option to use custom jacobian when optimising r[X] using L-M.

Example:-

.. code-block:: pyml

    use_lm_jac: True


.. _fit-x-fit-methods-x-nd-x-lm-method-x-spec:

lm_method
---------

Type: :term:`one_of(lm,trf,dogbox) <one_of>`

Option to use either lm/trf/dogbox in scipy leastsq to optimise r[X]

Example:-

.. code-block:: pyml

    lm_method: lm


.. _fit-x-fit-methods-x-nd-x-reset-re-flag-x-spec:

reset_re_flag
-------------

Type: :term:`bool <bool>`

Reset r[X]=0.0 before each r[X] optimisation

Example:-

.. code-block:: pyml

    reset_re_flag: True


.. _fit-x-fit-methods-x-nd-x-central-diff-switch-flag-x-spec:

central_diff_switch_flag
------------------------

Type: :term:`bool <bool>`

Allow switch to central differences, instead of forward diff

Example:-

.. code-block:: pyml

    central_diff_switch_flag: True


.. _fit-x-fit-methods-x-nd-x-qa-imp-delta-x-spec:

qa_imp_delta
------------

Type: :term:`float <float>`

Threshold on improvement to stop quadratic approximation search.

Example:-

.. code-block:: pyml

    qa_imp_delta: 0.001


.. _fit-x-fit-methods-x-nd-x-var-fx-bobyqa-opt-flag-x-spec:

var_fx_bobyqa_opt_flag
----------------------

Type: :term:`bool <bool>`

Option to include var f[X] in BOBYQA optimisation

Example:-

.. code-block:: pyml

    var_fx_bobyqa_opt_flag: True


.. _fit-x-fit-methods-x-foce-x-spec:

FOCE
====

Type: :term:`dict_record <dict_record>`

First order conditional estimation method

Example:-

.. code-block:: pyml

    FOCE:
        ODE_SOLVER: {INHERIT: {}}
        output_timing_flag: False
        output_warning_detail_flag: True
        max_n_main_iterations: 50
        CONVERGER: {OBJ_INC: {}}
        use_laplacian: False
        use_chain: True
        use_lm_jac: True
        lm_method: lm
        reset_re_flag: True
        central_diff_switch_flag: True


.. _fit-x-fit-methods-x-foce-x-output-timing-flag-x-spec:

output_timing_flag
------------------

Type: :term:`bool <bool>`

Option to output timing info.

Example:-

.. code-block:: pyml

    output_timing_flag: False


.. _fit-x-fit-methods-x-foce-x-output-warning-detail-flag-x-spec:

output_warning_detail_flag
--------------------------

Type: :term:`bool <bool>`

Option to output warning detail.

Example:-

.. code-block:: pyml

    output_warning_detail_flag: True


.. _fit-x-fit-methods-x-foce-x-max-n-main-iterations-x-spec:

max_n_main_iterations
---------------------

Type: :term:`int <int>`

Maximum number of iterations

Example:-

.. code-block:: pyml

    max_n_main_iterations: 50


.. _fit-x-fit-methods-x-foce-x-converger-x-spec:

CONVERGER
---------

Type: :term:`one_of_record <one_of_record>`

Convergence methods.

Example:-

.. code-block:: pyml

    CONVERGER:
        OBJ_INC: {}


.. _fit-x-fit-methods-x-foce-x-converger-x-none-x-spec:

NONE
^^^^

Type: :term:`dict_record <dict_record>`

No convergence testing.

Example:-

.. code-block:: pyml

    NONE: {}


.. _fit-x-fit-methods-x-foce-x-converger-x-obj-inc-x-spec:

OBJ_INC
^^^^^^^

Type: :term:`dict_record <dict_record>`

Objective function increase converger.

Example:-

.. code-block:: pyml

    OBJ_INC: {}


.. _fit-x-fit-methods-x-foce-x-converger-x-obj-sim-x-spec:

OBJ_SIM
^^^^^^^

Type: :term:`dict_record <dict_record>`

Objective function similar converger.

Example:-

.. code-block:: pyml

    OBJ_SIM: {}


.. _fit-x-fit-methods-x-foce-x-use-laplacian-x-spec:

use_laplacian
-------------

Type: :term:`bool <bool>`

Option to use full laplacian to compute hessian in objective function term4, this is much slower than using the expectation of the outer product of the jacobian

Example:-

.. code-block:: pyml

    use_laplacian: False


.. _fit-x-fit-methods-x-foce-x-use-chain-x-spec:

use_chain
---------

Type: :term:`bool <bool>`

Option to use chain rule when computing derivatives.

Example:-

.. code-block:: pyml

    use_chain: True


.. _fit-x-fit-methods-x-foce-x-use-lm-jac-x-spec:

use_lm_jac
----------

Type: :term:`bool <bool>`

Option to use custom jacobian when optimising r[X] using L-M.

Example:-

.. code-block:: pyml

    use_lm_jac: True


.. _fit-x-fit-methods-x-foce-x-lm-method-x-spec:

lm_method
---------

Type: :term:`one_of(lm,trf,dogbox) <one_of>`

Option to use either lm/trf/dogbox in scipy leastsq to optimise r[X]

Example:-

.. code-block:: pyml

    lm_method: lm


.. _fit-x-fit-methods-x-foce-x-reset-re-flag-x-spec:

reset_re_flag
-------------

Type: :term:`bool <bool>`

Reset r[X]=0.0 before each r[X] optimisation

Example:-

.. code-block:: pyml

    reset_re_flag: True


.. _fit-x-fit-methods-x-foce-x-central-diff-switch-flag-x-spec:

central_diff_switch_flag
------------------------

Type: :term:`bool <bool>`

Allow switch to central differences, instead of forward diff

Example:-

.. code-block:: pyml

    central_diff_switch_flag: True


.. _fit-x-covariance-x-spec:

COVARIANCE
**********

Type: :term:`one_of_record <one_of_record>`

Covariance methods used to estimate standard errors.

Example:-

.. code-block:: pyml

    COVARIANCE:
        NO_COVARIANCE: {}


.. _fit-x-covariance-x-no-covariance-x-spec:

NO_COVARIANCE
=============

Type: :term:`dict_record <dict_record>`

Do NOT compute covariance matrix and standard errors.

Example:-

.. code-block:: pyml

    NO_COVARIANCE: {}


.. _fit-x-covariance-x-sandwich-x-spec:

SANDWICH
========

Type: :term:`dict_record <dict_record>`

Use sandwich operator to estimate covariance matrix.

Example:-

.. code-block:: pyml

    SANDWICH:
        var_covariance_flag: False
        inv_hessian_flag: False


.. _fit-x-covariance-x-sandwich-x-var-covariance-flag-x-spec:

var_covariance_flag
-------------------

Type: :term:`bool <bool>`

Optionally compute standard errors for f[X] covariance elements this could take a long time for large covariance matrices. Note the results of the standard error computation for the main f[X] parameters combined with the variances will be different.

Example:-

.. code-block:: pyml

    var_covariance_flag: False


.. _fit-x-covariance-x-sandwich-x-inv-hessian-flag-x-spec:

inv_hessian_flag
----------------

Type: :term:`bool <bool>`

Optionally invert the hessian and output results to disk. this is mainly to generate PoPy documentation output.

Example:-

.. code-block:: pyml

    inv_hessian_flag: False


.. _fit-x-output-scripts-x-spec:

OUTPUT_SCRIPTS
**************

Type: :term:`dict_record <dict_record>`

List of scripts to output for further processing

Example:-

.. code-block:: pyml

    OUTPUT_SCRIPTS:
        GRPH: {output_mode: none, grph_list: ['OBS_vs_TIME']}
        TABLE: {output_mode: none, tables_list: []}
        SIM:
            output_mode: run
            sim_time_step: 1.0
            grph_list: ['OBS_vs_TIME']
            tables_list: []
        MSIM: {output_mode: create, vpc_list: ['OBS_vs_TIME_VPC']}
        FITSUM: {output_mode: run}


.. _fit-x-output-scripts-x-grph-x-spec:

GRPH
====

Type: :term:`dict_record <dict_record>`

options to pass to grph script.

Example:-

.. code-block:: pyml

    GRPH:
        output_mode: none
        grph_list: ['OBS_vs_TIME']


.. _fit-x-output-scripts-x-grph-x-output-mode-x-spec:

output_mode
-----------

Type: :term:`one_of(none,create,run) <one_of>`

Output options.

Example:-

.. code-block:: pyml

    output_mode: none


.. _fit-x-output-scripts-x-grph-x-grph-list-x-spec:

grph_list
---------

Type: :term:`list(str) <list>`

Graph types to plt

Example:-

.. code-block:: pyml

    grph_list: ['OBS_vs_TIME']


.. _fit-x-output-scripts-x-table-x-spec:

TABLE
=====

Type: :term:`dict_record <dict_record>`

Options to pass to TAB script.

Example:-

.. code-block:: pyml

    TABLE:
        output_mode: none
        tables_list: []


.. _fit-x-output-scripts-x-table-x-output-mode-x-spec:

output_mode
-----------

Type: :term:`one_of(none,create,run) <one_of>`

Output options.

Example:-

.. code-block:: pyml

    output_mode: none


.. _fit-x-output-scripts-x-table-x-tables-list-x-spec:

tables_list
-----------

Type: :term:`list_record <list_record>`

List of tables to create.

Example:-

.. code-block:: pyml

    tables_list:
        - TABLE:
            input_solution: final_fit_ipred
            output_file: my_table.csv
            cx_columns: "*"
            mx_columns: "*"
            sx_columns: "*"
            px_columns: "*"


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-spec:

TABLE
^^^^^

Type: :term:`dict_record <dict_record>`

Table properties.

Example:-

.. code-block:: pyml

    TABLE:
        input_solution: final_fit_ipred
        output_file: my_table.csv
        cx_columns: "*"
        mx_columns: "*"
        sx_columns: "*"
        px_columns: "*"


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-input-solution-x-spec:

input_solution
""""""""""""""

Type: :term:`str <str>`

Label of the solution to parse

Example:-

.. code-block:: pyml

    input_solution: final_fit_ipred


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-output-file-x-spec:

output_file
"""""""""""

Type: :term:`output_file <output_file>`

Destination file for table

Example:-

.. code-block:: pyml

    output_file: my_table.csv


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-cx-columns-x-spec:

cx_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from covariates/observations table to output

Example:-

.. code-block:: pyml

    cx_columns: "*"


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-mx-columns-x-spec:

mx_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from model_params table to output

Example:-

.. code-block:: pyml

    mx_columns: "*"


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-sx-columns-x-spec:

sx_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from states table to output

Example:-

.. code-block:: pyml

    sx_columns: "*"


.. _fit-x-output-scripts-x-table-x-tables-list-x-table-x-px-columns-x-spec:

px_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from predictions table to output

Example:-

.. code-block:: pyml

    px_columns: "*"


.. _fit-x-output-scripts-x-sim-x-spec:

SIM
===

Type: :term:`dict_record <dict_record>`

options to pass to sim script.

Example:-

.. code-block:: pyml

    SIM:
        output_mode: none
        sim_time_step: -1.0
        grph_list: ['OBS_vs_TIME']
        tables_list:
            - TABLE:
                input_solution: final_fit_ipred
                output_file: my_table.csv
                cx_columns: "*"
                mx_columns: "*"
                sx_columns: "*"
                px_columns: "*"


.. _fit-x-output-scripts-x-sim-x-output-mode-x-spec:

output_mode
-----------

Type: :term:`one_of(none,create,run) <one_of>`

Output options.

Example:-

.. code-block:: pyml

    output_mode: none


.. _fit-x-output-scripts-x-sim-x-sim-time-step-x-spec:

sim_time_step
-------------

Type: :term:`float <float>`

Size of time step when creating smooth curve predictions
note setting this to a negative value, results in
simulated predictions for each individual 
ONLY at time points in the original data set.

Example:-

.. code-block:: pyml

    sim_time_step: -1.0


.. _fit-x-output-scripts-x-sim-x-grph-list-x-spec:

grph_list
---------

Type: :term:`list(str) <list>`

Graph types to plt

Example:-

.. code-block:: pyml

    grph_list: ['OBS_vs_TIME']


.. _fit-x-output-scripts-x-sim-x-tables-list-x-spec:

tables_list
-----------

Type: :term:`list_record <list_record>`

List of tables to create.

Example:-

.. code-block:: pyml

    tables_list:
        - TABLE:
            input_solution: final_fit_ipred
            output_file: my_table.csv
            cx_columns: "*"
            mx_columns: "*"
            sx_columns: "*"
            px_columns: "*"


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-spec:

TABLE
^^^^^

Type: :term:`dict_record <dict_record>`

Table properties.

Example:-

.. code-block:: pyml

    TABLE:
        input_solution: final_fit_ipred
        output_file: my_table.csv
        cx_columns: "*"
        mx_columns: "*"
        sx_columns: "*"
        px_columns: "*"


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-input-solution-x-spec:

input_solution
""""""""""""""

Type: :term:`str <str>`

Label of the solution to parse

Example:-

.. code-block:: pyml

    input_solution: final_fit_ipred


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-output-file-x-spec:

output_file
"""""""""""

Type: :term:`output_file <output_file>`

Destination file for table

Example:-

.. code-block:: pyml

    output_file: my_table.csv


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-cx-columns-x-spec:

cx_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from covariates/observations table to output

Example:-

.. code-block:: pyml

    cx_columns: "*"


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-mx-columns-x-spec:

mx_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from model_params table to output

Example:-

.. code-block:: pyml

    mx_columns: "*"


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-sx-columns-x-spec:

sx_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from states table to output

Example:-

.. code-block:: pyml

    sx_columns: "*"


.. _fit-x-output-scripts-x-sim-x-tables-list-x-table-x-px-columns-x-spec:

px_columns
""""""""""

Type: :term:`list(str) <list>` / :term:`star <star>`

Columns from predictions table to output

Example:-

.. code-block:: pyml

    px_columns: "*"


.. _fit-x-output-scripts-x-msim-x-spec:

MSIM
====

Type: :term:`dict_record <dict_record>`

options to pass to msim script.

Example:-

.. code-block:: pyml

    MSIM:
        output_mode: none
        vpc_list: ['OBS_vs_TIME_VPC']


.. _fit-x-output-scripts-x-msim-x-output-mode-x-spec:

output_mode
-----------

Type: :term:`one_of(none,create,run) <one_of>`

Output options.

Example:-

.. code-block:: pyml

    output_mode: none


.. _fit-x-output-scripts-x-msim-x-vpc-list-x-spec:

vpc_list
--------

Type: :term:`list(str) <list>`

List of vpc types to generate in popy_vpc script.

Example:-

.. code-block:: pyml

    vpc_list: ['OBS_vs_TIME_VPC']


.. _fit-x-output-scripts-x-fitsum-x-spec:

FITSUM
======

Type: :term:`dict_record <dict_record>`

options to pass to fitsum_script.

Example:-

.. code-block:: pyml

    FITSUM:
        output_mode: none


.. _fit-x-output-scripts-x-fitsum-x-output-mode-x-spec:

output_mode
-----------

Type: :term:`one_of(none,create,run) <one_of>`

Output options.

Example:-

.. code-block:: pyml

    output_mode: none



