evaluate_population_prediction#
- pharmpy.modeling.evaluate_population_prediction(model, parameters=None, dataset=None)[source]#
Evaluate the 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.
This function currently only support models without ODE systems
- Parameters:
model (Model) – Pharmpy model
parameters (dict) – Optional dictionary of parameters and values
dataset (pd.DataFrame) – Optional dataset
- Returns:
pd.Series – Population predictions
Examples
>>> from pharmpy.modeling import load_example_model, evaluate_population_prediction >>> from pharmpy.tools import load_example_modelfit_results >>> model = load_example_model("pheno_linear") >>> results = load_example_modelfit_results("pheno_linear") >>> pe = results.parameter_estimates >>> evaluate_population_prediction(model, parameters=dict(pe)) 0 17.529739 1 28.179910 2 9.688648 3 17.798916 4 25.023225 ... 150 22.459036 151 29.223295 152 20.217288 153 28.472888 154 34.226455 Name: PRED, Length: 155, dtype: float64
See also
evaluate_individual_prediction
Evaluate the individual prediction