pharmpy.modeling.evaluate_individual_prediction#
- pharmpy.modeling.evaluate_individual_prediction(model, etas=None, parameters=None, dataset=None)[source]#
Evaluate the numeric individual 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. The evaluation is done at the current eta values or optionally at the given eta values.
This function currently only support models without ODE systems
- Parameters:
model (Model) – Pharmpy model
etas (dict) – Optional dictionary of eta values
parameters (dict) – Optional dictionary of parameters and values
dataset (pd.DataFrame) – Optional dataset
- Returns:
pd.Series – Individual predictions
Examples
>>> from pharmpy.modeling import load_example_model, evaluate_individual_prediction >>> from pharmpy.tools import load_example_modelfit_results >>> model = load_example_model("pheno_linear") >>> results = load_example_modelfit_results("pheno_linear") >>> etas = results.individual_estimates >>> evaluate_individual_prediction(model, etas=etas) 1 17.771084 2 28.881859 3 11.441728 4 21.113050 5 29.783055 ... 151 25.375041 152 31.833395 153 22.876707 154 31.905095 155 38.099690 Name: IPRED, Length: 155, dtype: float64
See also
evaluate_population_predictionEvaluate the population prediction