pharmpy.modeling.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)) 1 17.529739 2 28.179910 3 9.688648 4 17.798916 5 25.023225 ... 151 22.459036 152 29.223295 153 20.217288 154 28.472888 155 34.226455 Name: PRED, Length: 155, dtype: float64
See also
evaluate_individual_predictionEvaluate the individual prediction