greekify_model#
- pharmpy.modeling.greekify_model(model, named_subscripts=False)[source]#
Convert to using greek letters for all population parameters
- Parameters:
model (Model) – Pharmpy model
named_subscripts (bool) – Use previous parameter names as subscripts. Default is to use integer subscripts
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import * >>> model = load_example_model("pheno") >>> model.statements TVCL = POP_CL⋅WGT TVV = POP_VC⋅WGT ⎧TVV⋅(COVAPGR + 1) for APGR < 5 ⎨ TVV = ⎩ TVV otherwise ETA_CL CL = TVCL⋅ℯ ETA_VC VC = TVV⋅ℯ V = VC S₁ = VC Bolus(AMT, admid=1) → CENTRAL ┌───────┐ │CENTRAL│──CL/V→ └───────┘ A_CENTRAL(t) ──────────── F = S₁ Y = EPS₁⋅F + F
>>> model = greekify_model(cleanup_model(model)) >>> model.statements TVCL = WGT⋅θ₁ ⎧WGT⋅θ₂⋅(θ₃ + 1) for APGR < 5 ⎨ TVV = ⎩ WGT⋅θ₂ otherwise η₁ CL = TVCL⋅ℯ η₂ VC = TVV⋅ℯ V = VC Bolus(AMT, admid=1) → CENTRAL ┌───────┐ │CENTRAL│──CL/V→ └───────┘ A_CENTRAL(t) ──────────── F = VC Y = F⋅ε₁ + F