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) 0 17.771084 1 28.881859 2 11.441728 3 21.113050 4 29.783055 ... 150 25.375041 151 31.833395 152 22.876707 153 31.905095 154 38.099690 Name: IPRED, Length: 155, dtype: float64
See also
evaluate_population_prediction
Evaluate the population prediction