pharmpy.model module¶
Generic Model class¶
Base class of all implementations.
Inherit to implement, i.e. to define support for a specific model type. Duck typing is utilized, but an implementation is expected to implement all methods/attributes.
Definitions¶
- class pharmpy.model.Model[source]¶
Bases:
object
- Attribute: name
dependent_variable parameters random_variables statements dataset
- bump_model_number(path='.')[source]¶
If the model name ends in a number increase it to next available file else do nothing.
- property covariates¶
List of covariates used in model
- create_symbol(stem, force_numbering=False)[source]¶
Create a new unique variable symbol
- Parameters
stem (str) – First part of the new variable name
force_numbering (bool) – Forces addition of number to name even if variable does not exist, e.g. COVEFF –> COVEFF1
- property data_transformation¶
Transformation used for DV in dataset
- eta_gradient(etas=None, parameters=None, dataset=None)[source]¶
Numeric eta gradient
The gradient is evaluated given initial etas, parameters and the model dataset. The arguments etas, parameters and dataset can optionally override those of the model. Return a DataFrame of gradients.
- individual_prediction(etas=None, parameters=None, dataset=None)[source]¶
Numeric individual prediction
- property modelfit_results¶
- population_prediction(parameters=None, dataset=None)[source]¶
Numeric population prediction
The prediction is evaluated at the current model parameter values or optionally at the given parameter values. The evaluation is done for each data record in the model dataset or optionally using the dataset argument.
Return population prediction series
- exception pharmpy.model.ModelSyntaxError(msg='model syntax error')[source]¶
Bases:
pharmpy.model.ModelException